cancel
Showing results for 
Search instead for 
Did you mean: 

NucleoSTM32L152 + X-Nucleo-IKS01A3 Example build problem

Alberto1
Associate III

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

1 ACCEPTED SOLUTION

Accepted Solutions
Alberto1
Associate III

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

View solution in original post

3 REPLIES 3

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
Associate III

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
Associate III

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