OpenEdv-开源电子网

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

问,stm32编译报stm32f10x.h与stm32f10x_lib.h等库文件有重复定义,怎么办?

[复制链接]

10

主题

30

帖子

0

精华

初级会员

Rank: 2

积分
90
金钱
90
注册时间
2014-5-17
在线时间
0 小时
发表于 2014-6-30 21:09:46 | 显示全部楼层 |阅读模式
5金钱
RT,报错截图如下:



详细保存如下:
Build target 'Target 1'
compiling main.c...
.\Libraries\CMSIS\Core\CM3\core_cm3.h(268): warning:  #47-D: incompatible redefinition of macro "SCS_BASE" (declared at line 687 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
.\Libraries\CMSIS\Core\CM3\core_cm3.h(276): warning:  #47-D: incompatible redefinition of macro "SCB" (declared at line 935 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
.\Libraries\CMSIS\Core\CM3\core_cm3.h(277): warning:  #47-D: incompatible redefinition of macro "SysTick" (declared at line 930 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
.\Libraries\CMSIS\Core\CM3\core_cm3.h(278): warning:  #47-D: incompatible redefinition of macro "NVIC" (declared at line 934 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(312): error:  #256: invalid redeclaration of type name "s32" (declared at line 23 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(316): error:  #256: invalid redeclaration of type name "sc32" (declared at line 27 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(320): error:  #256: invalid redeclaration of type name "vs32" (declared at line 31 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(324): error:  #256: invalid redeclaration of type name "vsc32" (declared at line 35 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(328): error:  #256: invalid redeclaration of type name "u32" (declared at line 39 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(332): error:  #256: invalid redeclaration of type name "uc32" (declared at line 43 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(336): error:  #256: invalid redeclaration of type name "vu32" (declared at line 47 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(340): error:  #256: invalid redeclaration of type name "vuc32" (declared at line 51 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(345): error:  #101: "FALSE" has already been declared in the current scope
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(345): error:  #101: "TRUE" has already been declared in the current scope
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(345): error:  #256: invalid redeclaration of type name "bool" (declared at line 55 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(348): error:  #101: "RESET" has already been declared in the current scope
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(348): error:  #101: "SET" has already been declared in the current scope
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(348): error:  #256: invalid redeclaration of type name "FlagStatus" (declared at line 57 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(348): error:  #256: invalid redeclaration of type name "ITStatus" (declared at line 57 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(350): error:  #101: "DISABLE" has already been declared in the current scope
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(350): error:  #101: "ENABLE" has already been declared in the current scope
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(350): error:  #256: invalid redeclaration of type name "FunctionalState" (declared at line 59 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(353): error:  #101: "ERROR" has already been declared in the current scope
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(353): error:  #101: "SUCCESS" has already been declared in the current scope
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(353): error:  #256: invalid redeclaration of type name "ErrorStatus" (declared at line 62 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_type.h")
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(389): error:  #256: invalid redeclaration of type name "ADC_TypeDef" (declared at line 58 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(488): error:  #256: invalid redeclaration of type name "BKP_TypeDef" (declared at line 154 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(500): error:  #256: invalid redeclaration of type name "CAN_TxMailBox_TypeDef" (declared at line 163 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(512): error:  #256: invalid redeclaration of type name "CAN_FIFOMailBox_TypeDef" (declared at line 171 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(522): error:  #256: invalid redeclaration of type name "CAN_FilterRegister_TypeDef" (declared at line 177 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(556): error:  #256: invalid redeclaration of type name "CAN_TypeDef" (declared at line 203 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(569): error:  #256: invalid redeclaration of type name "CRC_TypeDef" (declared at line 213 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(590): error:  #256: invalid redeclaration of type name "DAC_TypeDef" (declared at line 232 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
.\Libraries\CMSIS\Core\CM3\stm32f10x.h(600): error:  #256: invalid redeclaration of type name "DBGMCU_TypeDef" (declared at line 239 of "C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x_map.h")
compiling stm32f10x_it.c...
compiling Time.c...
compiling sys.c...
compiling stm32f10x_rcc.c...
compiling stm32f10x_tim.c...
compiling stm32f10x_usart.c...
compiling stm32f10x_wwdg.c...
compiling misc.c...
compiling stm32f10x_gpio.c...
compiling stm32f10x_flash.c...
assembling startup_stm32f10x_hd.s...
compiling core_cm3.c...
compiling system_stm32f10x.c...
Target not created

请帮忙看一下, 这个要怎么改? 谢谢.................

最佳答案

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

http://www.openedv.com/posts/list/29355.htm
正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

530

主题

11万

帖子

34

精华

管理员

Rank: 12Rank: 12Rank: 12

积分
165540
金钱
165540
注册时间
2010-12-1
在线时间
2117 小时
发表于 2014-6-30 21:09:47 | 显示全部楼层
我是开源电子网www.openedv.com站长,有关站务问题请与我联系。
正点原子STM32开发板购买店铺http://openedv.taobao.com
正点原子官方微信公众平台,点击这里关注“正点原子”
回复

使用道具 举报

10

主题

30

帖子

0

精华

初级会员

Rank: 2

积分
90
金钱
90
注册时间
2014-5-17
在线时间
0 小时
 楼主| 发表于 2014-7-1 10:11:21 | 显示全部楼层
回复【2楼】正点原子:
---------------------------------
嗯,已解决, 多谢......
回复

使用道具 举报

0

主题

2

帖子

0

精华

新手入门

积分
22
金钱
22
注册时间
2016-3-7
在线时间
5 小时
发表于 2016-3-11 23:28:59 | 显示全部楼层
咋解决啊 求方法啊
回复

使用道具 举报

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

本版积分规则



关闭

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

正点原子公众号

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

GMT+8, 2025-6-20 06:07

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

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