2017-06-19 03:02 AM
Hello there
Can I compile the DSP library with STM32F103C8 device. I would like to import FFT using DSP library with this chip. But I get many errors when I compile the library.
compiling main.c...
.\Library\DSP Library\Include\core_cm3.h(74): warning: &sharp47-D: incompatible redefinition of macro '__CM3_CMSIS_VERSION_MAIN' (declared at line 84 of '.\Library\CMSIS\CM3\CoreSupport\core_cm3.h') &sharpdefine __CM3_CMSIS_VERSION_MAIN (0x04U) /*!< [31:16] CMSIS HAL main version */.\Library\DSP Library\Include\core_cm3.h(79): warning: &sharp47-D: incompatible redefinition of macro '__CORTEX_M' (declared at line 88 of '.\Library\CMSIS\CM3\CoreSupport\core_cm3.h') &sharpdefine __CORTEX_M (0x03U) /*!< Cortex-M Core */.\Library\DSP Library\Include\cmsis_armcc.h(57): error: &sharp247: function '__get_CONTROL' has already been defined __STATIC_INLINE uint32_t __get_CONTROL(void).\Library\DSP Library\Include\cmsis_armcc.h(69): error: &sharp247: function '__set_CONTROL' has already been defined __STATIC_INLINE void __set_CONTROL(uint32_t control).\Library\DSP Library\Include\cmsis_armcc.h(165): error: &sharp247: function '__get_PRIMASK' has already been defined __STATIC_INLINE uint32_t __get_PRIMASK(void).\Library\DSP Library\Include\cmsis_armcc.h(177): error: &sharp247: function '__set_PRIMASK' has already been defined __STATIC_INLINE void __set_PRIMASK(uint32_t priMask).\Library\DSP Library\Include\cmsis_armcc.h(207): error: &sharp247: function '__get_BASEPRI' has already been defined __STATIC_INLINE uint32_t __get_BASEPRI(void).\Library\DSP Library\Include\cmsis_armcc.h(219): error: &sharp247: function '__set_BASEPRI' has already been defined __STATIC_INLINE void __set_BASEPRI(uint32_t basePri).\Library\DSP Library\Include\cmsis_armcc.h(244): error: &sharp247: function '__get_FAULTMASK' has already been defined __STATIC_INLINE uint32_t __get_FAULTMASK(void).\Library\DSP Library\Include\cmsis_armcc.h(256): error: &sharp247: function '__set_FAULTMASK' has already been defined __STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask).\Library\DSP Library\Include\cmsis_armcc.h(344): warning: &sharp47-D: incompatible redefinition of macro '__ISB' (declared at line 772 of '.\Library\CMSIS\CM3\CoreSupport\core_cm3.h') &sharpdefine __ISB() do {\.\Library\DSP Library\Include\cmsis_armcc.h(355): warning: &sharp47-D: incompatible redefinition of macro '__DSB' (declared at line 773 of '.\Library\CMSIS\CM3\CoreSupport\core_cm3.h') &sharpdefine __DSB() do {\.\Library\DSP Library\Include\cmsis_armcc.h(366): warning: &sharp47-D: incompatible redefinition of macro '__DMB' (declared at line 774 of '.\Library\CMSIS\CM3\CoreSupport\core_cm3.h') &sharpdefine __DMB() do {\.\Library\DSP Library\Include\cmsis_armcc.h(388): error: &sharp147-D: declaration is incompatible with 'uint32_t __REV16(uint16_t)' (declared at line 838 of '.\Library\CMSIS\CM3\CoreSupport\core_cm3.h') __attribute__((section('.rev16_text'))) __STATIC_INLINE __ASM uint32_t __REV16(uint32_t value).\Library\DSP Library\Include\cmsis_armcc.h(402): error: &sharp147-D: declaration is incompatible with 'int32_t __REVSH(int16_t)' (declared at line 848 of '.\Library\CMSIS\CM3\CoreSupport\core_cm3.h') __attribute__((section('.revsh_text'))) __STATIC_INLINE __ASM int32_t __REVSH(int32_t value).\Library\DSP Library\Include\cmsis_armcc.h(477): warning: &sharp47-D: incompatible redefinition of macro '__LDREXB' (declared at line 777 of '.\Library\CMSIS\CM3\CoreSupport\core_cm3.h') &sharpdefine __LDREXB(ptr) _Pragma('push') _Pragma('diag_suppress 3731') ((uint8_t ) __ldrex(ptr)) _Pragma('pop').\Library\DSP Library\Include\cmsis_armcc.h(490): warning: &sharp47-D: incompatible redefinition of macro '__LDREXH' (declared at line 778 of '.\Library\CMSIS\CM3\CoreSupport\core_cm3.h') &sharpdefine __LDREXH(ptr) _Pragma('push') _Pragma('diag_suppress 3731') ((uint16_t) __ldrex(ptr)) _Pragma('pop').\Library\DSP Library\Include\cmsis_armcc.h(503): warning: &sharp47-D: incompatible redefinition of macro '__LDREXW' (declared at line 779 of '.\Library\CMSIS\CM3\CoreSupport\core_cm3.h') &sharpdefine __LDREXW(ptr) _Pragma('push') _Pragma('diag_suppress 3731') ((uint32_t ) __ldrex(ptr)) _Pragma('pop').\Library\DSP Library\Include\cmsis_armcc.h(518): warning: &sharp47-D: incompatible redefinition of macro '__STREXB' (declared at line 780 of '.\Library\CMSIS\CM3\CoreSupport\core_cm3.h') &sharpdefine __STREXB(value, ptr) _Pragma('push') _Pragma('diag_suppress 3731') __strex(value, ptr) _Pragma('pop').\Library\DSP Library\Include\cmsis_armcc.h(533): warning: &sharp47-D: incompatible redefinition of macro '__STREXH' (declared at line 781 of '.\Library\CMSIS\CM3\CoreSupport\core_cm3.h') &sharpdefine __STREXH(value, ptr) _Pragma('push') _Pragma('diag_suppress 3731') __strex(value, ptr) _Pragma('pop').\Library\DSP Library\Include\cmsis_armcc.h(548): warning: &sharp47-D: incompatible redefinition of macro '__STREXW' (declared at line 782 of '.\Library\CMSIS\CM3\CoreSupport\core_cm3.h') &sharpdefine __STREXW(value, ptr) _Pragma('push') _Pragma('diag_suppress 3731') __strex(value, ptr) _Pragma('pop')User\main.c: 13 warnings, 10 errors'.\Objects\FFT.axf' - 10 Error(s), 11 Warning(s).I added the project. What could be the problem?
Thanks
#dsp-libraries #stm32 #stm32f10x #dsp2017-06-20 12:10 AM
This is likely a compatibility problem between the CMSIS driver revision, the HAL revision, the Compiler revision.
please let us know which compiler and which versions you are using (HAL, CMSIS, Compiler...)
2017-06-20 01:28 AM
No, I'dont using CMSIS HAL Driver, I'm using STD periph driver.
CMSIS version V1.20
http://www.st.com/en/embedded-software/stsw-stm32054.html
(last version)Compiler Keil MDK ARM 5.23
What exactly do I have to do?
2017-06-23 03:46 AM
hi
does anyone have an idea? I can't compiling the DSP library.
2017-06-23 04:05 AM
.\Library\DSP Library\Include\
core_cm3.h
(74): warning: ♯ 47-D: incompatible redefinition of macro '__CM3_CMSIS_VERSION_MAIN' (declared at line 84 of '.\Library\CMSIS\CM3\CoreSupport\core_cm3.h')AFAIK, the DSP lib comes with it's own includes. Thus Max's answer seems on the right path.
I had similar problems after creating projects, when the IDE (CrossWorks) automatically added the paths to it's own (and latest) version of of the CMSIS includes to the include search path list.
I used to remove these search paths, and pointed to the CMSIS includes within the DSP lib itself.