Set up ld script
linuxkaffee@gmx.net
linuxkaffee@gmx.net
Tue Apr 29 08:56:00 GMT 2008
Hi,
I'm using the linker script which is provided to the GNU ld.
Within the script I've a definition of possible physical memories
where different section can be mapped:
MEMORY
{
flash (rx): org = 0x60000000, len = 1024K
cflash (rx): org = 0xb0100000, len = 1024K
...
}
In my framework I've a central configuration file which also defines
all possible physical memory regions for other purposes than just for
linking. So, the configuration file also for example defines the
physical memory "flash" with its start address 0x60000000. So,
this information is defined at different places and care must be taken
to keep this data consistent.
It would be much better to have one central configuration file which
is used by a preprocessor to generate the final linker script. So, ideally
in the original linker script I would have something like
MEMORY
{
flash (rx): FLASH_ORG, FLASH_LEN
...
}
and a preprocessor (or any other kind of script generator) would read the
central configuration file and replace the macros (FLASH_ORG...) by real
values read from the central configuration file. Do you know of any tool
that I might use for this purpose? Something like the GNU cpp?
Or any other ideas how to efficiently solve this problem?
Regards,
Tim
--
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
More information about the Gcc-help
mailing list