On Wed, June 13, 2012 12:55, alrieckert wrote: > Tomas Hajny-2 wrote >> >> Sorry for a possibly stupid question, but is this offset >> (conceptionally) >> comparable to the -WB option used for some other targets? If so, it >> might >> 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 > the > -WB parameter does.
You can find some information about the image addresses on MS Windows on http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/devcommon/compdirsimagebaseaddress_xml.html and http://blogs.msdn.com/b/calvin_hsia/archive/2007/07/27/dll-image-base-addresses-are-the-same-in-xp-different-on-vista.aspx. Maybe that helps you to check if it is conceptually similar/comparable, or not. > 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. Tomas _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal