This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSPM0G1505: FLASH READ

Part Number: MSPM0G1505

There are 10 int values that I would like to store in the flash. These are the user settings of a given product.

Question is how to read variables from flash and is there any proper way to decide at which location in flash should I store my data? Right now I have taken the location 0x1000 because I knew it was empty by seeing the memory allocation window but this seems crude way of doing it.

CODE:

int variable_flash;//GLOBAL VARIABLE

int main()  {

int *ptr;

ptr=0x1000;  //this is the address in flash from where I want to read   ....GETTING ERROR ON THIS LINE

variable_flash=*ptr;
}
Is this the right way to read from flash memory? This should read 4bytes i.e 4 consecutive address right?
ERROR IS: 
[6]../flashctl_multiple_size_read_verify.c:232:8: error: incompatible integer to pointer conversion assigning to 'int *' from 'int' [-Wint-conversion]
[7] ptr=0x1000;
[8] ^~~~~