Quantcast
Channel: MSP430 Technical Forums
Viewing all articles
Browse latest Browse all 2077

Storing addresses of flash variables in flash

$
0
0

Is there any way to compute at compile time the address of a variable stored in flash and store that address in flash as well? Here is an example:

static const int data[]={1,2,3};
static const int *data_ptr[]={&data[0],&data[1],&data[2]};

I would like to avoid loading data_ptr into ram since it never gets changed and the address of data obviously never changes. Is there any way to do this other than hand editing the generated asm file?


Viewing all articles
Browse latest Browse all 2077

Trending Articles