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

2019-08-21 13:05发布

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...
..HARDWAREUSART3usart3.c(43): warning:  #223-D: function "TIM_SetCounter" declared implicitly
..HARDWAREUSART3usart3.c:                            TIM_SetCounter(TIM7,0);//计数器清空                                     //计数器清空
..HARDWAREUSART3usart3.c:                            ^
..HARDWAREUSART3usart3.c(46): warning:  #223-D: function "TIM_Cmd" declared implicitly
..HARDWAREUSART3usart3.c:                                    TIM_Cmd(TIM7,ENABLE);//使能定时器7
..HARDWAREUSART3usart3.c:                                    ^
..HARDWAREUSART3usart3.c(108): warning:  #223-D: function "TIM_Cmd" declared implicitly
..HARDWAREUSART3usart3.c:    TIM_Cmd(TIM7,DISABLE);                  //关闭定时器7
..HARDWAREUSART3usart3.c:    ^
..HARDWAREUSART3usart3.c: ..HARDWAREUSART3usart3.c: 3 warnings, 0 errors
compiling timer.c...
..HARDWARETIMER imer.c(21): warning:  #223-D: function "TIM_GetITStatus" declared implicitly
..HARDWARETIMER imer.c:      if (TIM_GetITStatus(TIM7, TIM_IT_Update) != RESET)//是更新中断
..HARDWARETIMER imer.c:          ^
..HARDWARETIMER imer.c(21): error:  #20: identifier "TIM_IT_Update" is undefined
..HARDWARETIMER imer.c:      if (TIM_GetITStatus(TIM7, TIM_IT_Update) != RESET)//是更新中断
..HARDWARETIMER imer.c:                                ^
..HARDWARETIMER imer.c(24): warning:  #223-D: function "TIM_ClearITPendingBit" declared implicitly
..HARDWARETIMER imer.c:              TIM_ClearITPendingBit(TIM7, TIM_IT_Update  );  //清除TIM7更新中断标志   
..HARDWARETIMER imer.c:              ^
..HARDWARETIMER imer.c(25): warning:  #223-D: function "TIM_Cmd" declared implicitly
..HARDWARETIMER imer.c:              TIM_Cmd(TIM7, DISABLE);  //关闭TIM7
..HARDWARETIMER imer.c:              ^
..HARDWARETIMER imer.c(42): error:  #20: identifier "TIM_TimeBaseInitTypeDef" is undefined
..HARDWARETIMER imer.c:      TIM_TimeBaseInitTypeDef  TIM_TimeBaseStructure;
..HARDWARETIMER imer.c:      ^
..HARDWARETIMER imer.c(49): error:  #20: identifier "TIM_CKD_DIV1" is undefined
..HARDWARETIMER imer.c:      TIM_TimeBaseStructure.TIM_ClockDivision = TIM_CKD_DIV1; //设置时钟分割:TDTS = Tck_tim
..HARDWARETIMER imer.c:                                                ^
..HARDWARETIMER imer.c(50): error:  #20: identifier "TIM_CounterMode_Up" is undefined
..HARDWARETIMER imer.c:      TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;  //TIM向上计数模式
..HARDWARETIMER imer.c:                                              ^
..HARDWARETIMER imer.c(51): warning:  #223-D: function "TIM_TimeBaseInit" declared implicitly
..HARDWARETIMER imer.c:      TIM_TimeBaseInit(TIM7, &TIM_TimeBaseStructure); //根据指定的参数初始化TIMx的时间基数单位
..HARDWARETIMER imer.c:      ^
..HARDWARETIMER imer.c(53): warning:  #223-D: function "TIM_ITConfig" declared implicitly
..HARDWARETIMER imer.c:      TIM_ITConfig(TIM7,TIM_IT_Update,ENABLE ); //使能指定的TIM7中断,允许更新中断
..HARDWARETIMER imer.c:      ^
..HARDWARETIMER imer.c(53): error:  #20: identifier "TIM_IT_Update" is undefined
..HARDWARETIMER imer.c:      TIM_ITConfig(TIM7,TIM_IT_Update,ENABLE ); //使能指定的TIM7中断,允许更新中断
..HARDWARETIMER imer.c:                        ^
..HARDWARETIMER imer.c(55): warning:  #223-D: function "TIM_Cmd" declared implicitly
..HARDWARETIMER imer.c:      TIM_Cmd(TIM7,ENABLE);//开启定时器7
..HARDWARETIMER imer.c:      ^
..HARDWARETIMER imer.c: ..HARDWARETIMER imer.c: 6 warnings, 5 errors
compiling led.c...
compiling key.c...
compiling usmart.c...
..COREcore_cm3.h(715): warning:  #47-D: incompatible redefinition of macro "SCS_BASE" (declared at line 687 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..COREcore_cm3.h:   #define SCS_BASE            (0xE000E000)                              /*!< System Control Space Base Address */
..COREcore_cm3.h:           ^
..COREcore_cm3.h(723): warning:  #47-D: incompatible redefinition of macro "SCB" (declared at line 935 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..COREcore_cm3.h:   #define SCB                 ((SCB_Type *)           SCB_BASE)         /*!< SCB configuration struct          */
..COREcore_cm3.h:           ^
..COREcore_cm3.h(724): warning:  #47-D: incompatible redefinition of macro "SysTick" (declared at line 930 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..COREcore_cm3.h:   #define SysTick             ((SysTick_Type *)       SysTick_BASE)     /*!< SysTick configuration struct      */
..COREcore_cm3.h:           ^
..COREcore_cm3.h(725): warning:  #47-D: incompatible redefinition of macro "NVIC" (declared at line 934 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..COREcore_cm3.h:   #define NVIC                ((NVIC_Type *)          NVIC_BASE)        /*!< NVIC configuration struct         */
..COREcore_cm3.h:           ^
..USERstm32f10x.h(488): error:  #256: invalid redeclaration of type name "s32" (declared at line 23 of "D:KeilARMINCSTSTM32F10xstm32f10x_type.h")
..USERstm32f10x.h:   typedef int32_t  s32;
..USERstm32f10x.h:                    ^
..USERstm32f10x.h(492): error:  #256: invalid redeclaration of type name "sc32" (declared at line 27 of "D:KeilARMINCSTSTM32F10xstm32f10x_type.h")
..USERstm32f10x.h:   typedef const int32_t sc32;  /*!< Read Only */
..USERstm32f10x.h:                         ^
..USERstm32f10x.h(496): error:  #256: invalid redeclaration of type name "vs32" (declared at line 31 of "D:KeilARMINCSTSTM32F10xstm32f10x_type.h")
..USERstm32f10x.h:   typedef __IO int32_t  vs32;
..USERstm32f10x.h:                         ^
..USERstm32f10x.h(500): error:  #256: invalid redeclaration of type name "vsc32" (declared at line 35 of "D:KeilARMINCSTSTM32F10xstm32f10x_type.h")
..USERstm32f10x.h:   typedef __I int32_t vsc32;  /*!< Read Only */
..USERstm32f10x.h:                       ^
..USERstm32f10x.h(504): error:  #256: invalid redeclaration of type name "u32" (declared at line 39 of "D:KeilARMINCSTSTM32F10xstm32f10x_type.h")
..USERstm32f10x.h:   typedef uint32_t  u32;
..USERstm32f10x.h:                     ^
..USERstm32f10x.h(508): error:  #256: invalid redeclaration of type name "uc32" (declared at line 43 of "D:KeilARMINCSTSTM32F10xstm32f10x_type.h")
..USERstm32f10x.h:   typedef const uint32_t uc32;  /*!< Read Only */
..USERstm32f10x.h:                          ^
..USERstm32f10x.h(512): error:  #256: invalid redeclaration of type name "vu32" (declared at line 47 of "D:KeilARMINCSTSTM32F10xstm32f10x_type.h")
..USERstm32f10x.h:   typedef __IO uint32_t  vu32;
..USERstm32f10x.h:                          ^
..USERstm32f10x.h(516): error:  #256: invalid redeclaration of type name "vuc32" (declared at line 51 of "D:KeilARMINCSTSTM32F10xstm32f10x_type.h")
..USERstm32f10x.h:   typedef __I uint32_t vuc32;  /*!< Read Only */
..USERstm32f10x.h:                        ^
..USERstm32f10x.h(520): error:  #101: "RESET" has already been declared in the current scope
..USERstm32f10x.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
..USERstm32f10x.h:                 ^
..USERstm32f10x.h(520): error:  #101: "SET" has already been declared in the current scope
..USERstm32f10x.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
..USERstm32f10x.h:                            ^
..USERstm32f10x.h(520): error:  #256: invalid redeclaration of type name "FlagStatus" (declared at line 57 of "D:KeilARMINCSTSTM32F10xstm32f10x_type.h")
..USERstm32f10x.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
..USERstm32f10x.h:                                          ^
..USERstm32f10x.h(520): error:  #256: invalid redeclaration of type name "ITStatus" (declared at line 57 of "D:KeilARMINCSTSTM32F10xstm32f10x_type.h")
..USERstm32f10x.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
..USERstm32f10x.h:                                                      ^
..USERstm32f10x.h(522): error:  #101: "DISABLE" has already been declared in the current scope
..USERstm32f10x.h:   typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
..USERstm32f10x.h:                 ^
..USERstm32f10x.h(522): error:  #101: "ENABLE" has already been declared in the current scope
..USERstm32f10x.h:   typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
..USERstm32f10x.h:                              ^
..USERstm32f10x.h(522): error:  #256: invalid redeclaration of type name "FunctionalState" (declared at line 59 of "D:KeilARMINCSTSTM32F10xstm32f10x_type.h")
..USERstm32f10x.h:   typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
..USERstm32f10x.h:                                                 ^
..USERstm32f10x.h(525): error:  #101: "ERROR" has already been declared in the current scope
..USERstm32f10x.h:   typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
..USERstm32f10x.h:                 ^
..USERstm32f10x.h(525): error:  #101: "SUCCESS" has already been declared in the current scope
..USERstm32f10x.h:   typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
..USERstm32f10x.h:                            ^
..USERstm32f10x.h(525): error:  #256: invalid redeclaration of type name "ErrorStatus" (declared at line 62 of "D:KeilARMINCSTSTM32F10xstm32f10x_type.h")
..USERstm32f10x.h:   typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
..USERstm32f10x.h:                                              ^
..USERstm32f10x.h(529): warning:  #47-D: incompatible redefinition of macro "HSE_Value" (declared at line 147 of "D:KeilARMINCSTSTM32F10xstm32f10x_conf.h")
..USERstm32f10x.h:   #define HSE_Value            HSE_VALUE
..USERstm32f10x.h:           ^
..USERstm32f10x.h(565): error:  #256: invalid redeclaration of type name "ADC_TypeDef" (declared at line 58 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..USERstm32f10x.h:   } ADC_TypeDef;
..USERstm32f10x.h:     ^
..USERstm32f10x.h(664): error:  #256: invalid redeclaration of type name "BKP_TypeDef" (declared at line 154 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..USERstm32f10x.h:   } BKP_TypeDef;
..USERstm32f10x.h:     ^
..USERstm32f10x.h(676): error:  #256: invalid redeclaration of type name "CAN_TxMailBox_TypeDef" (declared at line 163 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..USERstm32f10x.h:   } CAN_TxMailBox_TypeDef;
..USERstm32f10x.h:     ^
..USERstm32f10x.h(688): error:  #256: invalid redeclaration of type name "CAN_FIFOMailBox_TypeDef" (declared at line 171 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..USERstm32f10x.h:   } CAN_FIFOMailBox_TypeDef;
..USERstm32f10x.h:     ^
..USERstm32f10x.h(698): error:  #256: invalid redeclaration of type name "CAN_FilterRegister_TypeDef" (declared at line 177 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..USERstm32f10x.h:   } CAN_FilterRegister_TypeDef;
..USERstm32f10x.h:     ^
..USERstm32f10x.h(732): error:  #256: invalid redeclaration of type name "CAN_TypeDef" (declared at line 203 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..USERstm32f10x.h:   } CAN_TypeDef;
..USERstm32f10x.h:     ^
..USERstm32f10x.h(759): error:  #256: invalid redeclaration of type name "CRC_TypeDef" (declared at line 213 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..USERstm32f10x.h:   } CRC_TypeDef;
..USERstm32f10x.h:     ^
..USERstm32f10x.h(783): error:  #256: invalid redeclaration of type name "DAC_TypeDef" (declared at line 232 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..USERstm32f10x.h:   } DAC_TypeDef;
..USERstm32f10x.h:     ^
..USERstm32f10x.h(793): error:  #256: invalid redeclaration of type name "DBGMCU_TypeDef" (declared at line 239 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..USERstm32f10x.h:   }DBGMCU_TypeDef;
..USERstm32f10x.h:    ^
..USERstm32f10x.h(805): error:  #256: invalid redeclaration of type name "DMA_Channel_TypeDef" (declared at line 248 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..USERstm32f10x.h:   } DMA_Channel_TypeDef;
..USERstm32f10x.h:     ^
..USERstm32f10x.h(811): error:  #256: invalid redeclaration of type name "DMA_TypeDef" (declared at line 254 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..USERstm32f10x.h:   } DMA_TypeDef;
..USERstm32f10x.h:     ^
..USERstm32f10x.h(896): error:  #256: invalid redeclaration of type name "EXTI_TypeDef" (declared at line 265 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..USERstm32f10x.h:   } EXTI_TypeDef;
..USERstm32f10x.h:     ^
..USERstm32f10x.h: ..USMARTusmart.c: 5 warnings, 30 errors
compiling usmart_config.c...
..COREcore_cm3.h(715): warning:  #47-D: incompatible redefinition of macro "SCS_BASE" (declared at line 687 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..COREcore_cm3.h:   #define SCS_BASE            (0xE000E000)                              /*!< System Control Space Base Address */
..COREcore_cm3.h:           ^
..COREcore_cm3.h(723): warning:  #47-D: incompatible redefinition of macro "SCB" (declared at line 935 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..COREcore_cm3.h:   #define SCB                 ((SCB_Type *)           SCB_BASE)         /*!< SCB configuration struct          */
..COREcore_cm3.h:           ^
..COREcore_cm3.h(724): warning:  #47-D: incompatible redefinition of macro "SysTick" (declared at line 930 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..COREcore_cm3.h:   #define SysTick             ((SysTick_Type *)       SysTick_BASE)     /*!< SysTick configuration struct      */
..COREcore_cm3.h:           ^
..COREcore_cm3.h(725): warning:  #47-D: incompatible redefinition of macro "NVIC" (declared at line 934 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..COREcore_cm3.h:   #define NVIC                ((NVIC_Type *)          NVIC_BASE)        /*!< NVIC configuration struct         */
..COREcore_cm3.h:           ^
..USERstm32f10x.h(488): error:  #256: invalid redeclaration of type name "s32" (declared at line 23 of "D:KeilARMINCSTSTM32F10xstm32f10x_type.h")
..USERstm32f10x.h:   typedef int32_t  s32;
..USERstm32f10x.h:                    ^
..USERstm32f10x.h(492): error:  #256: invalid redeclaration of type name "sc32" (declared at line 27 of "D:KeilARMINCSTSTM32F10xstm32f10x_type.h")
..USERstm32f10x.h:   typedef const int32_t sc32;  /*!< Read Only */
..USERstm32f10x.h:                         ^
..USERstm32f10x.h(496): error:  #256: invalid redeclaration of type name "vs32" (declared at line 31 of "D:KeilARMINCSTSTM32F10xstm32f10x_type.h")
..USERstm32f10x.h:   typedef __IO int32_t  vs32;
..USERstm32f10x.h:                         ^
..USERstm32f10x.h(500): error:  #256: invalid redeclaration of type name "vsc32" (declared at line 35 of "D:KeilARMINCSTSTM32F10xstm32f10x_type.h")
..USERstm32f10x.h:   typedef __I int32_t vsc32;  /*!< Read Only */
..USERstm32f10x.h:                       ^
..USERstm32f10x.h(504): error:  #256: invalid redeclaration of type name "u32" (declared at line 39 of "D:KeilARMINCSTSTM32F10xstm32f10x_type.h")
..USERstm32f10x.h:   typedef uint32_t  u32;
..USERstm32f10x.h:                     ^
..USERstm32f10x.h(508): error:  #256: invalid redeclaration of type name "uc32" (declared at line 43 of "D:KeilARMINCSTSTM32F10xstm32f10x_type.h")
..USERstm32f10x.h:   typedef const uint32_t uc32;  /*!< Read Only */
..USERstm32f10x.h:                          ^
..USERstm32f10x.h(512): error:  #256: invalid redeclaration of type name "vu32" (declared at line 47 of "D:KeilARMINCSTSTM32F10xstm32f10x_type.h")
..USERstm32f10x.h:   typedef __IO uint32_t  vu32;
..USERstm32f10x.h:                          ^
..USERstm32f10x.h(516): error:  #256: invalid redeclaration of type name "vuc32" (declared at line 51 of "D:KeilARMINCSTSTM32F10xstm32f10x_type.h")
..USERstm32f10x.h:   typedef __I uint32_t vuc32;  /*!< Read Only */
..USERstm32f10x.h:                        ^
..USERstm32f10x.h(520): error:  #101: "RESET" has already been declared in the current scope
..USERstm32f10x.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
..USERstm32f10x.h:                 ^
..USERstm32f10x.h(520): error:  #101: "SET" has already been declared in the current scope
..USERstm32f10x.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
..USERstm32f10x.h:                            ^
..USERstm32f10x.h(520): error:  #256: invalid redeclaration of type name "FlagStatus" (declared at line 57 of "D:KeilARMINCSTSTM32F10xstm32f10x_type.h")
..USERstm32f10x.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
..USERstm32f10x.h:                                          ^
..USERstm32f10x.h(520): error:  #256: invalid redeclaration of type name "ITStatus" (declared at line 57 of "D:KeilARMINCSTSTM32F10xstm32f10x_type.h")
..USERstm32f10x.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
..USERstm32f10x.h:                                                      ^
..USERstm32f10x.h(522): error:  #101: "DISABLE" has already been declared in the current scope
..USERstm32f10x.h:   typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
..USERstm32f10x.h:                 ^
..USERstm32f10x.h(522): error:  #101: "ENABLE" has already been declared in the current scope
..USERstm32f10x.h:   typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
..USERstm32f10x.h:                              ^
..USERstm32f10x.h(522): error:  #256: invalid redeclaration of type name "FunctionalState" (declared at line 59 of "D:KeilARMINCSTSTM32F10xstm32f10x_type.h")
..USERstm32f10x.h:   typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
..USERstm32f10x.h:                                                 ^
..USERstm32f10x.h(525): error:  #101: "ERROR" has already been declared in the current scope
..USERstm32f10x.h:   typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
..USERstm32f10x.h:                 ^
..USERstm32f10x.h(525): error:  #101: "SUCCESS" has already been declared in the current scope
..USERstm32f10x.h:   typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
..USERstm32f10x.h:                            ^
..USERstm32f10x.h(525): error:  #256: invalid redeclaration of type name "ErrorStatus" (declared at line 62 of "D:KeilARMINCSTSTM32F10xstm32f10x_type.h")
..USERstm32f10x.h:   typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
..USERstm32f10x.h:                                              ^
..USERstm32f10x.h(529): warning:  #47-D: incompatible redefinition of macro "HSE_Value" (declared at line 147 of "D:KeilARMINCSTSTM32F10xstm32f10x_conf.h")
..USERstm32f10x.h:   #define HSE_Value            HSE_VALUE
..USERstm32f10x.h:           ^
..USERstm32f10x.h(565): error:  #256: invalid redeclaration of type name "ADC_TypeDef" (declared at line 58 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..USERstm32f10x.h:   } ADC_TypeDef;
..USERstm32f10x.h:     ^
..USERstm32f10x.h(664): error:  #256: invalid redeclaration of type name "BKP_TypeDef" (declared at line 154 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..USERstm32f10x.h:   } BKP_TypeDef;
..USERstm32f10x.h:     ^
..USERstm32f10x.h(676): error:  #256: invalid redeclaration of type name "CAN_TxMailBox_TypeDef" (declared at line 163 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..USERstm32f10x.h:   } CAN_TxMailBox_TypeDef;
..USERstm32f10x.h:     ^
..USERstm32f10x.h(688): error:  #256: invalid redeclaration of type name "CAN_FIFOMailBox_TypeDef" (declared at line 171 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..USERstm32f10x.h:   } CAN_FIFOMailBox_TypeDef;
..USERstm32f10x.h:     ^
..USERstm32f10x.h(698): error:  #256: invalid redeclaration of type name "CAN_FilterRegister_TypeDef" (declared at line 177 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..USERstm32f10x.h:   } CAN_FilterRegister_TypeDef;
..USERstm32f10x.h:     ^
..USERstm32f10x.h(732): error:  #256: invalid redeclaration of type name "CAN_TypeDef" (declared at line 203 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..USERstm32f10x.h:   } CAN_TypeDef;
..USERstm32f10x.h:     ^
..USERstm32f10x.h(759): error:  #256: invalid redeclaration of type name "CRC_TypeDef" (declared at line 213 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..USERstm32f10x.h:   } CRC_TypeDef;
..USERstm32f10x.h:     ^
..USERstm32f10x.h(783): error:  #256: invalid redeclaration of type name "DAC_TypeDef" (declared at line 232 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..USERstm32f10x.h:   } DAC_TypeDef;
..USERstm32f10x.h:     ^
..USERstm32f10x.h(793): error:  #256: invalid redeclaration of type name "DBGMCU_TypeDef" (declared at line 239 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..USERstm32f10x.h:   }DBGMCU_TypeDef;
..USERstm32f10x.h:    ^
..USERstm32f10x.h(805): error:  #256: invalid redeclaration of type name "DMA_Channel_TypeDef" (declared at line 248 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..USERstm32f10x.h:   } DMA_Channel_TypeDef;
..USERstm32f10x.h:     ^
..USERstm32f10x.h(811): error:  #256: invalid redeclaration of type name "DMA_TypeDef" (declared at line 254 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..USERstm32f10x.h:   } DMA_TypeDef;
..USERstm32f10x.h:     ^
..USERstm32f10x.h(896): error:  #256: invalid redeclaration of type name "EXTI_TypeDef" (declared at line 265 of "D:KeilARMINCSTSTM32F10xstm32f10x_map.h")
..USERstm32f10x.h:   } EXTI_TypeDef;
..USERstm32f10x.h:     ^
..USERstm32f10x.h: ..USMARTusmart_config.c: 5 warnings, 30 errors
compiling usmart_str.c...
D:KeilARMINCSTSTM32F10xstm32f10x_type.h(23): error:  #256: invalid redeclaration of type name "s32" (declared at line 488 of "..USERstm32f10x.h")
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:   typedef signed long  s32;
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:                        ^
D:KeilARMINCSTSTM32F10xstm32f10x_type.h(27): error:  #256: invalid redeclaration of type name "sc32" (declared at line 492 of "..USERstm32f10x.h")
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:   typedef signed long  const sc32;  /* Read Only */
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:                              ^
D:KeilARMINCSTSTM32F10xstm32f10x_type.h(31): error:  #256: invalid redeclaration of type name "vs32" (declared at line 496 of "..USERstm32f10x.h")
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:   typedef volatile signed long  vs32;
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:                                 ^
D:KeilARMINCSTSTM32F10xstm32f10x_type.h(35): error:  #256: invalid redeclaration of type name "vsc32" (declared at line 500 of "..USERstm32f10x.h")
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:   typedef volatile signed long  const vsc32;  /* Read Only */
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:                                       ^
D:KeilARMINCSTSTM32F10xstm32f10x_type.h(39): error:  #256: invalid redeclaration of type name "u32" (declared at line 504 of "..USERstm32f10x.h")
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:   typedef unsigned long  u32;
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:                          ^
D:KeilARMINCSTSTM32F10xstm32f10x_type.h(43): error:  #256: invalid redeclaration of type name "uc32" (declared at line 508 of "..USERstm32f10x.h")
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:   typedef unsigned long  const uc32;  /* Read Only */
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:                                ^
D:KeilARMINCSTSTM32F10xstm32f10x_type.h(47): error:  #256: invalid redeclaration of type name "vu32" (declared at line 512 of "..USERstm32f10x.h")
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:   typedef volatile unsigned long  vu32;
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:                                   ^
D:KeilARMINCSTSTM32F10xstm32f10x_type.h(51): error:  #256: invalid redeclaration of type name "vuc32" (declared at line 516 of "..USERstm32f10x.h")
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:   typedef volatile unsigned long  const vuc32;  /* Read Only */
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:                                         ^
D:KeilARMINCSTSTM32F10xstm32f10x_type.h(57): error:  #101: "RESET" has already been declared in the current scope
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:                 ^
D:KeilARMINCSTSTM32F10xstm32f10x_type.h(57): error:  #101: "SET" has already been declared in the current scope
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:                            ^
D:KeilARMINCSTSTM32F10xstm32f10x_type.h(57): error:  #256: invalid redeclaration of type name "FlagStatus" (declared at line 520 of "..USERstm32f10x.h")
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:                                          ^
D:KeilARMINCSTSTM32F10xstm32f10x_type.h(57): error:  #256: invalid redeclaration of type name "ITStatus" (declared at line 520 of "..USERstm32f10x.h")
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:   typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:                                                      ^
D:KeilARMINCSTSTM32F10xstm32f10x_type.h(59): error:  #101: "DISABLE" has already been declared in the current scope
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:   typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:                 ^
D:KeilARMINCSTSTM32F10xstm32f10x_type.h(59): error:  #101: "ENABLE" has already been declared in the current scope
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:   typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:                              ^
D:KeilARMINCSTSTM32F10xstm32f10x_type.h(59): error:  #256: invalid redeclaration of type name "FunctionalState" (declared at line 522 of "..USERstm32f10x.h")
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:   typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:                                                 ^
D:KeilARMINCSTSTM32F10xstm32f10x_type.h(62): error:  #101: "ERROR" has already been declared in the current scope
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:   typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:                 ^
D:KeilARMINCSTSTM32F10xstm32f10x_type.h(62): error:  #101: "SUCCESS" has already been declared in the current scope
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:   typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:                            ^
D:KeilARMINCSTSTM32F10xstm32f10x_type.h(62): error:  #256: invalid redeclaration of type name "ErrorStatus" (declared at line 525 of "..USERstm32f10x.h")
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:   typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
D:KeilARMINCSTSTM32F10xstm32f10x_type.h:                                              ^
D:KeilARMINCSTSTM32F10xcortexm3_macro.h(30): error:  #55: too many arguments in macro invocation
D:KeilARMINCSTSTM32F10xcortexm3_macro.h:   void __ISB(void);
D:KeilARMINCSTSTM32F10xcortexm3_macro.h:              ^
D:KeilARMINCSTSTM32F10xcortexm3_macro.h(30): error:  #79: expected a type specifier
D:KeilARMINCSTSTM32F10xcortexm3_macro.h:   void __ISB(void);
D:KeilARMINCSTSTM32F10xcortexm3_macro.h:        ^
D:KeilARMINCSTSTM32F10xcortexm3_macro.h(31): error:  #55: too many arguments in macro invocation
D:KeilARMINCSTSTM32F10xcortexm3_macro.h:   void __DSB(void);
D:KeilARMINCSTSTM32F10xcortexm3_macro.h:              ^
D:KeilARMINCSTSTM32F10xcortexm3_macro.h(31): error:  #79: expected a type specifier
D:KeilARMINCSTSTM32F10xcortexm3_macro.h:   void __DSB(void);
D:KeilARMINCSTSTM32F10xcortexm3_macro.h:        ^
D:KeilARMINCSTSTM32F10xcortexm3_macro.h(32): error:  #55: too many arguments in macro invocation
D:KeilARMINCSTSTM32F10xcortexm3_macro.h:   void __DMB(void);
D:KeilARMINCSTSTM32F10xcortexm3_macro.h:              ^
D:KeilARMINCSTSTM32F10xcortexm3_macro.h(32): error:  #79: expected a type specifier
D:KeilARMINCSTSTM32F10xcortexm3_macro.h:   void __DMB(void);
D:KeilARMINCSTSTM32F10xcortexm3_macro.h:        ^
D:KeilARMINCSTSTM32F10xstm32f10x_map.h(58): error:  #256: invalid redeclaration of type name "ADC_TypeDef" (declared at line 565 of "..USERstm32f10x.h")
D:KeilARMINCSTSTM32F10xstm32f10x_map.h:   } ADC_TypeDef;
D:KeilARMINCSTSTM32F10xstm32f10x_map.h:     ^
D:KeilARMINCSTSTM32F10xstm32f10x_map.h(154): error:  #256: invalid redeclaration of type name "BKP_TypeDef" (declared at line 664 of "..USERstm32f10x.h")
D:KeilARMINCSTSTM32F10xstm32f10x_map.h:   } BKP_TypeDef;
D:KeilARMINCSTSTM32F10xstm32f10x_map.h:     ^
D:KeilARMINCSTSTM32F10xstm32f10x_map.h(163): error:  #256: invalid redeclaration of type name "CAN_TxMailBox_TypeDef" (declared at line 676 of "..USERstm32f10x.h")
D:KeilARMINCSTSTM32F10xstm32f10x_map.h:   } CAN_TxMailBox_TypeDef;
D:KeilARMINCSTSTM32F10xstm32f10x_map.h:     ^
D:KeilARMINCSTSTM32F10xstm32f10x_map.h(171): error:  #256: invalid redeclaration of type name "CAN_FIFOMailBox_TypeDef" (declared at line 688 of "..USERstm32f10x.h")
D:KeilARMINCSTSTM32F10xstm32f10x_map.h:   } CAN_FIFOMailBox_TypeDef;
D:KeilARMINCSTSTM32F10xstm32f10x_map.h:     ^
D:KeilARMINCSTSTM32F10xstm32f10x_map.h(177): error:  #256: invalid redeclaration of type name "CAN_FilterRegister_TypeDef" (declared at line 698 of "..USERstm32f10x.h")
D:KeilARMINCSTSTM32F10xstm32f10x_map.h:   } CAN_FilterRegister_TypeDef;
D:KeilARMINCSTSTM32F10xstm32f10x_map.h:     ^
D:KeilARMINCSTSTM32F10xstm32f10x_map.h(203): error:  #256: invalid redeclaration of type name "CAN_TypeDef" (declared at line 732 of "..USERstm32f10x.h")
D:KeilARMINCSTSTM32F10xstm32f10x_map.h:   } CAN_TypeDef;
D:KeilARMINCSTSTM32F10xstm32f10x_map.h:     ^
D:KeilARMINCSTSTM32F10xstm32f10x_map.h: ..USMARTusmart_str.c: 0 warnings, 30 errors
Target not created

友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。