在单独的矩阵键盘中led和delay中调用了"stm32f10x.h",程序正常运行;在MINI板中led和delay中用了<stm32f10x_map.h>、<stm32f10x_nvic.h>,在加入键盘程序后,程序报错,
[mw_shl_code=c,true]compiling key2.c...
..\SYSTEM\sys\stm32f10x_type.h(23): error: #256: invalid redeclaration of type name "s32" (declared at line 312 of "d:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
..\SYSTEM\sys\stm32f10x_type.h(27): error: #256: invalid redeclaration of type name "sc32" (declared at line 316 of "d:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
..\SYSTEM\sys\stm32f10x_type.h(31): error: #256: invalid redeclaration of type name "vs32" (declared at line 320 of "d:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
..\SYSTEM\sys\stm32f10x_type.h(35): error: #256: invalid redeclaration of type name "vsc32" (declared at line 324 of "d:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
..\SYSTEM\sys\stm32f10x_type.h(39): error: #256: invalid redeclaration of type name "u32" (declared at line 328 of "d:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
..\SYSTEM\sys\stm32f10x_type.h(43): error: #256: invalid redeclaration of type name "uc32" (declared at line 332 of "d:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
..\SYSTEM\sys\stm32f10x_type.h(47): error: #256: invalid redeclaration of type name "vu32" (declared at line 336 of "d:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
..\SYSTEM\sys\stm32f10x_type.h(51): error: #256: invalid redeclaration of type name "vuc32" (declared at line 340 of "d:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
..\SYSTEM\sys\stm32f10x_type.h(55): error: #101: "FALSE" has already been declared in the current scope
..\SYSTEM\sys\stm32f10x_type.h(55): error: #101: "TRUE" has already been declared in the current scope
..\SYSTEM\sys\stm32f10x_type.h(55): error: #256: invalid redeclaration of type name "bool" (declared at line 345 of "d:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
..\SYSTEM\sys\stm32f10x_type.h(57): error: #101: "RESET" has already been declared in the current scope
..\SYSTEM\sys\stm32f10x_type.h(57): error: #101: "SET" has already been declared in the current scope
..\SYSTEM\sys\stm32f10x_type.h(57): error: #256: invalid redeclaration of type name "FlagStatus" (declared at line 348 of "d:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
..\SYSTEM\sys\stm32f10x_type.h(57): error: #256: invalid redeclaration of type name "ITStatus" (declared at line 348 of "d:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
..\SYSTEM\sys\stm32f10x_type.h(59): error: #101: "DISABLE" has already been declared in the current scope
..\SYSTEM\sys\stm32f10x_type.h(59): error: #101: "ENABLE" has already been declared in the current scope
..\SYSTEM\sys\stm32f10x_type.h(59): error: #256: invalid redeclaration of type name "FunctionalState" (declared at line 350 of "d:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
..\SYSTEM\sys\stm32f10x_type.h(62): error: #101: "ERROR" has already been declared in the current scope
..\SYSTEM\sys\stm32f10x_type.h(62): error: #101: "SUCCESS" has already been declared in the current scope
..\SYSTEM\sys\stm32f10x_type.h(62): error: #256: invalid redeclaration of type name "ErrorStatus" (declared at line 353 of "d:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
..\SYSTEM\sys\stm32f10x_conf.h(147): warning: #47-D: incompatible redefinition of macro "HSE_Value" (declared at line 83 of "d:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
..\SYSTEM\sys\cortexm3_macro.h(30): error: #55: too many arguments in macro invocation
..\SYSTEM\sys\cortexm3_macro.h(30): error: #79: expected a type specifier
..\SYSTEM\sys\cortexm3_macro.h(31): error: #55: too many arguments in macro invocation
..\SYSTEM\sys\cortexm3_macro.h(31): error: #79: expected a type specifier
..\SYSTEM\sys\cortexm3_macro.h(32): error: #55: too many arguments in macro invocation
..\SYSTEM\sys\cortexm3_macro.h(32): error: #79: expected a type specifier
..\SYSTEM\sys\stm32f10x_map.h(58): error: #256: invalid redeclaration of type name "ADC_TypeDef" (declared at line 389 of "d:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
..\SYSTEM\sys\stm32f10x_map.h(154): error: #256: invalid redeclaration of type name "BKP_TypeDef" (declared at line 488 of "d:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
..\SYSTEM\sys\stm32f10x_map.h(163): error: #256: invalid redeclaration of type name "CAN_TxMailBox_TypeDef" (declared at line 500 of "d:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")
Target not created[/mw_shl_code]
找不到解决方法,原子哥救命!!
|