cancel
Showing results for 
Search instead for 
Did you mean: 

FLASH memory reservation for settings storage.

JStrz.1
Associate

Hi

Maybe similar topic has already been there, but I can't find it...

I am using CubeMX and HAL on the 446RE.

I can write and read data to / from FLASH (In this case directly, I do not use EEPROM emulation).

Question: Where and how to set, e.g. Sector3 that it was only for my data. So that it is not overwritten during programming etc. I understand it like this: The program code is e.g. in sectors 0,1,2,4 and 5. The compiler prepares the batch in such a way that it skips sector 3.

Can it be set in the program code or somewhere in the CubeMX settings?

1 REPLY 1

With GNU based tools you'd typically change the linker script (.ld) to describe two sections of memory, and then direct content into them.

The linker isn't that smart, and you might want to automate the generation of a working set​ of functions or objects

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..