Skip to main content
JStrz.1
Associate
November 25, 2020
Question

FLASH memory reservation for settings storage.

  • November 25, 2020
  • 1 reply
  • 719 views

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?

This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
November 25, 2020

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 VenmoUp vote any posts that you find helpful, it shows what's working..