Hi Victor,
Could you tell me, do you just want to define a array of data, like the constant data to the flash defined address? Or you still want to write and erase it?
If you just want to define a constant data array, it's very easy, you just need to define it directly, but the detail method is different with the IDE.
Please tell me what the IDE you are using, now, take IAR as an example, if define the data in the defined address 0x1000, you can define it like this :
#pragma location = 0x1000 __root const char __DATA_config[] = {…}; |
|
If you are using MDK, you can use it like this:
const char __DATA_config[] __attribute__((at(0x1000))) ={…}
Buf if you want to write the flash and erase it, you refer to my attached application note.
Wish it helps you!
If you still have question about it, please kindly let me know.
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------