Error while trying to include the cmsis dsp libraries without IDE (Makefile)
Hi,
I have previously been using the CubeIDE for STM32 developement. Recently I switched to using VScode with makefiles. This has been a very positive upgrade in my opinion, but today I met a problem. I tried to include the CMSIS DSP library to my project. I use the cubeMX software to generate the makefiles for me. In my makefile I defined the following LDFLAGS:
#######################################
# LDFLAGS
#######################################
# link script
LDSCRIPT = STM32H750VBTx_FLASH.ld
# libraries
LIBS = -lc -lm -lnosys -larm_cortexM7lfsp_math
LIBDIR = -Ldsp/lib
LDFLAGS = $(MCU) -specs=nano.specs -T$(LDSCRIPT) $(LIBDIR) $(LIBS) -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref -Wl,--gc-sections -static While trying to compile I get the following error:
Drivers/CMSIS/Include/cmsis_gcc.h:1852:57: error: conflicting types for '__QSUB'
1852 | __attribute__((always_inline)) __STATIC_INLINE int32_t __QSUB( int32_t op1, int32_t op2)
| ^~~~~~
In file included from Src/model.c:22:
Drivers/CMSIS/Include/arm_math.h:5129:12: note: previous implicit declaration of '__QSUB' was here
5129 | *pIb = __QSUB(product2, product1);
| ^~~~~~I know that the code runs without problem when using CubeIDE. Appreciate any input.
