2021-06-11 02:10 AM
Hi to all
I'm a newbe for this things.
My intention is to use the Intensity Detection application for the this system: NucleoSTM32L152 + X-Nucleo-IKS01A3 with ST32CubeMX version 6.21 and
ST32CubeIDEversion 1.61.
I downloaded MEMS examples from https://www.st.com/content/st_com/en/products/embedded-software/mcu-mpu-embedded-software/stm32-embedded-software/stm32cube-expansion-packages/x-cube-mems1.html.
I copied the application IntensityDetection (for NucleoSTM32L152 and X-Nucleo-IKS01A3) into my workspace (NucleoL152RE).
I opened the IntensityDetection ioc file with STM32CubeMx. I migrated to a newer version of firmware of ioc (as suggest) and then I generated the code.
I opened the STM32CubeIDE and did build.
It returns this:
c:\programmazione\stmicroelectronics\stm32cubeide\stm32cubeide\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924\tools\arm-none-eabi\bin\ld.exe: Application/User/motion_id_manager.o: in function `MotionID_manager_init':
D:/0Prove/STM/Esempi/NucleoL152RE/IntensityDetection/Src/motion_id_manager.c:42: undefined reference to `MotionID_Initialize'
c:\programmazione\stmicroelectronics\stm32cubeide\stm32cubeide\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924\tools\arm-none-eabi\bin\ld.exe: Application/User/motion_id_manager.o: in function `MotionID_manager_run':
D:/0Prove/STM/Esempi/NucleoL152RE/IntensityDetection/Src/motion_id_manager.c:53: undefined reference to `MotionID_Update'
c:\programmazione\stmicroelectronics\stm32cubeide\stm32cubeide\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924\tools\arm-none-eabi\bin\ld.exe: Application/User/motion_id_manager.o: in function `MotionID_manager_get_version':
D:/0Prove/STM/Esempi/NucleoL152RE/IntensityDetection/Src/motion_id_manager.c:64: undefined reference to `MotionID_GetLibVersion'
I don't understand what happens.
Do anyones help me?
Alberto
Solved! Go to Solution.
2021-06-14 01:39 AM
I think I solved.
In the C/C++ Build -> Settings -> MCU GCC Linker -> Library, the path was correct, but not the library not.
I added :MotionID_CM3_wc32_ot.a in Libraries and it appears to work.
Thanks
Alberto
2021-06-12 04:45 PM
Hello
"undefined reference to" means that the module ( a *.c file) containing the function (eg MotionID_manager_init) is missing from project.
Search for the appropriate module(s) that containing these three functions and add them to project.
2021-06-14 12:08 AM
Hello
First to all, thanks for reply.
The functions are contain in a module in the repository (..\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-MEMS1\8.3.0\Middlewares\ST\STM32_MotionID_Library\Lib), I think.
I looked in the C/C++ Build -> Settings -> MCU GCC Linker -> Library and the path is present.
I think that an STM's example should work without problem.
Alberto
2021-06-14 01:39 AM
I think I solved.
In the C/C++ Build -> Settings -> MCU GCC Linker -> Library, the path was correct, but not the library not.
I added :MotionID_CM3_wc32_ot.a in Libraries and it appears to work.
Thanks
Alberto