Content originally posted in LPCWare by jim.smith on Thu Jan 06 11:38:18 MST 2011
I'm working toward compiling code from NXP app note AN10960. Part of that code places some variables in a particular block of RAM and initializes them to default values. During program execution those values can be changed or read, and and the entire block of variables can be stored/retrieved from NVRAM using the iap_entry calls
The app note used the KEIL compiler, and has a line like
[FONT=Courier New][SIZE=2]const BYTE LEVEL __attribute__((at(0x00003000))) = 254;[/SIZE][/FONT]
That places the byte variable LEVEL at ram location 0x00003000 and initializes it to the value of 254. It can be read, or written, and the location of the block of variables is known so we can use the iap_entry calls to stuff it into NVRAM. Unfortunately, the LPCXpresso GNU compiler does not recognize the [FONT=Courier New]at [/FONT]attribute. Any ideas on how to do this the LPCXpresso way? I've looked through the forums and the help files and so far have come up empty.