Hi!
I've tried following this guide:
processors.wiki.ti.com/.../Placing_Variables_in_Specific_Memory_Location_-_MSP430
but am not having any luck with the MSP430F5659
I created a section in the cmd file.
MEMORY{
..
..
app_counter : origin = 0x8500, length = 0x0002
FLASH : origin = 0x8502, length = 0x7A7E
FLASH2 : origin = 0x10000,length = 0x78000
..
..
}
SECTION{
..
.counter : {} > app_counter
..
}
and in the C code
#pragma DATA_SECTION(reset_location, ".counter")
const uint16_t counter = 0xDEAD;
The code compiles, but when I run it, the word at 0x8500 stays at 0xFFFF, empty flash. What am I doing wrong? Most examples seem only to discuss placing variables in INFO memory, which typically isn't used by anything else, so nothing would get overwritten.