Re: [fpc-pascal] Generating RTL Units for STM32 Processors

2018-02-27 Thread Christo Crause
On 28 Feb 2018 4:22 am, "R0b0t1"  wrote:

I will be following up with you off list, since you do not seem to mind.


I'm also interested in the general topic of incorporating embedded
controllers (avr at the moment)  into fpc. It would be useful to me if I
could follow at least the general highlights for the porting process, not
necessarily all the platform specific details.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Generating RTL Units for STM32 Processors

2018-02-27 Thread R0b0t1
On Tue, Feb 27, 2018 at 2:43 AM, Michael Ring  wrote:
> The process is completely automated and is based on converting the header
> files that come in the CMSIS packages of the processors.
>

Excellent! What about the startup assembly files? I see an equivalent,
it is autogenerated too?

> I will send you the file for that chip via pm, you will also have to tweak
> compiler/systems/t_embed.pas compiler/arm/cpuinfo.pas but this is pretty
> straightforward, only extend both structs for the processors.
>

Yes, I forgot about this, but it does sound easy. Which chip?

> There is a second class of Headerfiles that were done half automated (afaik)
> by Jeppe Johansen that covers the STM32F7 series. Those Headers more closely
> match the STM32 code C-code examples but are a lot less portable to other
> chips (Microchip etc...)
>

Where are these?

I have some interest in exploring a wide variety of platforms with
FPC. When doing so using C, I have unfortunately found that
portability only half-exists between chips of the same family from the
same manufacturer.

My interest in FPC is partly an interest in increased portability, but
that may need to be achieved in some other way than a HAL. This may be
due to how peripheral mappings are supplied. Perhaps there is a better
way I do not know about. Large projects such as
https://github.com/qmk/qmk_firmware manage.

I will be following up with you off list, since you do not seem to mind.

Cheers,
 R0b0t1

> Michael
>
>
> Am 27.02.18 um 04:09 schrieb R0b0t1:
>>
>> Hello list,
>>
>> I'd like some pointers on generating the RTL files for a processor I
>> am interested in, the STM32L432KC (which is available for ~$15 with
>> JTAG on a "Nucleo" board from STMicroelectronics).
>>
>> The CMSIS (Cortex Microcontroller Software Interface Standard) files,
>> as they come from STM, use structures to represent the registers. The
>> example RTL files for STM devices seem to follow this pattern fairly
>> well, but I would like to know about any discrepancies; I opened one
>> file and think it was structured more closely to the way libopencm3
>> does things, but I can't find it again. This may have been the file
>> for the NXP part listed on the Wiki.
>>
>>
>> How much was converted by hand, and how much can be automated? M4
>> devices are noticeably more complicated, and even though this is a
>> hobby project I am worried about the time investment required to get
>> my device working with FPC.
>>
>> What complicates things is the way libopencm3 has their headers
>> structures is more standard. They avoid using structures that
>> represent the registers, instead using faux namespacing with lots of
>> underscores in macro names.
>>
>> Cheers,
>>   R0b0t1
>> ___
>> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
>> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>
>
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Generating RTL Units for STM32 Processors

2018-02-27 Thread Michael Ring
What are you planing to implement? Do you need the RAM and FLASH of the 
stm32l432 or the low power features?


If not then I'd suggest to start wit a more simple CPU like the 
STM32F303K8 or, if you are okay with standard size nucleo boards the 
STM32F401RE or STM32F411RE are a good choice.


On the low energy chips the configuration is more demanding and for the 
other chips mentioned above there's already plenty of code available to 
re-use/re-purpose


Michael


Am 27.02.18 um 04:09 schrieb R0b0t1:

Hello list,

I'd like some pointers on generating the RTL files for a processor I
am interested in, the STM32L432KC (which is available for ~$15 with
JTAG on a "Nucleo" board from STMicroelectronics).

The CMSIS (Cortex Microcontroller Software Interface Standard) files,
as they come from STM, use structures to represent the registers. The
example RTL files for STM devices seem to follow this pattern fairly
well, but I would like to know about any discrepancies; I opened one
file and think it was structured more closely to the way libopencm3
does things, but I can't find it again. This may have been the file
for the NXP part listed on the Wiki.


How much was converted by hand, and how much can be automated? M4
devices are noticeably more complicated, and even though this is a
hobby project I am worried about the time investment required to get
my device working with FPC.

What complicates things is the way libopencm3 has their headers
structures is more standard. They avoid using structures that
represent the registers, instead using faux namespacing with lots of
underscores in macro names.

Cheers,
  R0b0t1
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Generating RTL Units for STM32 Processors

2018-02-27 Thread Michael Ring
The process is completely automated and is based on converting the 
header files that come in the CMSIS packages of the processors.


I will send you the file for that chip via pm, you will also have to 
tweak compiler/systems/t_embed.pas compiler/arm/cpuinfo.pas but this is 
pretty straightforward, only extend both structs for the processors.


There is a second class of Headerfiles that were done half automated 
(afaik) by Jeppe Johansen that covers the STM32F7 series. Those Headers 
more closely match the STM32 code C-code examples but are a lot less 
portable to other chips (Microchip etc...)


Michael


Am 27.02.18 um 04:09 schrieb R0b0t1:

Hello list,

I'd like some pointers on generating the RTL files for a processor I
am interested in, the STM32L432KC (which is available for ~$15 with
JTAG on a "Nucleo" board from STMicroelectronics).

The CMSIS (Cortex Microcontroller Software Interface Standard) files,
as they come from STM, use structures to represent the registers. The
example RTL files for STM devices seem to follow this pattern fairly
well, but I would like to know about any discrepancies; I opened one
file and think it was structured more closely to the way libopencm3
does things, but I can't find it again. This may have been the file
for the NXP part listed on the Wiki.


How much was converted by hand, and how much can be automated? M4
devices are noticeably more complicated, and even though this is a
hobby project I am worried about the time investment required to get
my device working with FPC.

What complicates things is the way libopencm3 has their headers
structures is more standard. They avoid using structures that
represent the registers, instead using faux namespacing with lots of
underscores in macro names.

Cheers,
  R0b0t1
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Generating RTL Units for STM32 Processors

2018-02-27 Thread R0b0t1
Hello list,

I'd like some pointers on generating the RTL files for a processor I
am interested in, the STM32L432KC (which is available for ~$15 with
JTAG on a "Nucleo" board from STMicroelectronics).

The CMSIS (Cortex Microcontroller Software Interface Standard) files,
as they come from STM, use structures to represent the registers. The
example RTL files for STM devices seem to follow this pattern fairly
well, but I would like to know about any discrepancies; I opened one
file and think it was structured more closely to the way libopencm3
does things, but I can't find it again. This may have been the file
for the NXP part listed on the Wiki.


How much was converted by hand, and how much can be automated? M4
devices are noticeably more complicated, and even though this is a
hobby project I am worried about the time investment required to get
my device working with FPC.

What complicates things is the way libopencm3 has their headers
structures is more standard. They avoid using structures that
represent the registers, instead using faux namespacing with lots of
underscores in macro names.

Cheers,
 R0b0t1
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal