微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 嵌入式设计讨论 > ARM技术讨论 > 编译问题,求大虾指点

编译问题,求大虾指点

时间:10-02 整理:3721RD 点击:
compiling myebook.c...
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h(23): error:  #256: invalid redeclaration of type name "s32" (declared at line 205 of "stm32f10x.h")
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef signed long  s32;
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                        ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h(27): error:  #256: invalid redeclaration of type name "sc32" (declared at line 209 of "stm32f10x.h")
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef signed long  const sc32;  /* Read Only */
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                              ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h(31): error:  #256: invalid redeclaration of type name "vs32" (declared at line 213 of "stm32f10x.h")
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef volatile signed long  vs32;
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                 ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h(35): error:  #256: invalid redeclaration of type name "vsc32" (declared at line 217 of "stm32f10x.h")
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef volatile signed long  const vsc32;  /* Read Only */
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                       ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h(39): error:  #256: invalid redeclaration of type name "u32" (declared at line 221 of "stm32f10x.h")
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef unsigned long  u32;
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                          ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h(43): error:  #256: invalid redeclaration of type name "uc32" (declared at line 225 of "stm32f10x.h")
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef unsigned long  const uc32;  /* Read Only */
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h(47): error:  #256: invalid redeclaration of type name "vu32" (declared at line 229 of "stm32f10x.h")
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef volatile unsigned long  vu32;
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                   ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h(51): error:  #256: invalid redeclaration of type name "vuc32" (declared at line 233 of "stm32f10x.h")
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef volatile unsigned long  const vuc32;  /* Read Only */
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                         ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h(55): error:  #101: "FALSE" has already been declared in the current scope
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {FALSE = 0, TRUE = !FALSE} bool;
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                 ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h(55): error:  #101: "TRUE" has already been declared in the current scope
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {FALSE = 0, TRUE = !FALSE} bool;
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                            ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h(55): error:  #256: invalid redeclaration of type name "bool" (declared at line 237 of "stm32f10x.h")
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {FALSE = 0, TRUE = !FALSE} bool;
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                           ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h(57): error:  #101: "RESET" has already been declared in the current scope
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                 ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h(57): error:  #101: "SET" has already been declared in the current scope
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                            ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h(57): error:  #256: invalid redeclaration of type name "FlagStatus" (declared at line 239 of "stm32f10x.h")
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                          ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h(57): error:  #256: invalid redeclaration of type name "ITStatus" (declared at line 239 of "stm32f10x.h")
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                                      ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h(59): error:  #101: "DISABLE" has already been declared in the current scope
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                 ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h(59): error:  #101: "ENABLE" has already been declared in the current scope
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                              ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h(59): error:  #256: invalid redeclaration of type name "FunctionalState" (declared at line 241 of "stm32f10x.h")
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                                 ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h(62): error:  #101: "ERROR" has already been declared in the current scope
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                 ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h(62): error:  #101: "SUCCESS" has already been declared in the current scope
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                            ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h(62): error:  #256: invalid redeclaration of type name "ErrorStatus" (declared at line 244 of "stm32f10x.h")
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                              ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\cortexm3_macro.h(30): error:  #55: too many arguments in macro invocation
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\cortexm3_macro.h:   void __ISB(void);
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\cortexm3_macro.h:              ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\cortexm3_macro.h(30): error:  #79: expected a type specifier
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\cortexm3_macro.h:   void __ISB(void);
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\cortexm3_macro.h:        ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\cortexm3_macro.h(31): error:  #55: too many arguments in macro invocation
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\cortexm3_macro.h:   void __DSB(void);
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\cortexm3_macro.h:              ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\cortexm3_macro.h(31): error:  #79: expected a type specifier
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\cortexm3_macro.h:   void __DSB(void);
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\cortexm3_macro.h:        ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\cortexm3_macro.h(32): error:  #55: too many arguments in macro invocation
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\cortexm3_macro.h:   void __DMB(void);
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\cortexm3_macro.h:              ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\cortexm3_macro.h(32): error:  #79: expected a type specifier
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\cortexm3_macro.h:   void __DMB(void);
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\cortexm3_macro.h:        ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_map.h(58): error:  #256: invalid redeclaration of type name "ADC_TypeDef" (declared at line 282 of "stm32f10x.h")
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_map.h:   } ADC_TypeDef;
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_map.h:     ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_map.h(154): error:  #256: invalid redeclaration of type name "BKP_TypeDef" (declared at line 381 of "stm32f10x.h")
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_map.h:   } BKP_TypeDef;
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_map.h:     ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_map.h(163): error:  #256: invalid redeclaration of type name "CAN_TxMailBox_TypeDef" (declared at line 393 of "stm32f10x.h")
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_map.h:   } CAN_TxMailBox_TypeDef;
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_map.h:     ^
F:\学习软件\ARM_\ARM\INC\ST\STM32F10x\stm32f10x_map.h: myebook.c: 0 warnings, 30 errors
myebook.c - 30 Error(s), 0 Warning(s).

http://blog.csdn.net/iceiilin/article/details/6100494
看一下,invalid redeclaration of type name是常见编译错误

估计是哪个头文件没调用。

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top