[fpc-pascal] Best start point for adding new FPC target
Florian Klämpfl
florian at freepascal.org
Tue Jan 28 21:33:18 CET 2020
Am 28.01.20 um 20:40 schrieb Yuriy Sydorov:
> On 28.01.2020 21:14, Fabio Luis Girardi via fpc-pascal wrote:
>> Em ter., 28 de jan. de 2020 às 16:04, Yuriy Sydorov <jura at cp-lab.com
>> <mailto:jura at cp-lab.com>> escreveu:
>>
>> You need to add support of a new CPU to the existing freebsd
>> target. The target would be arm-freebsd, since armhf is
>> not
>> treated as a separate CPU by FPC. You need to create arm startup
>> files in the rtl/freebsd/arm folder.
>>
>>
>> Yes, I know. But to add this new CPU support for the FPC/FreeBSD, it
>> is better I start with files of rtl/freebsd/i386 or rtl/freebsd/x86_64
>> or use another start point, like rtl/netbsd/arm ?
>
> The primary goal of a startup code is to get pointers to the command
> line parameters and the environment block. If arm-freebsd uses the stack
> to pass these pointers (the same way as i386-freebsd), then you need
> just to convert the i386 startup assembly to the arm assembly.
> For start you need only the prt0.as file.
>
I strongly recommend to create pascal startup files for newly added targets.
More information about the fpc-pascal
mailing list