【MCU】MDK错误:error in include chain (cmsis_armcc.h):expected identifier or ‘(‘

MDK错误:error in include chain (cmsis_armcc.h):expected identifier or '('

解决方法:

MDK安装目录/UV4/UVCC.ini文件中,添加如下代码

cmsis_armcc.h   = *

官网解决方法:http://www.keil.com/support/docs/3787.htm

../Middlewares/ST/ARM/DSP/Inc/arm_math.h(1132): warning: #47-D: incompatible redefinition of macro "__PKHBT" (declared at line 852 of "../Drivers/CMSIS/Include/cmsis_armcc.h") #define __PKHBT(ARG1, ARG2, ARG3) ( (((int32_t)(ARG1) << 0) & (int32_t)0x0000FFFF) | \ ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(1134): warning: #47-D: incompatible redefinition of macro "__PKHTB" (declared at line 855 of "../Drivers/CMSIS/Include/cmsis_armcc.h") #define __PKHTB(ARG1, ARG2, ARG3) ( (((int32_t)(ARG1) << 0) & (int32_t)0xFFFF0000) | \ ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(1735): error: #79: expected a type specifier __STATIC_FORCEINLINE int32_t __SMMLA( ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(1735): error: #101: "int32_t" has already been declared in the current scope __STATIC_FORCEINLINE int32_t __SMMLA( ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(1735): error: #141-D: unnamed prototyped parameters not allowed when body is present __STATIC_FORCEINLINE int32_t __SMMLA( ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(1740): error: #20: identifier "sum" is undefined return (sum + (int32_t) (((int64_t) x * y) >> 32)); ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(1740): error: #20: identifier "x" is undefined return (sum + (int32_t) (((int64_t) x * y) >> 32)); ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(1740): error: #20: identifier "y" is undefined return (sum + (int32_t) (((int64_t) x * y) >> 32)); ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(2680): error: #757: function "int32_t" is not a type name int32_t shift, ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(2695): error: #757: function "int32_t" is not a type name int32_t shift, ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(2793): error: #757: function "int32_t" is not a type name int32_t resetStateFlag); ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(2811): error: #757: function "int32_t" is not a type name int32_t resetStateFlag); ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(2830): error: #757: function "int32_t" is not a type name int32_t resetStateFlag); ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(5532): error: #757: function "int32_t" is not a type name int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */ ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(5545): error: #757: function "int32_t" is not a type name int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */ ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(5558): error: #757: function "int32_t" is not a type name int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */ ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(5571): error: #757: function "int32_t" is not a type name int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */ ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(5606): error: #757: function "int32_t" is not a type name int32_t * pTapDelay, ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(5642): error: #757: function "int32_t" is not a type name int32_t * pTapDelay, ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(5680): error: #757: function "int32_t" is not a type name int32_t * pTapDelay, ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(5718): error: #757: function "int32_t" is not a type name int32_t * pTapDelay, ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6491): warning: #174-D: expression has no effect int32_t i; /* Index variable */ ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6491): error: #65: expected a ";" int32_t i; /* Index variable */ ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6495): error: #20: identifier "i" is undefined i = (int32_t) ((x - S->x1) / xSpacing); ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6548): warning: #174-D: expression has no effect int32_t index; /* Index to read nearest output values */ ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6548): error: #65: expected a ";" int32_t index; /* Index to read nearest output values */ ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6553): error: #20: identifier "index" is undefined index = ((x & (q31_t)0xFFF00000) >> 20); ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6606): warning: #174-D: expression has no effect int32_t index; /* Index to read nearest output values */ ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6606): error: #65: expected a ";" int32_t index; /* Index to read nearest output values */ ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6611): error: #20: identifier "index" is undefined index = ((x & (int32_t)0xFFF00000) >> 20); ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6611): error: #31: expression must have integral type index = ((x & (int32_t)0xFFF00000) >> 20); ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6611): error: #18: expected a ")" index = ((x & (int32_t)0xFFF00000) >> 20); ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6911): error: #757: function "int32_t" is not a type name int32_t * circBuffer, ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6912): error: #757: function "int32_t" is not a type name int32_t L, ../Middlewares/ST/ARM/DSP/Inc/arm_math.h(6914): error: #757: function "int32_t" is not a type name int32_t bufferInc, ..\User\modules\master_process.c: 5 warnings, 30 errors
06-07
Rebuild started: Project: fy_ecu_a009_10f_1key_3led *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\Keil\Leil5\ARM\ARMCC\Bin' Rebuild target 'N32G43x' assembling startup_n32g43x.s... compiling misc.c... compiling n32g43x_pwr.c... compiling system_n32g43x.c... compiling n32g43x_lpuart.c... compiling n32g43x_gpio.c... compiling n32g43x_adc.c... compiling n32g43x_flash.c... compiling n32g43x_usart.c... compiling n32g43x_rcc.c... compiling n32g43x_exti.c... compiling n32g43x_tim.c... compiling util.c... compiling n32g43x_wwdg.c... compiling main.c... compiling n32g43x_it.c... compiling sys_var.c... compiling bsp.c... compiling app.c... ..\src\app.c(1): error: #169: expected a declaration ..\src\app.c(1): error: #10: "#" not expected here ..\firmware\CMSIS\core\core_cm4.h(1688): error: #20: identifier "IRQn_Type" is undefined __STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) ..\firmware\CMSIS\core\core_cm4.h(1705): error: #20: identifier "IRQn_Type" is undefined __STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) ..\firmware\CMSIS\core\core_cm4.h(1724): error: #20: identifier "IRQn_Type" is undefined __STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) ..\firmware\CMSIS\core\core_cm4.h(1743): error: #20: identifier "IRQn_Type" is undefined __STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) ..\firmware\CMSIS\core\core_cm4.h(1762): error: #20: identifier "IRQn_Type" is undefined __STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) ..\firmware\CMSIS\core\core_cm4.h(1777): error: #20: identifier "IRQn_Type" is undefined __STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) ..\firmware\CMSIS\core\core_cm4.h(1794): error: #20: identifier "IRQn_Type" is undefined __STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) ..\firmware\CMSIS\core\core_cm4.h(1816): error: #20: identifier "IRQn_Type" is undefined __STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) ..\firmware\CMSIS\core\core_cm4.h(1838): error: #20: identifier "IRQn_Type" is undefined __STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) ..\firmware\CMSIS\core\core_cm4.h(1913): error: #20: identifier "IRQn_Type" is undefined __STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) ..\firmware\CMSIS\core\core_cm4.h(1928): error: #20: identifier "IRQn_Type" is undefined __STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) ..\firmware\CMSIS\core\core_cm4.h(2030): error: #20: identifier "SysTick_IRQn" is undefined NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ ..\src\app.c: 0 warnings, 14 errors compiling key.c... ".\Objects\fy_ecu_a009_10f_1key_3led.axf" - 14 Error(s), 0 Warning(s). Target not created. Build Time Elapsed: 00:00:05翻译
最新发布
10-14
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值