Skip to main content
JimEno
Associate III
September 26, 2023
Question

Reserving microcontroller Flash non-volatile memory

I want to reserve a chunk of internal Flash memory in the micro-controller to store some user parameters. I want to develop a custom driver to manage the sector of Flash including erasing and re-writing the sector (there better be utility functions for Flash Sector erase and write). In the 'olden days' with a linker command file, I could do that easily. I can't seem to find that capability in the STMCube IDE with the file <project.ioc>. How do I do this?

 

    This topic has been closed for replies.

    1 reply

    TDK
    September 26, 2023

    The linker script will be a *.ld file that is created when you generate the code. You can modify the main FLASH section within the linker script to avoid writing to the reserved flash sector.

    "If you feel a post has answered your question, please click ""Accept as Solution""."