打印

GD32F103RET6建立工程,选型的宏定义问题

[复制链接]
2229|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
lvben5d|  楼主 | 2018-5-24 14:26 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
使用KEIL5编译器,在C/C++ 选择预编译栏目里 填写 GD32F10X_HD
编译的时候,则出现
*** Using Compiler 'V5.05 update 2 (build 169)', folder: 'D:\Keil\v515\ARM\ARMCC\Bin'
compiling gd32_periph_init.c...
.\User\CMSIS\gd32f10x.h(143): error:  #101: "USBD_HP_CAN0_TX_IRQn" has already been declared in the current scope
      USBD_HP_CAN0_TX_IRQn         = 19,     /*!< CAN0 TX interrupts                                       */
.\User\CMSIS\gd32f10x.h(144): error:  #101: "USBD_LP_CAN0_RX0_IRQn" has already been declared in the current scope
      USBD_LP_CAN0_RX0_IRQn        = 20,     /*!< CAN0 RX0 interrupts                                      */
.\User\CMSIS\gd32f10x.h(145): error:  #101: "CAN0_RX1_IRQn" has already been declared in the current scope
      CAN0_RX1_IRQn                = 21,     /*!< CAN0 RX1 interrupts                                      */
.\User\CMSIS\gd32f10x.h(146): error:  #101: "CAN0_EWMC_IRQn" has already been declared in the current scope
      CAN0_EWMC_IRQn               = 22,     /*!< CAN0 EWMC interrupts                                     */
.\User\CMSIS\gd32f10x.h(147): error:  #101: "EXTI5_9_IRQn" has already been declared in the current scope
      EXTI5_9_IRQn                 = 23,     /*!< EXTI[9:5] interrupts                                     */
.\User\CMSIS\gd32f10x.h(148): error:  #101: "TIMER0_BRK_IRQn" has already been declared in the current scope
      TIMER0_BRK_IRQn              = 24,     /*!< TIMER0 break interrupts                                  */
.\User\CMSIS\gd32f10x.h(149): error:  #101: "TIMER0_UP_IRQn" has already been declared in the current scope.....
....此处略去
找到问题 发现原因如下: RET6处于 HD的产品,器件选型如果选错,就会冲突.  startup_gd32f10x_hd.s  。  在KEIL5的器件选型里,注意选的器件全名跟你的启动文件是吻合的!


沙发
guanjiaer| | 2018-6-14 11:31 | 只看该作者
感谢楼主共享发现问题的解决方法

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

95

主题

746

帖子

12

粉丝