Skip to main content
Alberto1
Associate II
June 11, 2021
Solved

NucleoSTM32L152 + X-Nucleo-IKS01A3 Example build problem

  • June 11, 2021
  • 3 replies
  • 1676 views

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

This topic has been closed for replies.
Best answer by Alberto1

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

3 replies

Vangelis Fortounas
Associate II
June 12, 2021

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.

Alberto1
Alberto1Author
Associate II
June 14, 2021

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

Alberto1
Alberto1AuthorBest answer
Associate II
June 14, 2021

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