USMART,Mini板移植问题

2019-08-14 19:11发布

今天按照手册做这个USMART的实验时没有调通。刚开始给出提示:Please select first the target
接下来在C/C++这个选项卡里依次添加 “STM32F10X_MD”和“ USE_STDPERIPH_DRIVER”分别进行编译,依然报错,报错如下;还请各位前辈看下小弟问题出在哪里了。

之前的实验都很顺利,没有出现问题;我的编译器是Keil,4.60。
期待大家的回复~

Build target 'USMART' compiling delay.c... compiling sys.c... compiling usart.c... compiling usmart.c... ..UserSystemstm32f10x_type.h(23): error:  #256: invalid redeclaration of type name "s32" (declared at line 487 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(27): error:  #256: invalid redeclaration of type name "sc32" (declared at line 491 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(31): error:  #256: invalid redeclaration of type name "vs32" (declared at line 495 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(35): error:  #256: invalid redeclaration of type name "vsc32" (declared at line 499 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(39): error:  #256: invalid redeclaration of type name "u32" (declared at line 503 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(43): error:  #256: invalid redeclaration of type name "uc32" (declared at line 507 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(47): error:  #256: invalid redeclaration of type name "vu32" (declared at line 511 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(51): error:  #256: invalid redeclaration of type name "vuc32" (declared at line 515 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(57): error:  #101: "RESET" has already been declared in the current scope ..UserSystemstm32f10x_type.h(57): error:  #101: "SET" has already been declared in the current scope ..UserSystemstm32f10x_type.h(57): error:  #256: invalid redeclaration of type name "FlagStatus" (declared at line 519 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(57): error:  #256: invalid redeclaration of type name "ITStatus" (declared at line 519 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(59): error:  #101: "DISABLE" has already been declared in the current scope ..UserSystemstm32f10x_type.h(59): error:  #101: "ENABLE" has already been declared in the current scope ..UserSystemstm32f10x_type.h(59): error:  #256: invalid redeclaration of type name "FunctionalState" (declared at line 521 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(62): error:  #101: "ERROR" has already been declared in the current scope ..UserSystemstm32f10x_type.h(62): error:  #101: "SUCCESS" has already been declared in the current scope ..UserSystemstm32f10x_type.h(62): error:  #256: invalid redeclaration of type name "ErrorStatus" (declared at line 524 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_conf.h(147): warning:  #47-D: incompatible redefinition of macro "HSE_Value" (declared at line 528 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemcortexm3_macro.h(30): error:  #55-D: too many arguments in invocation of macro "__ISB" ..UserSystemcortexm3_macro.h(30): error:  #79: expected a type specifier ..UserSystemcortexm3_macro.h(31): error:  #55-D: too many arguments in invocation of macro "__DSB" ..UserSystemcortexm3_macro.h(31): error:  #79: expected a type specifier ..UserSystemcortexm3_macro.h(32): error:  #55-D: too many arguments in invocation of macro "__DMB" ..UserSystemcortexm3_macro.h(32): error:  #79: expected a type specifier ..UserSystemstm32f10x_map.h(58): error:  #256: invalid redeclaration of type name "ADC_TypeDef" (declared at line 564 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_map.h(154): error:  #256: invalid redeclaration of type name "BKP_TypeDef" (declared at line 663 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_map.h(163): error:  #256: invalid redeclaration of type name "CAN_TxMailBox_TypeDef" (declared at line 675 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_map.h(171): error:  #256: invalid redeclaration of type name "CAN_FIFOMailBox_TypeDef" (declared at line 687 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_map.h(177): error:  #256: invalid redeclaration of type name "CAN_FilterRegister_TypeDef" (declared at line 697 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_map.h(203): error:  #256: invalid redeclaration of type name "CAN_TypeDef" (declared at line 731 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") compiling usmart_config.c... ..UserSystemstm32f10x_type.h(23): error:  #256: invalid redeclaration of type name "s32" (declared at line 487 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(27): error:  #256: invalid redeclaration of type name "sc32" (declared at line 491 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(31): error:  #256: invalid redeclaration of type name "vs32" (declared at line 495 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(35): error:  #256: invalid redeclaration of type name "vsc32" (declared at line 499 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(39): error:  #256: invalid redeclaration of type name "u32" (declared at line 503 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(43): error:  #256: invalid redeclaration of type name "uc32" (declared at line 507 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(47): error:  #256: invalid redeclaration of type name "vu32" (declared at line 511 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(51): error:  #256: invalid redeclaration of type name "vuc32" (declared at line 515 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(57): error:  #101: "RESET" has already been declared in the current scope ..UserSystemstm32f10x_type.h(57): error:  #101: "SET" has already been declared in the current scope ..UserSystemstm32f10x_type.h(57): error:  #256: invalid redeclaration of type name "FlagStatus" (declared at line 519 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(57): error:  #256: invalid redeclaration of type name "ITStatus" (declared at line 519 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(59): error:  #101: "DISABLE" has already been declared in the current scope ..UserSystemstm32f10x_type.h(59): error:  #101: "ENABLE" has already been declared in the current scope ..UserSystemstm32f10x_type.h(59): error:  #256: invalid redeclaration of type name "FunctionalState" (declared at line 521 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(62): error:  #101: "ERROR" has already been declared in the current scope ..UserSystemstm32f10x_type.h(62): error:  #101: "SUCCESS" has already been declared in the current scope ..UserSystemstm32f10x_type.h(62): error:  #256: invalid redeclaration of type name "ErrorStatus" (declared at line 524 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_conf.h(147): warning:  #47-D: incompatible redefinition of macro "HSE_Value" (declared at line 528 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemcortexm3_macro.h(30): error:  #55-D: too many arguments in invocation of macro "__ISB" ..UserSystemcortexm3_macro.h(30): error:  #79: expected a type specifier ..UserSystemcortexm3_macro.h(31): error:  #55-D: too many arguments in invocation of macro "__DSB" ..UserSystemcortexm3_macro.h(31): error:  #79: expected a type specifier ..UserSystemcortexm3_macro.h(32): error:  #55-D: too many arguments in invocation of macro "__DMB" ..UserSystemcortexm3_macro.h(32): error:  #79: expected a type specifier ..UserSystemstm32f10x_map.h(58): error:  #256: invalid redeclaration of type name "ADC_TypeDef" (declared at line 564 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_map.h(154): error:  #256: invalid redeclaration of type name "BKP_TypeDef" (declared at line 663 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_map.h(163): error:  #256: invalid redeclaration of type name "CAN_TxMailBox_TypeDef" (declared at line 675 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_map.h(171): error:  #256: invalid redeclaration of type name "CAN_FIFOMailBox_TypeDef" (declared at line 687 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_map.h(177): error:  #256: invalid redeclaration of type name "CAN_FilterRegister_TypeDef" (declared at line 697 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_map.h(203): error:  #256: invalid redeclaration of type name "CAN_TypeDef" (declared at line 731 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") compiling usmart_str.c... ..UserSystemstm32f10x_type.h(23): error:  #256: invalid redeclaration of type name "s32" (declared at line 487 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(27): error:  #256: invalid redeclaration of type name "sc32" (declared at line 491 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(31): error:  #256: invalid redeclaration of type name "vs32" (declared at line 495 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(35): error:  #256: invalid redeclaration of type name "vsc32" (declared at line 499 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(39): error:  #256: invalid redeclaration of type name "u32" (declared at line 503 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(43): error:  #256: invalid redeclaration of type name "uc32" (declared at line 507 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(47): error:  #256: invalid redeclaration of type name "vu32" (declared at line 511 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(51): error:  #256: invalid redeclaration of type name "vuc32" (declared at line 515 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(57): error:  #101: "RESET" has already been declared in the current scope ..UserSystemstm32f10x_type.h(57): error:  #101: "SET" has already been declared in the current scope ..UserSystemstm32f10x_type.h(57): error:  #256: invalid redeclaration of type name "FlagStatus" (declared at line 519 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(57): error:  #256: invalid redeclaration of type name "ITStatus" (declared at line 519 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(59): error:  #101: "DISABLE" has already been declared in the current scope ..UserSystemstm32f10x_type.h(59): error:  #101: "ENABLE" has already been declared in the current scope ..UserSystemstm32f10x_type.h(59): error:  #256: invalid redeclaration of type name "FunctionalState" (declared at line 521 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_type.h(62): error:  #101: "ERROR" has already been declared in the current scope ..UserSystemstm32f10x_type.h(62): error:  #101: "SUCCESS" has already been declared in the current scope ..UserSystemstm32f10x_type.h(62): error:  #256: invalid redeclaration of type name "ErrorStatus" (declared at line 524 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") ..UserSystemstm32f10x_conf.h(147): warning:  #47-D: incompatible redefinition of macro "HSE_Value" (declared at line 528 of "D:TechKeilARMIncSTSTM32F10xstm32f10x.h") compiling Main.c... D:TechKeilARMCMSISIncludecore_cm3.h(1219): warning:  #47-D: incompatible redefinition of macro "SCS_BASE" (declared at line 687 of "..UserSystemstm32f10x_map.h") D:TechKeilARMCMSISIncludecore_cm3.h(1224): warning:  #47-D: incompatible redefinition of macro "SysTick_BASE" (declared at line 689 of "..UserSystemstm32f10x_map.h") D:TechKeilARMCMSISIncludecore_cm3.h(1225): warning:  #47-D: incompatible redefinition of macro "NVIC_BASE" (declared at line 690 of "..UserSystemstm32f10x_map.h") D:TechKeilARMCMSISIncludecore_cm3.h(1226): warning:  #47-D: incompatible redefinition of macro "SCB_BASE" (declared at line 691 of "..UserSystemstm32f10x_map.h") D:TechKeilARMCMSISIncludecore_cm3.h(1229): warning:  #47-D: incompatible redefinition of macro "SCB" (declared at line 935 of "..UserSystemstm32f10x_map.h") D:TechKeilARMCMSISIncludecore_cm3.h(1230): warning:  #47-D: incompatible redefinition of macro "SysTick" (declared at line 930 of "..UserSystemstm32f10x_map.h") D:TechKeilARMCMSISIncludecore_cm3.h(1231): warning:  #47-D: incompatible redefinition of macro "NVIC" (declared at line 934 of "..UserSystemstm32f10x_map.h") D:TechKeilARMIncSTSTM32F10xstm32f10x.h(487): error:  #256: invalid redeclaration of type name "s32" (declared at line 23 of "..UserSystemstm32f10x_type.h") D:TechKeilARMIncSTSTM32F10xstm32f10x.h(491): error:  #256: invalid redeclaration of type name "sc32" (declared at line 27 of "..UserSystemstm32f10x_type.h") D:TechKeilARMIncSTSTM32F10xstm32f10x.h(495): error:  #256: invalid redeclaration of type name "vs32" (declared at line 31 of "..UserSystemstm32f10x_type.h") D:TechKeilARMIncSTSTM32F10xstm32f10x.h(499): error:  #256: invalid redeclaration of type name "vsc32" (declared at line 35 of "..UserSystemstm32f10x_type.h") D:TechKeilARMIncSTSTM32F10xstm32f10x.h(503): error:  #256: invalid redeclaration of type name "u32" (declared at line 39 of "..UserSystemstm32f10x_type.h") D:TechKeilARMIncSTSTM32F10xstm32f10x.h(507): error:  #256: invalid redeclaration of type name "uc32" (declared at line 43 of "..UserSystemstm32f10x_type.h") D:TechKeilARMIncSTSTM32F10xstm32f10x.h(511): error:  #256: invalid redeclaration of type name "vu32" (declared at line 47 of "..UserSystemstm32f10x_type.h") D:TechKeilARMIncSTSTM32F10xstm32f10x.h(515): error:  #256: invalid redeclaration of type name "vuc32" (declared at line 51 of "..UserSystemstm32f10x_type.h") D:TechKeilARMIncSTSTM32F10xstm32f10x.h(519): error:  #101: "RESET" has already been declared in the current scope D:TechKeilARMIncSTSTM32F10xstm32f10x.h(519): error:  #101: "SET" has already been declared in the current scope D:TechKeilARMIncSTSTM32F10xstm32f10x.h(519): error:  #256: invalid redeclaration of type name "FlagStatus" (declared at line 57 of "..UserSystemstm32f10x_type.h") D:TechKeilARMIncSTSTM32F10xstm32f10x.h(519): error:  #256: invalid redeclaration of type name "ITStatus" (declared at line 57 of "..UserSystemstm32f10x_type.h") D:TechKeilARMIncSTSTM32F10xstm32f10x.h(521): error:  #101: "DISABLE" has already been declared in the current scope D:TechKeilARMIncSTSTM32F10xstm32f10x.h(521): error:  #101: "ENABLE" has already been declared in the current scope D:TechKeilARMIncSTSTM32F10xstm32f10x.h(521): error:  #256: invalid redeclaration of type name "FunctionalState" (declared at line 59 of "..UserSystemstm32f10x_type.h") D:TechKeilARMIncSTSTM32F10xstm32f10x.h(524): error:  #101: "ERROR" has already been declared in the current scope D:TechKeilARMIncSTSTM32F10xstm32f10x.h(524): error:  #101: "SUCCESS" has already been declared in the current scope D:TechKeilARMIncSTSTM32F10xstm32f10x.h(524): error:  #256: invalid redeclaration of type name "ErrorStatus" (declared at line 62 of "..UserSystemstm32f10x_type.h") D:TechKeilARMIncSTSTM32F10xstm32f10x.h(528): warning:  #47-D: incompatible redefinition of macro "HSE_Value" (declared at line 147 of "..UserSystemstm32f10x_conf.h") D:TechKeilARMIncSTSTM32F10xstm32f10x.h(564): error:  #256: invalid redeclaration of type name "ADC_TypeDef" (declared at line 58 of "..UserSystemstm32f10x_map.h") D:TechKeilARMIncSTSTM32F10xstm32f10x.h(663): error:  #256: invalid redeclaration of type name "BKP_TypeDef" (declared at line 154 of "..UserSystemstm32f10x_map.h") D:TechKeilARMIncSTSTM32F10xstm32f10x.h(675): error:  #256: invalid redeclaration of type name "CAN_TxMailBox_TypeDef" (declared at line 163 of "..UserSystemstm32f10x_map.h") D:TechKeilARMIncSTSTM32F10xstm32f10x.h(687): error:  #256: invalid redeclaration of type name "CAN_FIFOMailBox_TypeDef" (declared at line 171 of "..UserSystemstm32f10x_map.h") D:TechKeilARMIncSTSTM32F10xstm32f10x.h(697): error:  #256: invalid redeclaration of type name "CAN_FilterRegister_TypeDef" (declared at line 177 of "..UserSystemstm32f10x_map.h") D:TechKeilARMIncSTSTM32F10xstm32f10x.h(731): error:  #256: invalid redeclaration of type name "CAN_TypeDef" (declared at line 203 of "..UserSystemstm32f10x_map.h") D:TechKeilARMIncSTSTM32F10xstm32f10x.h(758): error:  #256: invalid redeclaration of type name "CRC_TypeDef" (declared at line 213 of "..UserSystemstm32f10x_map.h") D:TechKeilARMIncSTSTM32F10xstm32f10x.h(782): error:  #256: invalid redeclaration of type name "DAC_TypeDef" (declared at line 232 of "..UserSystemstm32f10x_map.h") D:TechKeilARMIncSTSTM32F10xstm32f10x.h(792): error:  #256: invalid redeclaration of type name "DBGMCU_TypeDef" (declared at line 239 of "..UserSystemstm32f10x_map.h") D:TechKeilARMIncSTSTM32F10xstm32f10x.h(804): error:  #256: invalid redeclaration of type name "DMA_Channel_TypeDef" (declared at line 248 of "..UserSystemstm32f10x_map.h") D:TechKeilARMIncSTSTM32F10xstm32f10x.h(810): error:  #256: invalid redeclaration of type name "DMA_TypeDef" (declared at line 254 of "..UserSystemstm32f10x_map.h") D:TechKeilARMIncSTSTM32F10xstm32f10x.h(895): error:  #256: invalid redeclaration of type name "EXTI_TypeDef" (declared at line 265 of "..UserSystemstm32f10x_map.h") compiling ExtInt.c... compiling Key.c... compiling LED.c... compiling PWM.c... compiling Timer.c... compiling WatchDog.c... Target not created
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
4条回答
八度空间
1楼-- · 2019-08-14 23:53
回复【楼主位】Acc:
---------------------------------
这么多的错误呀

你用的是库函数版本吧?有些头文件没加进工程
正点原子
2楼-- · 2019-08-15 04:55
 精彩回答 2  元偷偷看……
正点原子
3楼-- · 2019-08-15 08:26
在扩展例程里面
电子初学
4楼-- · 2019-08-15 10:16
请问楼主是如何解决的这个问题啊?求教

一周热门 更多>