OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 2244|回复: 2

编译产生error:??#256: invalid redeclaration of type name "s32",如何解决?

[复制链接]

10

主题

32

帖子

0

精华

初级会员

Rank: 2

积分
131
金钱
131
注册时间
2017-3-17
在线时间
38 小时
发表于 2017-4-15 15:57:37 | 显示全部楼层 |阅读模式
1金钱
Build target 'Template'
compiling stm32f10x_tim.c...
compiling stm32f10x_usart.c...
compiling delay.c...
compiling sys.c...
compiling usart.c...
compiling gps.c...
compiling usart3.c...
..\HARDWARE\USART3\usart3.c(43): warning:  #223-D: function "TIM_SetCounter" declared implicitly
..\HARDWARE\USART3\usart3.c:                            TIM_SetCounter(TIM7,0);//计数器清空                                     //计数器清空
..\HARDWARE\USART3\usart3.c:                            ^
..\HARDWARE\USART3\usart3.c(46): warning:  #223-D: function "TIM_Cmd" declared implicitly
..\HARDWARE\USART3\usart3.c:                                    TIM_Cmd(TIM7,ENABLE);//使能定时器7
..\HARDWARE\USART3\usart3.c:                                    ^
..\HARDWARE\USART3\usart3.c(108): warning:  #223-D: function "TIM_Cmd" declared implicitly
..\HARDWARE\USART3\usart3.c:    TIM_Cmd(TIM7,DISABLE);                  //关闭定时器7
..\HARDWARE\USART3\usart3.c:    ^
..\HARDWARE\USART3\usart3.c: ..\HARDWARE\USART3\usart3.c: 3 warnings, 0 errors
compiling timer.c...
..\HARDWARE\TIMER\timer.c(21): warning:  #223-D: function "TIM_GetITStatus" declared implicitly
..\HARDWARE\TIMER\timer.c:      if (TIM_GetITStatus(TIM7, TIM_IT_Update) != RESET)//是更新中断
..\HARDWARE\TIMER\timer.c:          ^
..\HARDWARE\TIMER\timer.c(21): error:  #20: identifier "TIM_IT_Update" is undefined
..\HARDWARE\TIMER\timer.c:      if (TIM_GetITStatus(TIM7, TIM_IT_Update) != RESET)//是更新中断
..\HARDWARE\TIMER\timer.c:                                ^
..\HARDWARE\TIMER\timer.c(24): warning:  #223-D: function "TIM_ClearITPendingBit" declared implicitly
..\HARDWARE\TIMER\timer.c:              TIM_ClearITPendingBit(TIM7, TIM_IT_Update  );  //清除TIM7更新中断标志   
..\HARDWARE\TIMER\timer.c:              ^
..\HARDWARE\TIMER\timer.c(25): warning:  #223-D: function "TIM_Cmd" declared implicitly
..\HARDWARE\TIMER\timer.c:              TIM_Cmd(TIM7, DISABLE);  //关闭TIM7
..\HARDWARE\TIMER\timer.c:              ^
..\HARDWARE\TIMER\timer.c(42): error:  #20: identifier "TIM_TimeBaseInitTypeDef" is undefined
..\HARDWARE\TIMER\timer.c:      TIM_TimeBaseInitTypeDef  TIM_TimeBaseStructure;
..\HARDWARE\TIMER\timer.c:      ^
..\HARDWARE\TIMER\timer.c(49): error:  #20: identifier "TIM_CKD_DIV1" is undefined
..\HARDWARE\TIMER\timer.c:      TIM_TimeBaseStructure.TIM_ClockDivision = TIM_CKD_DIV1; //设置时钟分割:TDTS = Tck_tim
..\HARDWARE\TIMER\timer.c:                                                ^
..\HARDWARE\TIMER\timer.c(50): error:  #20: identifier "TIM_CounterMode_Up" is undefined
..\HARDWARE\TIMER\timer.c:      TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;  //TIM向上计数模式
..\HARDWARE\TIMER\timer.c:                                              ^
..\HARDWARE\TIMER\timer.c(51): warning:  #223-D: function "TIM_TimeBaseInit" declared implicitly
..\HARDWARE\TIMER\timer.c:      TIM_TimeBaseInit(TIM7, &TIM_TimeBaseStructure); //根据指定的参数初始化TIMx的时间基数单位
..\HARDWARE\TIMER\timer.c:      ^
..\HARDWARE\TIMER\timer.c(53): warning:  #223-D: function "TIM_ITConfig" declared implicitly
..\HARDWARE\TIMER\timer.c:      TIM_ITConfig(TIM7,TIM_IT_Update,ENABLE ); //使能指定的TIM7中断,允许更新中断
..\HARDWARE\TIMER\timer.c:      ^
..\HARDWARE\TIMER\timer.c(53): error:  #20: identifier "TIM_IT_Update" is undefined
..\HARDWARE\TIMER\timer.c:      TIM_ITConfig(TIM7,TIM_IT_Update,ENABLE ); //使能指定的TIM7中断,允许更新中断
..\HARDWARE\TIMER\timer.c:                        ^
..\HARDWARE\TIMER\timer.c(55): warning:  #223-D: function "TIM_Cmd" declared implicitly
..\HARDWARE\TIMER\timer.c:      TIM_Cmd(TIM7,ENABLE);//开启定时器7
..\HARDWARE\TIMER\timer.c:      ^
..\HARDWARE\TIMER\timer.c: ..\HARDWARE\TIMER\timer.c: 6 warnings, 5 errors
compiling led.c...
compiling key.c...
compiling usmart.c...
..\CORE\core_cm3.h(715): warning:  #47-D: incompatible redefinition of macro "SCS_BASE" (declared at line 687 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\CORE\core_cm3.h:   #define SCS_BASE            (0xE000E000)                              /*!< System Control Space Base Address */
..\CORE\core_cm3.h:           ^
..\CORE\core_cm3.h(723): warning:  #47-D: incompatible redefinition of macro "SCB" (declared at line 935 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\CORE\core_cm3.h:   #define SCB                 ((SCB_Type *)           SCB_BASE)         /*!< SCB configuration struct          */
..\CORE\core_cm3.h:           ^
..\CORE\core_cm3.h(724): warning:  #47-D: incompatible redefinition of macro "SysTick" (declared at line 930 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\CORE\core_cm3.h:   #define SysTick             ((SysTick_Type *)       SysTick_BASE)     /*!< SysTick configuration struct      */
..\CORE\core_cm3.h:           ^
..\CORE\core_cm3.h(725): warning:  #47-D: incompatible redefinition of macro "NVIC" (declared at line 934 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\CORE\core_cm3.h:   #define NVIC                ((NVIC_Type *)          NVIC_BASE)        /*!< NVIC configuration struct         */
..\CORE\core_cm3.h:           ^
..\USER\stm32f10x.h(488): error:  #256: invalid redeclaration of type name "s32" (declared at line 23 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h:   typedef int32_t  s32;
..\USER\stm32f10x.h:                    ^
..\USER\stm32f10x.h(492): error:  #256: invalid redeclaration of type name "sc32" (declared at line 27 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h:   typedef const int32_t sc32;  /*!< Read Only */
..\USER\stm32f10x.h:                         ^
..\USER\stm32f10x.h(496): error:  #256: invalid redeclaration of type name "vs32" (declared at line 31 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h:   typedef __IO int32_t  vs32;
..\USER\stm32f10x.h:                         ^
..\USER\stm32f10x.h(500): error:  #256: invalid redeclaration of type name "vsc32" (declared at line 35 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h:   typedef __I int32_t vsc32;  /*!< Read Only */
..\USER\stm32f10x.h:                       ^
..\USER\stm32f10x.h(504): error:  #256: invalid redeclaration of type name "u32" (declared at line 39 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h:   typedef uint32_t  u32;
..\USER\stm32f10x.h:                     ^
..\USER\stm32f10x.h(508): error:  #256: invalid redeclaration of type name "uc32" (declared at line 43 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h:   typedef const uint32_t uc32;  /*!< Read Only */
..\USER\stm32f10x.h:                          ^
..\USER\stm32f10x.h(512): error:  #256: invalid redeclaration of type name "vu32" (declared at line 47 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h:   typedef __IO uint32_t  vu32;
..\USER\stm32f10x.h:                          ^
..\USER\stm32f10x.h(516): error:  #256: invalid redeclaration of type name "vuc32" (declared at line 51 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h:   typedef __I uint32_t vuc32;  /*!< Read Only */
..\USER\stm32f10x.h:                        ^
..\USER\stm32f10x.h(520): error:  #101: "RESET" has already been declared in the current scope
..\USER\stm32f10x.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
..\USER\stm32f10x.h:                 ^
..\USER\stm32f10x.h(520): error:  #101: "SET" has already been declared in the current scope
..\USER\stm32f10x.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
..\USER\stm32f10x.h:                            ^
..\USER\stm32f10x.h(520): error:  #256: invalid redeclaration of type name "FlagStatus" (declared at line 57 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
..\USER\stm32f10x.h:                                          ^
..\USER\stm32f10x.h(520): error:  #256: invalid redeclaration of type name "ITStatus" (declared at line 57 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
..\USER\stm32f10x.h:                                                      ^
..\USER\stm32f10x.h(522): error:  #101: "DISABLE" has already been declared in the current scope
..\USER\stm32f10x.h:   typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
..\USER\stm32f10x.h:                 ^
..\USER\stm32f10x.h(522): error:  #101: "ENABLE" has already been declared in the current scope
..\USER\stm32f10x.h:   typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
..\USER\stm32f10x.h:                              ^
..\USER\stm32f10x.h(522): error:  #256: invalid redeclaration of type name "FunctionalState" (declared at line 59 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h:   typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
..\USER\stm32f10x.h:                                                 ^
..\USER\stm32f10x.h(525): error:  #101: "ERROR" has already been declared in the current scope
..\USER\stm32f10x.h:   typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
..\USER\stm32f10x.h:                 ^
..\USER\stm32f10x.h(525): error:  #101: "SUCCESS" has already been declared in the current scope
..\USER\stm32f10x.h:   typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
..\USER\stm32f10x.h:                            ^
..\USER\stm32f10x.h(525): error:  #256: invalid redeclaration of type name "ErrorStatus" (declared at line 62 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h:   typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
..\USER\stm32f10x.h:                                              ^
..\USER\stm32f10x.h(529): warning:  #47-D: incompatible redefinition of macro "HSE_Value" (declared at line 147 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_conf.h")
..\USER\stm32f10x.h:   #define HSE_Value            HSE_VALUE
..\USER\stm32f10x.h:           ^
..\USER\stm32f10x.h(565): error:  #256: invalid redeclaration of type name "ADC_TypeDef" (declared at line 58 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h:   } ADC_TypeDef;
..\USER\stm32f10x.h:     ^
..\USER\stm32f10x.h(664): error:  #256: invalid redeclaration of type name "BKP_TypeDef" (declared at line 154 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h:   } BKP_TypeDef;
..\USER\stm32f10x.h:     ^
..\USER\stm32f10x.h(676): error:  #256: invalid redeclaration of type name "CAN_TxMailBox_TypeDef" (declared at line 163 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h:   } CAN_TxMailBox_TypeDef;
..\USER\stm32f10x.h:     ^
..\USER\stm32f10x.h(688): error:  #256: invalid redeclaration of type name "CAN_FIFOMailBox_TypeDef" (declared at line 171 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h:   } CAN_FIFOMailBox_TypeDef;
..\USER\stm32f10x.h:     ^
..\USER\stm32f10x.h(698): error:  #256: invalid redeclaration of type name "CAN_FilterRegister_TypeDef" (declared at line 177 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h:   } CAN_FilterRegister_TypeDef;
..\USER\stm32f10x.h:     ^
..\USER\stm32f10x.h(732): error:  #256: invalid redeclaration of type name "CAN_TypeDef" (declared at line 203 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h:   } CAN_TypeDef;
..\USER\stm32f10x.h:     ^
..\USER\stm32f10x.h(759): error:  #256: invalid redeclaration of type name "CRC_TypeDef" (declared at line 213 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h:   } CRC_TypeDef;
..\USER\stm32f10x.h:     ^
..\USER\stm32f10x.h(783): error:  #256: invalid redeclaration of type name "DAC_TypeDef" (declared at line 232 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h:   } DAC_TypeDef;
..\USER\stm32f10x.h:     ^
..\USER\stm32f10x.h(793): error:  #256: invalid redeclaration of type name "DBGMCU_TypeDef" (declared at line 239 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h:   }DBGMCU_TypeDef;
..\USER\stm32f10x.h:    ^
..\USER\stm32f10x.h(805): error:  #256: invalid redeclaration of type name "DMA_Channel_TypeDef" (declared at line 248 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h:   } DMA_Channel_TypeDef;
..\USER\stm32f10x.h:     ^
..\USER\stm32f10x.h(811): error:  #256: invalid redeclaration of type name "DMA_TypeDef" (declared at line 254 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h:   } DMA_TypeDef;
..\USER\stm32f10x.h:     ^
..\USER\stm32f10x.h(896): error:  #256: invalid redeclaration of type name "EXTI_TypeDef" (declared at line 265 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h:   } EXTI_TypeDef;
..\USER\stm32f10x.h:     ^
..\USER\stm32f10x.h: ..\USMART\usmart.c: 5 warnings, 30 errors
compiling usmart_config.c...
..\CORE\core_cm3.h(715): warning:  #47-D: incompatible redefinition of macro "SCS_BASE" (declared at line 687 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\CORE\core_cm3.h:   #define SCS_BASE            (0xE000E000)                              /*!< System Control Space Base Address */
..\CORE\core_cm3.h:           ^
..\CORE\core_cm3.h(723): warning:  #47-D: incompatible redefinition of macro "SCB" (declared at line 935 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\CORE\core_cm3.h:   #define SCB                 ((SCB_Type *)           SCB_BASE)         /*!< SCB configuration struct          */
..\CORE\core_cm3.h:           ^
..\CORE\core_cm3.h(724): warning:  #47-D: incompatible redefinition of macro "SysTick" (declared at line 930 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\CORE\core_cm3.h:   #define SysTick             ((SysTick_Type *)       SysTick_BASE)     /*!< SysTick configuration struct      */
..\CORE\core_cm3.h:           ^
..\CORE\core_cm3.h(725): warning:  #47-D: incompatible redefinition of macro "NVIC" (declared at line 934 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\CORE\core_cm3.h:   #define NVIC                ((NVIC_Type *)          NVIC_BASE)        /*!< NVIC configuration struct         */
..\CORE\core_cm3.h:           ^
..\USER\stm32f10x.h(488): error:  #256: invalid redeclaration of type name "s32" (declared at line 23 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h:   typedef int32_t  s32;
..\USER\stm32f10x.h:                    ^
..\USER\stm32f10x.h(492): error:  #256: invalid redeclaration of type name "sc32" (declared at line 27 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h:   typedef const int32_t sc32;  /*!< Read Only */
..\USER\stm32f10x.h:                         ^
..\USER\stm32f10x.h(496): error:  #256: invalid redeclaration of type name "vs32" (declared at line 31 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h:   typedef __IO int32_t  vs32;
..\USER\stm32f10x.h:                         ^
..\USER\stm32f10x.h(500): error:  #256: invalid redeclaration of type name "vsc32" (declared at line 35 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h:   typedef __I int32_t vsc32;  /*!< Read Only */
..\USER\stm32f10x.h:                       ^
..\USER\stm32f10x.h(504): error:  #256: invalid redeclaration of type name "u32" (declared at line 39 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h:   typedef uint32_t  u32;
..\USER\stm32f10x.h:                     ^
..\USER\stm32f10x.h(508): error:  #256: invalid redeclaration of type name "uc32" (declared at line 43 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h:   typedef const uint32_t uc32;  /*!< Read Only */
..\USER\stm32f10x.h:                          ^
..\USER\stm32f10x.h(512): error:  #256: invalid redeclaration of type name "vu32" (declared at line 47 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h:   typedef __IO uint32_t  vu32;
..\USER\stm32f10x.h:                          ^
..\USER\stm32f10x.h(516): error:  #256: invalid redeclaration of type name "vuc32" (declared at line 51 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h:   typedef __I uint32_t vuc32;  /*!< Read Only */
..\USER\stm32f10x.h:                        ^
..\USER\stm32f10x.h(520): error:  #101: "RESET" has already been declared in the current scope
..\USER\stm32f10x.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
..\USER\stm32f10x.h:                 ^
..\USER\stm32f10x.h(520): error:  #101: "SET" has already been declared in the current scope
..\USER\stm32f10x.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
..\USER\stm32f10x.h:                            ^
..\USER\stm32f10x.h(520): error:  #256: invalid redeclaration of type name "FlagStatus" (declared at line 57 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
..\USER\stm32f10x.h:                                          ^
..\USER\stm32f10x.h(520): error:  #256: invalid redeclaration of type name "ITStatus" (declared at line 57 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
..\USER\stm32f10x.h:                                                      ^
..\USER\stm32f10x.h(522): error:  #101: "DISABLE" has already been declared in the current scope
..\USER\stm32f10x.h:   typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
..\USER\stm32f10x.h:                 ^
..\USER\stm32f10x.h(522): error:  #101: "ENABLE" has already been declared in the current scope
..\USER\stm32f10x.h:   typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
..\USER\stm32f10x.h:                              ^
..\USER\stm32f10x.h(522): error:  #256: invalid redeclaration of type name "FunctionalState" (declared at line 59 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h:   typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
..\USER\stm32f10x.h:                                                 ^
..\USER\stm32f10x.h(525): error:  #101: "ERROR" has already been declared in the current scope
..\USER\stm32f10x.h:   typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
..\USER\stm32f10x.h:                 ^
..\USER\stm32f10x.h(525): error:  #101: "SUCCESS" has already been declared in the current scope
..\USER\stm32f10x.h:   typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
..\USER\stm32f10x.h:                            ^
..\USER\stm32f10x.h(525): error:  #256: invalid redeclaration of type name "ErrorStatus" (declared at line 62 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
..\USER\stm32f10x.h:   typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
..\USER\stm32f10x.h:                                              ^
..\USER\stm32f10x.h(529): warning:  #47-D: incompatible redefinition of macro "HSE_Value" (declared at line 147 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_conf.h")
..\USER\stm32f10x.h:   #define HSE_Value            HSE_VALUE
..\USER\stm32f10x.h:           ^
..\USER\stm32f10x.h(565): error:  #256: invalid redeclaration of type name "ADC_TypeDef" (declared at line 58 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h:   } ADC_TypeDef;
..\USER\stm32f10x.h:     ^
..\USER\stm32f10x.h(664): error:  #256: invalid redeclaration of type name "BKP_TypeDef" (declared at line 154 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h:   } BKP_TypeDef;
..\USER\stm32f10x.h:     ^
..\USER\stm32f10x.h(676): error:  #256: invalid redeclaration of type name "CAN_TxMailBox_TypeDef" (declared at line 163 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h:   } CAN_TxMailBox_TypeDef;
..\USER\stm32f10x.h:     ^
..\USER\stm32f10x.h(688): error:  #256: invalid redeclaration of type name "CAN_FIFOMailBox_TypeDef" (declared at line 171 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h:   } CAN_FIFOMailBox_TypeDef;
..\USER\stm32f10x.h:     ^
..\USER\stm32f10x.h(698): error:  #256: invalid redeclaration of type name "CAN_FilterRegister_TypeDef" (declared at line 177 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h:   } CAN_FilterRegister_TypeDef;
..\USER\stm32f10x.h:     ^
..\USER\stm32f10x.h(732): error:  #256: invalid redeclaration of type name "CAN_TypeDef" (declared at line 203 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h:   } CAN_TypeDef;
..\USER\stm32f10x.h:     ^
..\USER\stm32f10x.h(759): error:  #256: invalid redeclaration of type name "CRC_TypeDef" (declared at line 213 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h:   } CRC_TypeDef;
..\USER\stm32f10x.h:     ^
..\USER\stm32f10x.h(783): error:  #256: invalid redeclaration of type name "DAC_TypeDef" (declared at line 232 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h:   } DAC_TypeDef;
..\USER\stm32f10x.h:     ^
..\USER\stm32f10x.h(793): error:  #256: invalid redeclaration of type name "DBGMCU_TypeDef" (declared at line 239 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h:   }DBGMCU_TypeDef;
..\USER\stm32f10x.h:    ^
..\USER\stm32f10x.h(805): error:  #256: invalid redeclaration of type name "DMA_Channel_TypeDef" (declared at line 248 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h:   } DMA_Channel_TypeDef;
..\USER\stm32f10x.h:     ^
..\USER\stm32f10x.h(811): error:  #256: invalid redeclaration of type name "DMA_TypeDef" (declared at line 254 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h:   } DMA_TypeDef;
..\USER\stm32f10x.h:     ^
..\USER\stm32f10x.h(896): error:  #256: invalid redeclaration of type name "EXTI_TypeDef" (declared at line 265 of "D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
..\USER\stm32f10x.h:   } EXTI_TypeDef;
..\USER\stm32f10x.h:     ^
..\USER\stm32f10x.h: ..\USMART\usmart_config.c: 5 warnings, 30 errors
compiling usmart_str.c...
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(23): error:  #256: invalid redeclaration of type name "s32" (declared at line 488 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef signed long  s32;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                        ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(27): error:  #256: invalid redeclaration of type name "sc32" (declared at line 492 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef signed long  const sc32;  /* Read Only */
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                              ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(31): error:  #256: invalid redeclaration of type name "vs32" (declared at line 496 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef volatile signed long  vs32;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                 ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(35): error:  #256: invalid redeclaration of type name "vsc32" (declared at line 500 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef volatile signed long  const vsc32;  /* Read Only */
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                       ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(39): error:  #256: invalid redeclaration of type name "u32" (declared at line 504 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef unsigned long  u32;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                          ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(43): error:  #256: invalid redeclaration of type name "uc32" (declared at line 508 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef unsigned long  const uc32;  /* Read Only */
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(47): error:  #256: invalid redeclaration of type name "vu32" (declared at line 512 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef volatile unsigned long  vu32;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                   ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(51): error:  #256: invalid redeclaration of type name "vuc32" (declared at line 516 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef volatile unsigned long  const vuc32;  /* Read Only */
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                         ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(57): error:  #101: "RESET" has already been declared in the current scope
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                 ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(57): error:  #101: "SET" has already been declared in the current scope
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                            ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(57): error:  #256: invalid redeclaration of type name "FlagStatus" (declared at line 520 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                          ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(57): error:  #256: invalid redeclaration of type name "ITStatus" (declared at line 520 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                                      ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(59): error:  #101: "DISABLE" has already been declared in the current scope
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                 ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(59): error:  #101: "ENABLE" has already been declared in the current scope
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                              ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(59): error:  #256: invalid redeclaration of type name "FunctionalState" (declared at line 522 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                                 ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(62): error:  #101: "ERROR" has already been declared in the current scope
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                 ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(62): error:  #101: "SUCCESS" has already been declared in the current scope
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                            ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h(62): error:  #256: invalid redeclaration of type name "ErrorStatus" (declared at line 525 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:   typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h:                                              ^
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h(30): error:  #55: too many arguments in macro invocation
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h:   void __ISB(void);
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h:              ^
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h(30): error:  #79: expected a type specifier
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h:   void __ISB(void);
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h:        ^
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h(31): error:  #55: too many arguments in macro invocation
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h:   void __DSB(void);
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h:              ^
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h(31): error:  #79: expected a type specifier
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h:   void __DSB(void);
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h:        ^
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h(32): error:  #55: too many arguments in macro invocation
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h:   void __DMB(void);
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h:              ^
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h(32): error:  #79: expected a type specifier
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h:   void __DMB(void);
D:\Keil\ARM\INC\ST\STM32F10x\cortexm3_macro.h:        ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h(58): error:  #256: invalid redeclaration of type name "ADC_TypeDef" (declared at line 565 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h:   } ADC_TypeDef;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h:     ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h(154): error:  #256: invalid redeclaration of type name "BKP_TypeDef" (declared at line 664 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h:   } BKP_TypeDef;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h:     ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h(163): error:  #256: invalid redeclaration of type name "CAN_TxMailBox_TypeDef" (declared at line 676 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h:   } CAN_TxMailBox_TypeDef;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h:     ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h(171): error:  #256: invalid redeclaration of type name "CAN_FIFOMailBox_TypeDef" (declared at line 688 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h:   } CAN_FIFOMailBox_TypeDef;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h:     ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h(177): error:  #256: invalid redeclaration of type name "CAN_FilterRegister_TypeDef" (declared at line 698 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h:   } CAN_FilterRegister_TypeDef;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h:     ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h(203): error:  #256: invalid redeclaration of type name "CAN_TypeDef" (declared at line 732 of "..\USER\stm32f10x.h")
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h:   } CAN_TypeDef;
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h:     ^
D:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h: ..\USMART\usmart_str.c: 0 warnings, 30 errors
Target not created

最佳答案

查看完整内容[请看2#楼]

应该是环境设置的事,你去看看原子的新建工程例程看看是不是设置不对。
正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

0

主题

174

帖子

0

精华

高级会员

Rank: 4

积分
725
金钱
725
注册时间
2016-1-9
在线时间
64 小时
发表于 2017-4-15 15:57:38 | 显示全部楼层
应该是环境设置的事,你去看看原子的新建工程例程看看是不是设置不对。
回复

使用道具 举报

10

主题

32

帖子

0

精华

初级会员

Rank: 2

积分
131
金钱
131
注册时间
2017-3-17
在线时间
38 小时
 楼主| 发表于 2017-4-16 12:48:55 | 显示全部楼层
可能是固件库版本问题,我最后直接使用原子提供的模板工程,自己添加之后问题解决了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2025-8-22 03:08

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表