Using CrossStudio for ARM 4.2.
Atmel SAM C21 (G18) has got 8kb of "embedded RWW section" at address 0x400000, to be used as EEPROM for storing data. I'm trying to place variables from my C code in this area and download them using Segger J-Link.
I have imported flash_placement.xml to the project and added a custom section:
<ProgramSection alignment="4" size="0x2000" load="Yes" name=".eeprom" />
Then in the source declared the variable as: int foo __attribute__((section(".eeprom"))) = ... ;
This generates the correct .elf file but when downloading, nothing gets programmed. Verify fails since the area does not get programmed (all 0xFFFF...). Not sure if this is a J-Link problem or a CrossStudio problem, perhaps some custom script is needed for the J-Link?
How do I get CrossStudio to program the custom section?
Please sign in to leave a comment.