我按这个帖子https://blog.csdn.net/leida_wt/article/details/78727645,操作了一下,结果报错,应该怎么解决?
Build target 'ADC'
compiling main.c...
D:\mdk5\ARM\PACK\ARM\CMSIS\4.2.0\CMSIS\Include\core_cm3.h(71): warning: #47-D: incompatible redefinition of macro "__CM3_CMSIS_VERSION_MAIN" (declared at line 84 of "..\CORE\core_cm3.h")
#define __CM3_CMSIS_VERSION_MAIN (0x04) /*!< [31:16] CMSIS HAL main version */
D:\mdk5\ARM\PACK\ARM\CMSIS\4.2.0\CMSIS\Include\core_cm3.h(72): warning: #47-D: incompatible redefinition of macro "__CM3_CMSIS_VERSION_SUB" (declared at line 85 of "..\CORE\core_cm3.h")
#define __CM3_CMSIS_VERSION_SUB (0x00) /*!< [15:0] CMSIS HAL sub version */
D:\mdk5\ARM\PACK\ARM\CMSIS\4.2.0\CMSIS\Include\core_cm3.h(73): warning: #47-D: incompatible redefinition of macro "__CM3_CMSIS_VERSION" (declared at line 86 of "..\CORE\core_cm3.h")
#define __CM3_CMSIS_VERSION ((__CM3_CMSIS_VERSION_MAIN << 16) | \
D:\mdk5\ARM\PACK\ARM\CMSIS\4.2.0\CMSIS\Include\core_cmInstr.h(92): warning: #47-D: incompatible redefinition of macro "__ISB" (declared at line 772 of "..\CORE\core_cm3.h")
#define __ISB() __isb(0xF)
D:\mdk5\ARM\PACK\ARM\CMSIS\4.2.0\CMSIS\Include\core_cmInstr.h(100): warning: #47-D: incompatible redefinition of macro "__DSB" (declared at line 773 of "..\CORE\core_cm3.h")
#define __DSB() __dsb(0xF)
D:\mdk5\ARM\PACK\ARM\CMSIS\4.2.0\CMSIS\Include\core_cmInstr.h(108): warning: #47-D: incompatible redefinition of macro "__DMB" (declared at line 774 of "..\CORE\core_cm3.h")
#define __DMB() __dmb(0xF)
D:\mdk5\ARM\PACK\ARM\CMSIS\4.2.0\CMSIS\Include\core_cmInstr.h(129): error: #147-D: declaration is incompatible with "uint32_t __REV16(uint16_t)" (declared at line 838 of "..\CORE\core_cm3.h")
__attribute__((section(".rev16_text"))) __STATIC_INLINE __ASM uint32_t __REV16(uint32_t value)
D:\mdk5\ARM\PACK\ARM\CMSIS\4.2.0\CMSIS\Include\core_cmInstr.h(144): error: #147-D: declaration is incompatible with "int32_t __REVSH(int16_t)" (declared at line 848 of "..\CORE\core_cm3.h")
__attribute__((section(".revsh_text"))) __STATIC_INLINE __ASM int32_t __REVSH(int32_t value)
D:\mdk5\ARM\PACK\ARM\CMSIS\4.2.0\CMSIS\Include\core_cmInstr.h(193): warning: #47-D: incompatible redefinition of macro "__LDREXB" (declared at line 777 of "..\CORE\core_cm3.h")
#define __LDREXB(ptr) ((uint8_t ) __ldrex(ptr))
D:\mdk5\ARM\PACK\ARM\CMSIS\4.2.0\CMSIS\Include\core_cmInstr.h(203): warning: #47-D: incompatible redefinition of macro "__LDREXH" (declared at line 778 of "..\CORE\core_cm3.h")
#define __LDREXH(ptr) ((uint16_t) __ldrex(ptr))
D:\mdk5\ARM\PACK\ARM\CMSIS\4.2.0\CMSIS\Include\core_cmInstr.h(213): warning: #47-D: incompatible redefinition of macro "__LDREXW" (declared at line 779 of "..\CORE\core_cm3.h")
#define __LDREXW(ptr) ((uint32_t ) __ldrex(ptr))
D:\mdk5\ARM\PACK\ARM\CMSIS\4.2.0\CMSIS\Include\core_cmFunc.h(64): error: #247: function "__get_CONTROL" has already been defined
__STATIC_INLINE uint32_t __get_CONTROL(void)
D:\mdk5\ARM\PACK\ARM\CMSIS\4.2.0\CMSIS\Include\core_cmFunc.h(77): error: #247: function "__set_CONTROL" has already been defined
__STATIC_INLINE void __set_CONTROL(uint32_t control)
D:\mdk5\ARM\PACK\ARM\CMSIS\4.2.0\CMSIS\Include\core_cmFunc.h(181): error: #247: function "__get_PRIMASK" has already been defined
__STATIC_INLINE uint32_t __get_PRIMASK(void)
D:\mdk5\ARM\PACK\ARM\CMSIS\4.2.0\CMSIS\Include\core_cmFunc.h(194): error: #247: function "__set_PRIMASK" has already been defined
__STATIC_INLINE void __set_PRIMASK(uint32_t priMask)
D:\mdk5\ARM\PACK\ARM\CMSIS\4.2.0\CMSIS\Include\core_cmFunc.h(225): error: #247: function "__get_BASEPRI" has already been defined
__STATIC_INLINE uint32_t __get_BASEPRI(void)
D:\mdk5\ARM\PACK\ARM\CMSIS\4.2.0\CMSIS\Include\core_cmFunc.h(238): error: #247: function "__set_BASEPRI" has already been defined
__STATIC_INLINE void __set_BASEPRI(uint32_t basePri)
D:\mdk5\ARM\PACK\ARM\CMSIS\4.2.0\CMSIS\Include\core_cmFunc.h(251): error: #247: function "__get_FAULTMASK" has already been defined
__STATIC_INLINE uint32_t __get_FAULTMASK(void)
D:\mdk5\ARM\PACK\ARM\CMSIS\4.2.0\CMSIS\Include\core_cmFunc.h(264): error: #247: function "__set_FAULTMASK" has already been defined
__STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask)
main.c: 9 warnings, 10 errors
"..\OBJ\ADC.axf" - 10 Error(s), 9 Warning(s).