This question is about embedded controllers.
I want to initialize a const array in memory. But while storing this array in memory, I want to store it at a specific location say 0x8000. This way I want to occupy some amount of code memory so that later on during run time I can erase that portion and use it for my own other purpose.
Basically I want do this:
const unsigned char dummy_string[] = "This is dummy string";
but the address of dummy_string should be in my hand. Like I can assign whatever address I want to it.
mmap()specifying your address. The addresses are virtual though.(volatile unsigned char *)0x8000. msp430 flash addresses can be read in the way as RAM addresses. writing requires erase + write though.