2021-12-07 02:25 AM
@Community member
What works:
Using STM32CubeIDE 1.6.1 and created a .ioc for the F750 I have used the library with arm_math version V1.4.5 b in my previous project with the STM32F750 without a problem, adding __FPU_PRESENT and using ARM_MATH_CM7 using hal drivers. I don't have any libraries linked. and it compiles and FFT works. Intruction set is THumb2, Floating point Abi-hard, unit = FPv5-D6. using 9-2020-q2-update GNU tools for STM32 toolchain. GNU11 ISOC11 compiler
What does not work:
In Release compile I get
Error __SSAT already defined
In file included from ../Drivers/CMSIS/DSP_Lib/Source/TransformFunctions/arm_cfft_f32.c:41:
../Drivers/CMSIS/DSP_Lib/Include/arm_math.h:666:25: error: redefinition of '__SSAT'
666 | static __INLINE q31_t __SSAT(
| ^~~~~~
In file included from ../Drivers/CMSIS/Include/cmsis_compiler.h:48,
from ../Drivers/CMSIS/Include/core_cm0plus.h:115,
from ../Drivers/CMSIS/DSP_Lib/Include/arm_math.h:311,
from ../Drivers/CMSIS/DSP_Lib/Source/TransformFunctions/arm_cfft_f32.c:41:
../Drivers/CMSIS/Include/cmsis_gcc.h:1299:30: note: previous definition of '__SSAT' was here
1299 | __STATIC_FORCEINLINE int32_t __SSAT(int32_t val, uint32_t sat)
| ^~~~~~
In file included from ../Drivers/CMSIS/DSP_Lib/Source/TransformFunctions/arm_bitr
and at the end I get
make: *** [Drivers/CMSIS/DSP_Lib/Source/TransformFunctions/subdir.mk:120: Drivers/CMSIS/DSP_Lib/Source/TransformFunctions/arm_cfft_f32.o] Error 1
In Debug Compile I get additional failure messages
arm-none-eabi-gcc "../Drivers/CMSIS/DSP_Lib/Source/TransformFunctions/arm_cfft_radix2_init_q15.c" -mcpu=cortex-m0plus -std=gnu11 -g3 '-DDEBUG=1' '-DUSE_HAL_DRIVER=1' '-DSTM32L072xx=1' '-DREGION_EU868=1' '-DLoRa_Sensor_Node=1' '-DUSE_STM32L0XX_NUCLEO=1' '-DLOW_POWER_DISABLE=1' '-DARM_MATH_CM0PLUS=1' -c -I../Core/Inc -I../Drivers/STM32L0xx_HAL_Driver/Inc -I../Drivers/STM32L0xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32L0xx/Include -I../Drivers/CMSIS/Include -I../Drivers/CMSIS/DSP_Lib/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Drivers/CMSIS/DSP_Lib/Source/TransformFunctions/arm_cfft_radix2_init_q15.d" -MT"Drivers/CMSIS/DSP_Lib/Source/TransformFunctions/arm_cfft_radix2_init_q15.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/CMSIS/DSP_Lib/Source/TransformFunctions/arm_cfft_radix2_init_q15.o"
../Drivers/CMSIS/DSP_Lib/Source/TransformFunctions/arm_bitreversal2.S: Assembler messages:
../Drivers/CMSIS/DSP_Lib/Source/TransformFunctions/arm_bitreversal2.S:140: Error: selected processor does not support `it LS' in Thumb mode
../Drivers/CMSIS/DSP_Lib/Source/TransformFunctions/arm_bitreversal2.S:141: Error: thumb conditional instruction should be in IT block -- `bxls lr'
../Drivers/CMSIS/DSP_Lib/Source/TransformFunctions/arm_bitreversal2.S:142: Error: cannot honor width suffix -- `push {r4-r9}'
useing the CMSIS DSP Version 5 with lib arm ( I get multiple LD.exe errors )
Solved! Go to Solution.
2021-12-08 08:39 AM
Hello @Community member,
I recommend you following the Configuring DSP libraries on STM32CubeIDE article, it should help you.
Chahinez.
2021-12-07 05:59 AM
Thanks for the Help
What I did Wrong in the First instance was include the Source of all the math ( which was not a problem in my previous project ) and it was trying to build the C files. I also could not understand where to find the repository every document was refering to. Tada. and I upgraded my IDE which helps.
Robin
2021-12-08 08:39 AM
Hello @Community member,
I recommend you following the Configuring DSP libraries on STM32CubeIDE article, it should help you.
Chahinez.
2021-12-08 11:23 PM
Thanks I did follow the Document but I did not have any repository for DSP installed on my machine so was using and old projects Files from 2016. And then I eventualy managed to install them through Cube IDE.
2022-10-24 12:28 PM
Hello Robin,
could you tell me how you fixed this error.
I'm using a device very similar to yours, the model I use is the STM32L072KZT6. And when trying to include the arm_math.h library I get the same errors you reported above.
2022-10-24 01:21 PM
Present YOUR error/build log
Probably got the wrong command line defines, or pulling wrong DSP version.
2022-10-24 11:38 PM
I had to delete the Libraries I had copied from another project and Install them from the IDE in the configuration of the Micro's package manager. Then you need to set your Compile Directive's, eg I had to add #ARM_MATH_CM0PLUS = 1 ( this is done in the paths and Symbols of the Project Properties. In libraries the arm_cortexM0I_math is autonaticaly added I think. In Includes Drivers/CMSIS/DSP/Include is also added.
2022-10-25 03:43 AM
Thank you very much for your help, I read the article Configuring DSP libraries in STM32CubeIDE and saw that my error was when inserting the library as I was inserting it as libarm_cortexM4lf_math and in the article it is mentioned that it must be inserted only as arm_cortexM4lf_math.
Thank you all for your help.