新手入门
- 积分
- 31
- 金钱
- 31
- 注册时间
- 2012-10-24
- 在线时间
- 0 小时
|
我用的MDK4.12 打开板子自带的源程序,编译没问题。我自己新建了一个新的程序,根源程序除了工程名不一样,其他都一样,各种报错啊,求帮助。。。
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(312): error: #256: invalid redeclaration of type name "s32" (declared at line 23 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h") D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: typedef int32_t s32; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(316): error: #256: invalid redeclaration of type name "sc32" (declared at line 27 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h") D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: typedef const int32_t sc32; /*!< Read Only */ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(320): error: #256: invalid redeclaration of type name "vs32" (declared at line 31 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h") D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: typedef __IO int32_t vs32; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(324): error: #256: invalid redeclaration of type name "vsc32" (declared at line 35 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h") D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: typedef __I int32_t vsc32; /*!< Read Only */ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(328): error: #256: invalid redeclaration of type name "u32" (declared at line 39 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h") D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: typedef uint32_t u32; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(332): error: #256: invalid redeclaration of type name "uc32" (declared at line 43 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h") D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: typedef const uint32_t uc32; /*!< Read Only */ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(336): error: #256: invalid redeclaration of type name "vu32" (declared at line 47 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h") D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: typedef __IO uint32_t vu32; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(340): error: #256: invalid redeclaration of type name "vuc32" (declared at line 51 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h") D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: typedef __I uint32_t vuc32; /*!< Read Only */ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(345): error: #101: "FALSE" has already been declared in the current scope D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: typedef enum {FALSE = 0, TRUE = !FALSE} bool; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(345): error: #101: "TRUE" has already been declared in the current scope D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: typedef enum {FALSE = 0, TRUE = !FALSE} bool; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(345): error: #256: invalid redeclaration of type name "bool" (declared at line 55 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h") D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: typedef enum {FALSE = 0, TRUE = !FALSE} bool; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(348): error: #101: "RESET" has already been declared in the current scope D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(348): error: #101: "SET" has already been declared in the current scope D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(348): error: #256: invalid redeclaration of type name "FlagStatus" (declared at line 57 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h") D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(348): error: #256: invalid redeclaration of type name "ITStatus" (declared at line 57 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h") D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(350): error: #101: "DISABLE" has already been declared in the current scope D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(350): error: #101: "ENABLE" has already been declared in the current scope D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(350): error: #256: invalid redeclaration of type name "FunctionalState" (declared at line 59 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h") D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(353): error: #101: "ERROR" has already been declared in the current scope D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(353): error: #101: "SUCCESS" has already been declared in the current scope D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(353): error: #256: invalid redeclaration of type name "ErrorStatus" (declared at line 62 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h") D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(389): error: #256: invalid redeclaration of type name "ADC_TypeDef" (declared at line 58 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h") D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: } ADC_TypeDef; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(488): error: #256: invalid redeclaration of type name "BKP_TypeDef" (declared at line 154 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h") D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: } BKP_TypeDef; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(500): error: #256: invalid redeclaration of type name "CAN_TxMailBox_TypeDef" (declared at line 163 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h") D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: } CAN_TxMailBox_TypeDef; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(512): error: #256: invalid redeclaration of type name "CAN_FIFOMailBox_TypeDef" (declared at line 171 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h") D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: } CAN_FIFOMailBox_TypeDef; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(522): error: #256: invalid redeclaration of type name "CAN_FilterRegister_TypeDef" (declared at line 177 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h") D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: } CAN_FilterRegister_TypeDef; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(556): error: #256: invalid redeclaration of type name "CAN_TypeDef" (declared at line 203 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h") D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: } CAN_TypeDef; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(569): error: #256: invalid redeclaration of type name "CRC_TypeDef" (declared at line 213 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h") D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: } CRC_TypeDef; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(590): error: #256: invalid redeclaration of type name "DAC_TypeDef" (declared at line 232 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h") D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: } DAC_TypeDef; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h(600): error: #256: invalid redeclaration of type name "DBGMCU_TypeDef" (declared at line 239 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h") D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: }DBGMCU_TypeDef; D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: ^ D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h: test.c: 0 warnings, 30 errors
|
|