2023-09-27 08:29 AM
I am running into "undefined reference to `arm_fir_init_f32'" error when linking an external static library (libxensiv-radar-presence.a).
I have added the CMSIS DSP static library and the external static to the project configurations. Other libraries that use the CMSIS DSP are able to the access those functions from the CMSIS library.
Is there anything I'm missing with my configuration of the static libraries?
On a side note, is it possible to view the xensiv_radar_presence.c? I do not see it in the project directory, seems to be located within a docker container that is doing the build, is it possible to locate the container and view its contents?
Bellow I have attached screenshots of the project configuration, build console, and project structure. For context, I am using the STM32F407G-DISC1.
c:\st\stm32cubeide_1.12.1\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.200.202301161003\tools\arm-none-eabi\bin\ld.exe: C:\Users\mchen\Documents\radar-development\bgt60tr13-driver\2023-09-15-algo\bgt60tr13c-stm32-driver\BGT60TR13C-Driver\Core\xensiv-radar-presence-master\COMPONENT_HARDFP\GCC_ARM\libxensiv-radar-presence.a(xensiv_radar_presence.o): in function `xensiv_radar_presence_process_frame':
/Users/gitlab-runner/builds/pss/sensys/csk/xensiv-radar-presence/build/static_build/../../xensiv_radar_presence.c:563: undefined reference to `arm_fir_init_f32'
c:\st\stm32cubeide_1.12.1\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.200.202301161003\tools\arm-none-eabi\bin\ld.exe: /Users/gitlab-runner/builds/pss/sensys/csk/xensiv-radar-presence/build/static_build/../../xensiv_radar_presence.c:569: undefined reference to `arm_fir_init_f32'
c:\st\stm32cubeide_1.12.1\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.200.202301161003\tools\arm-none-eabi\bin\ld.exe: /Users/gitlab-runner/builds/pss/sensys/csk/xensiv-radar-presence/build/static_build/../../xensiv_radar_presence.c:597: undefined reference to `arm_fir_f32'
c:\st\stm32cubeide_1.12.1\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.200.202301161003\tools\arm-none-eabi\bin\ld.exe: /Users/gitlab-runner/builds/pss/sensys/csk/xensiv-radar-presence/build/static_build/../../xensiv_radar_presence.c:602: undefined reference to `arm_fir_f32'
c:\st\stm32cubeide_1.12.1\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.200.202301161003\tools\arm-none-eabi\bin\ld.exe: /Users/gitlab-runner/builds/pss/sensys/csk/xensiv-radar-presence/build/static_build/../../xensiv_radar_presence.c:802: undefined reference to `arm_fir_decimate_f32'
c:\st\stm32cubeide_1.12.1\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.200.202301161003\tools\arm-none-eabi\bin\ld.exe: /Users/gitlab-runner/builds/pss/sensys/csk/xensiv-radar-presence/build/static_build/../../xensiv_radar_presence.c:806: undefined reference to `arm_fir_decimate_f32'
collect2.exe: error: ld returned 1 exit status
2023-10-18 08:56 AM - edited 2023-10-18 08:57 AM
Hello @m1ng and welcome to the Community :),
Please make sure that the DSP library path is correct.
From Project menu or File menu, go to Properties > C/C++ Build > Settings > Tool Settings > MCU CGC Linker > Libraries > Libraries (-l) > Add and insert the following library: "arm_cortexM4lf_math". as shown in the below figure
I recommend you to follow the steps shared in How to integrate DSP Libraries on STM32 project? An example using STM32F429 FAQ to integrate correctly the DSP library in your project.
Please let me know if the issue is solved or not.
Thank you.
Kaouthar
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.