[fpc-pascal] Variable alignment in arm-embedded
XHajT03 at hajny.biz
Wed Jun 13 13:35:18 CEST 2012
On Wed, June 13, 2012 12:55, alrieckert wrote:
> Tomas Hajny-2 wrote
>> Sorry for a possibly stupid question, but is this offset
>> comparable to the -WB option used for some other targets? If so, it
>> make sense to extend it also for your case...
> Hi Tomas,
> Not a stupid question at all. To be totally honest, I have no idea what
> -WB parameter does.
You can find some information about the image addresses on MS Windows on
Maybe that helps you to check if it is conceptually similar/comparable, or
> I tried to play around with it, but it tells me
> illegal parameter -WBxxx
Yes, the parameter is enabled only for certain platforms (see the compiler
help listed if calling it without parameters), that's why I talked about
extending it (by enabling it for another target on line 1704 of
options.pas in trunk and adding support for using the passed value in
t_embed.pas - see TExternalLinkerWin methods SetDefaultInfo,
WriteResponseFile and MakeExecutable in t_win.pas to see how it is
accessed and used for the Windows targets).
> Basically what needs to happen, is al link time, the link script needs to
> take the flash start address as a variable from somewhere. So this is an
> example of the current link.res that is generated by the compiler. The
> origin and lengths are hardcoded.
> and all that needs to happen is you need to be able to set the
> with either a parameter or as compiler directives.
(Re-)using image base would provide both options.
More information about the fpc-pascal