cancel
Showing results for 
Search instead for 
Did you mean: 

How to install x-cube-eeprom on STM32Cube?

FCOST.1
Associate II

Hello,

I have downloaded en.x-cube-eeprom_v4.0.0.zip but I do not know how to install it on STM32Cube. It should have been a package installed "from local" and selected the zip in STM32Cube MX? Or what I need to do is copy all the files for my project of for a specific directory  in STM32 cube installation? Is there any tutorial describing all the steps to install it?

Thanks,

8 REPLIES 8
GSaw
Associate II

Please go thru AN4894 Application note EEPROM emulation techniques and software for STM32 microcontrollers.

FCOST.1
Associate II

HI GSaw,

Thank you for your help. I saw this document and it explains how the EEPROM emulation process works. Right now, I'm not interested in knowing the details of how it works. What I really wanted was to know, from a practical point of view, how to install this package on the STM32CubeMX. Do I have to replace some STM32CubeMX folder with these new drivers? Once that is done, I will never be able to update the STM32CubeMX again, why update, I understand that I will lose the EEPROM emulation? Or should I just copy to my project and stop using STM32CubeMX to create the initial project skeleton? If so, it makes little sense, since the folder has all the drivers (various files), not just the ones that have to do with eeprom emulation. The manual does not make it clear which is the recommended way to use the drivers. I'm very new to the STM32 world and got hooked on this part. I've already implemented almost everything I need for my project and I just need this blessed emulated EEPROM memory.

There are open source projects maintained by third parties on github with usage documentation (practical) much more intuitive than the one from ST. Like, for example, https://github.com/nimaltd/ee. There it is very clear what needs to be done to use the functionality, and it is a lib with only three files. So I have no doubt how to include and use it in my project. Unfortunately, this lib doesn't suit me because it doesn't support the chip model I'm using. Also, it makes more sense to use something developed by the ST itself than something from a third party.

Thanks,

Martin M.
Associate II

Hi @FCOST.1​, 

Did you make any progress with installing the x-cube-eeprom extension package?

I just installed the latest STM32 CubeMX Version 6.5.0, and when I try to install en.x-cube-eeprom_v4.0.0.zip via "Help -> Manage embedded software packages -> From Local ..." I get the attached error message.

I second your comment - it would be really helpful to know at least how to "manually" install (by copying folders & files) the en.x-cube-eeprom_v4.0.0 package since the "automatic" way respectively the package is somehow broken.

Just my two cents.

0693W00000LytbLQAR.jpg 

@Martin M.​ This is the same question as has already been answered, please see this link.

I hope that answers your question as well?

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

@Peter BENSCH​ 

Thanks for clarifying this issue, Peter!

The whole topic is a bit confusing as the package name "X-CUBE-EEPROM" and the manual installation option give the impression that it should be compatible with STM32CubeMX (like many other X-CUBE packages).

I was also wondering why the X-CUBE-EEPROM package doesn't show up in the CubeMX package manager, but now that's clear too.

However, I will find my way to make use of the emulated EEPROM functions by cherry-picking them from the package and adding them to my project.

Thanks.

@Martin M.​ Were you able to get the X-CUBE-EEPROM library to work?

I am manually importing the package into the project but am having trouble. If I import the entire folder as a "Source Folder" and then include it in "Paths and Symbols", it doesn't work for me, I get a lot of compile errors.

I would like to know what is the proper way to include it in a project.

Thanks.

TBran.3
Associate III

Yeah I'm still a little confused. The linked "solved" answer, kind of like AN4894, provides a bunch of background information via the 3 linked user manuals (UM2312, UM2385, and UM2388) which all appear to give information about how expansion packs work in the Cube ecosystem and how one is implemented from a development perspective, but there's still absolutely no tutorial or even just rough set of steps that I can find on how to import a library such as X-CUBE-EEPROM into an STM32 project. There lots of stuff within the X-CUBE-EEPROM package which appears to be example code, or lets you test drive it on certain Nucleo boards, but I would wager the vast majority of people (myself included) are looking to integrate it into a custom (non-Nucleo) STM32 project. That's the part that seems to be missing, IMO.

My best shot at understanding what I need to do is: Copy the files from Middlewares/ST/EEPROM_Emul into my project src and inc folder, ensure these are included in the compilation path, make *some* change to my linker script (not sure at this point what that would be), and then call the EEPROM emulation API functions from the main parts of my project.

Ok, in fairness, chapter 5 of AN4984 does somewhat shed some light on it, but it seems like it would be clearer if there was a short like 2-pager that just outlined the basic logistics of pulling the library into a project.

It appears that one needs to copy /Middlewares/ST/EEPROM_Emul into your project's /Middlewares/ST/ folder, add the Core and Porting folders to the include path, and then edit the linker script by adding an appropriate flash section for the EEPROM storage, which is of course going to be project-specific. This gets things compiling. I'm having a minor bug with actually writing and reading back but that's my own logic bug I believe and should have it working later on when I get back to this.