Re:working with data in flash
I have discovered a couple of things so far. Firstly, there is no way to erase the flash via IAR EWARM and the J-Link debugger. It would seem that the Segger J-Flash programme is needed (which is just irritating). Are there other software combinations that can do this with the J-Link?
The main thing that I need to do now is to write a serial number to the protected part of flash at programming time (bootloader protects the reserved space). It would be nice if there was an easy way to do this via the bootloader.
It is certainly possible to stop the linker from placing data in certain areas. For example if you wanted to make sure no programme data was written into the last kB of flash, then the linker script (for LM3S101) would change from,
| Code: | define region FLASH = mem:[from 0x00000000 to 0x00001FFF];
|
to
| Code: | define region FLASH = mem:[from 0x00000000 to 0x00001BFF];
|
In my understanding that would make sure that no programme code or data would be placed in the last kB (am I right/wrong?)
login or register to reply
|