Skip to main content
Mike Jackson
Associate
June 13, 2018
Question

STM32CubeMX support for EEPROM emulation

  • June 13, 2018
  • 4 replies
  • 2078 views
Posted on June 13, 2018 at 18:09

https://community.st.com/tags♯/?tags=stm32cubemx.

‌

https://community.st.com/tags♯/?tags=eeprom%20emulation

I'm adding emulated EEPROM support to a project that is being built with the STM32F429ZITx processor.   I am able to include the sample code, and I am able to get it to work, but the only way I am able to preserve the data  after loading a newly built version (i.e. flashing a new image through the debugger) is to manually modify the flash.ld file to carve out a sector for EEPROM:

MEMORY

{

RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192K

CCMRAM (rw) : ORIGIN = 0x10000000, LENGTH = 64K

VECTOR (rx) : ORIGIN = 0x8000000, LENGTH = 16K

EEPROM (rx) : ORIGIN = 0x8004000, LENGTH = 48K

FLASH (rx) : ORIGIN = 0x8010000, LENGTH = 1984K

}

The issue I have is that every time I run the STM32CubeMX software to re-generate the code, it overwrites my changes.  Is there any configuration option in the cube software (Version 4.25.0) that will allow me to specify that I have an EEPROM section, and where I want to put it so that it doesn't overwrite it each time?

#stm32cubemx. #eeprom-emulation
This topic has been closed for replies.

4 replies

Mike Jackson
Associate
June 14, 2018
Posted on June 14, 2018 at 17:44

I have a little follow up - my original post wasn't quite correct.   If I have modified the .ld file with the necessary changes and leave it in the folder, then the changes are indeed preserved.  But if I rename it and give it a new extension (something like .bak), then my .bak file is removed and a new one is created without the changes.    So once the manual changes are made, it looks like they will be kept, but it still would be nice to have the cube tool have an option to allow the user to configure an emulated eeprom section so that they don't need to figure out how to modify the .ld file manually

Nawres GHARBI
Technical Moderator
September 5, 2018

Hi @Mike Jackson​ 

You will be able to add and configure additional memories through STM32CubeMX GUI in a coming release.

Thieny
Associate II
April 29, 2022

Is there any progress yet?

In the CubeMX tool integrated in the CubeIDE I can't find any configuration possibilities for additional memories. Furthermore it's not possible to add the X-CUBE-EEPROM expansion to a project with the "Software Packs" option of CubeMX to emulate EEPROM on a STM32L4 device.

Am I right or did I miss something?

ADrag.2
Associate II
May 18, 2022

bump. Wondering the same thing. I can't tell if emulated eeprom is a cubemx feature or not.

ADrag.2
Associate II
May 18, 2022

I found this which seems to solve the issue: https://medium.com/teamarimac/stm32-flash-programming-3418bf09231c