2021-08-23 08:37 AM
Hi all,
I'm trying to implement manually the ST EEPROM emulation package.
But I got stuck at a undefined reference:
I included in the right build paths and in the IDE I can perfectly jump to the EE_Init() function.
So the IDE does know where to look, but my compiler doesn't
What can be the problem here?
Solved! Go to Solution.
2021-08-25 01:28 PM
You need to add all directories with source files in them to the source folders.
Project properties -> C/C++ General -> Paths and Symbols -> Source Location
2021-08-23 08:47 AM
What's complaining? The Compiler or the Linker?
The include file tells the compiler what the interface expectations are.
The Linker expects the source files or the libraries containing the actual functions to be part of the project.
2021-08-23 10:30 AM
Ensure the header file declaring EE_Init is included in the include path, and also included prior to using the function in each source file it's used.
2021-08-23 01:03 PM
collect2.exe: error: ld returned 1 exit status
this is the linker right?
2021-08-23 01:11 PM
ld is the linker yes, still don't see the complete messaging
But, if the linker is complaining you need to add the Eeprom Emulation source code into the project, or the precompiled library.
2021-08-23 01:13 PM
This is the current situation.
Included paths top of the list
Included the header file where EE_Init() is in in the main file
Maybe HAL_init doesn't know yet some parts that er needed?
The EEPROM emulator examples ST provided are not made with an .ioc file for CubeIDE Device configuration tool
2021-08-23 01:27 PM
2021-08-25 07:13 AM
Is there maybe an easy way to implement the x-cube-eeprom package?
https://www.st.com/en/embedded-software/x-cube-eeprom.html
It seems that it is not importable into the CubeIDE as a package.
I tried to import the package zip file, but it is missing files.
Maybe it is for an old CubeIDE?
2021-08-25 07:34 AM
That eeprom_emul.c doesn't appear to be part of the build. The folder and/or C file need to have an icon with a little blue thing or else it's ignored. Right->click -> Resource Configurations -> make sure it's not excluded from the build (which it is).
2021-08-25 01:21 PM
So the C and H in the icon should be a blue solid letter?
I pasted the whole Middlewares folder into my project
When I build the project, the IDE showed the Middlewares folder in the project tree.
When I right click on eeprom_emul.c > Resource Configurations there is no marking in front of Exclude build