Externally Built code - generation of memory location constants
Hello,
I'm trying to import a large project into Crossworks which would normally be built using make.
The project uses a couple of .ld files to setup memory maps, and provide constants for use in code derived from them, eg
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 472K
EEPROMEMU (r) : ORIGIN = 0x08076000, LENGTH = 32K
...
}
__eeprom_start = ORIGIN(EEPROMEMU);
Crossworks does something similar, for example generating __stack_start__ automagically. Having created a custom memory map XML file with the corresponding entries Crossworks style:
<MemorySegment size="0x76000" access="ReadOnly" name="FLASH" start="0x08000000" />
<MemorySegment size="0x8000" access="ReadOnly" name="EEPROMEMU" start="0x08076000" />
...
how do I persuade Crossworks to generate __eeprom_start__ automatically?
Thanks,
Simon Ansley
-
Hello Simon,
Crossworks creates for every segment in the memory map file three symbols:
__<segment name>_segment_start__
__<segment name>_segment_end__
__<segment name>_segment_size__In your case:
__EEPROMEMU_segment_start__
__ EEPROMEMU_segment_end__
__ EEPROMEMU_segment_size__You can verify this in the Symbol Browser (View --> Symbol Browser)
Regards
-
Hello, Markus,
Should this work for an externally built project? I'm using GNU Tools ARM Embedded/6 2017-q2-update as the original project uses newlib and a much fuller c++ library than Rowley provides.
Symbol browser appears unpopulated until there is at least one successful build completed.
If I create some temporary definitions to allow a build, I'm still not seeing the requisite symbols generated.
Thanks,
Simon
Please sign in to leave a comment.
Comments
2 comments