[STM32F4] 编译提示这么多问题怎么回事?

[复制链接]
17001|10
 楼主| 1021256354 发表于 2014-11-25 10:43 | 显示全部楼层 |阅读模式
..\CMSIS\stm32f4xx.h(163): warning:  #47-D: incompatible redefinition of macro "__MPU_PRESENT" (declared at line 104 of "..\CMSIS\stm32f10x.h")
  #define __MPU_PRESENT             1       /*!< STM32F4XX provides an MPU                     */
..\CMSIS\stm32f4xx.h(172): error:  #101: "IRQn" has already been declared in the current scope
  typedef enum IRQn
..\CMSIS\stm32f4xx.h(175): error:  #101: "NonMaskableInt_IRQn" has already been declared in the current scope
    NonMaskableInt_IRQn         = -14,    /*!< 2 Non Maskable Interrupt                                          */
..\CMSIS\stm32f4xx.h(176): error:  #101: "MemoryManagement_IRQn" has already been declared in the current scope
    MemoryManagement_IRQn       = -12,    /*!< 4 Cortex-M4 Memory Management Interrupt                           */
..\CMSIS\stm32f4xx.h(177): error:  #101: "BusFault_IRQn" has already been declared in the current scope
    BusFault_IRQn               = -11,    /*!< 5 Cortex-M4 Bus Fault Interrupt                                   */
..\CMSIS\stm32f4xx.h(178): error:  #101: "UsageFault_IRQn" has already been declared in the current scope
    UsageFault_IRQn             = -10,    /*!< 6 Cortex-M4 Usage Fault Interrupt                                 */
..\CMSIS\stm32f4xx.h(179): error:  #101: "SVCall_IRQn" has already been declared in the current scope
    SVCall_IRQn                 = -5,     /*!< 11 Cortex-M4 SV Call Interrupt                                    */
..\CMSIS\stm32f4xx.h(180): error:  #101: "DebugMonitor_IRQn" has already been declared in the current scope
    DebugMonitor_IRQn           = -4,     /*!< 12 Cortex-M4 Debug Monitor Interrupt                              */
..\CMSIS\stm32f4xx.h(181): error:  #101: "PendSV_IRQn" has already been declared in the current scope
    PendSV_IRQn                 = -2,     /*!< 14 Cortex-M4 Pend SV Interrupt                                    */
..\CMSIS\stm32f4xx.h(182): error:  #101: "SysTick_IRQn" has already been declared in the current scope
    SysTick_IRQn                = -1,     /*!< 15 Cortex-M4 System Tick Interrupt                                */
..\CMSIS\stm32f4xx.h(184): error:  #101: "WWDG_IRQn" has already been declared in the current scope
    WWDG_IRQn                   = 0,      /*!< Window WatchDog Interrupt                                         */
..\CMSIS\stm32f4xx.h(185): error:  #101: "PVD_IRQn" has already been declared in the current scope
    PVD_IRQn                    = 1,      /*!< PVD through EXTI Line detection Interrupt                         */
..\CMSIS\stm32f4xx.h(188): error:  #101: "FLASH_IRQn" has already been declared in the current scope
    FLASH_IRQn                  = 4,      /*!< FLASH global Interrupt                                            */
..\CMSIS\stm32f4xx.h(189): error:  #101: "RCC_IRQn" has already been declared in the current scope
    RCC_IRQn                    = 5,      /*!< RCC global Interrupt                                              */
..\CMSIS\stm32f4xx.h(190): error:  #101: "EXTI0_IRQn" has already been declared in the current scope
    EXTI0_IRQn                  = 6,      /*!< EXTI Line0 Interrupt                                              */
..\CMSIS\stm32f4xx.h(191): error:  #101: "EXTI1_IRQn" has already been declared in the current scope
    EXTI1_IRQn                  = 7,      /*!< EXTI Line1 Interrupt                                              */
..\CMSIS\stm32f4xx.h(192): error:  #101: "EXTI2_IRQn" has already been declared in the current scope
    EXTI2_IRQn                  = 8,      /*!< EXTI Line2 Interrupt                                              */
..\CMSIS\stm32f4xx.h(193): error:  #101: "EXTI3_IRQn" has already been declared in the current scope
    EXTI3_IRQn                  = 9,      /*!< EXTI Line3 Interrupt                                              */
..\CMSIS\stm32f4xx.h(194): error:  #101: "EXTI4_IRQn" has already been declared in the current scope
    EXTI4_IRQn                  = 10,     /*!< EXTI Line4 Interrupt                                              */
..\CMSIS\stm32f4xx.h(346): error:  #101: "CAN1_RX1_IRQn" has already been declared in the current scope
    CAN1_RX1_IRQn               = 21,     /*!< CAN1 RX1 Interrupt                                                */
..\CMSIS\stm32f4xx.h(347): error:  #101: "CAN1_SCE_IRQn" has already been declared in the current scope
    CAN1_SCE_IRQn               = 22,     /*!< CAN1 SCE Interrupt                                                */
..\CMSIS\stm32f4xx.h(348): error:  #101: "EXTI9_5_IRQn" has already been declared in the current scope
    EXTI9_5_IRQn                = 23,     /*!< External Line[9:5] Interrupts                                     */
..\CMSIS\stm32f4xx.h(352): error:  #101: "TIM1_CC_IRQn" has already been declared in the current scope
    TIM1_CC_IRQn                = 27,     /*!< TIM1 Capture Compare Interrupt                                    */
..\CMSIS\stm32f4xx.h(353): error:  #101: "TIM2_IRQn" has already been declared in the current scope
    TIM2_IRQn                   = 28,     /*!< TIM2 global Interrupt                                             */
..\CMSIS\stm32f4xx.h(354): error:  #101: "TIM3_IRQn" has already been declared in the current scope
    TIM3_IRQn                   = 29,     /*!< TIM3 global Interrupt                                             */
..\CMSIS\stm32f4xx.h(355): error:  #101: "TIM4_IRQn" has already been declared in the current scope
    TIM4_IRQn                   = 30,     /*!< TIM4 global Interrupt                                             */
..\CMSIS\stm32f4xx.h(356): error:  #101: "I2C1_EV_IRQn" has already been declared in the current scope
    I2C1_EV_IRQn                = 31,     /*!< I2C1 Event Interrupt                                              */
..\CMSIS\stm32f4xx.h(357): error:  #101: "I2C1_ER_IRQn" has already been declared in the current scope
    I2C1_ER_IRQn                = 32,     /*!< I2C1 Error Interrupt                                              */
..\CMSIS\stm32f4xx.h(358): error:  #101: "I2C2_EV_IRQn" has already been declared in the current scope
    I2C2_EV_IRQn                = 33,     /*!< I2C2 Event Interrupt                                              */
..\CMSIS\stm32f4xx.h(359): error:  #101: "I2C2_ER_IRQn" has already been declared in the current scope
    I2C2_ER_IRQn                = 34,     /*!< I2C2 Error Interrupt                                              */  
..\CMSIS\stm32f4xx.h(360): error:  #101: "SPI1_IRQn" has already been declared in the current scope
    SPI1_IRQn                   = 35,     /*!< SPI1 global Interrupt                                             */
web_server.c: 1 warning, 30 errors
compiling enc28j60.c...
..\CMSIS\stm32f4xx.h(163): warning:  #47-D: incompatible redefinition of macro "__MPU_PRESENT" (declared at line 104 of "..\CMSIS\stm32f10x.h")
  #define __MPU_PRESENT             1       /*!< STM32F4XX provides an MPU                     */
..\CMSIS\stm32f4xx.h(172): error:  #101: "IRQn" has already been declared in the current scope
  typedef enum IRQn
..\CMSIS\stm32f4xx.h(175): error:  #101: "NonMaskableInt_IRQn" has already been declared in the current scope
    NonMaskableInt_IRQn         = -14,    /*!< 2 Non Maskable Interrupt                                          */
..\CMSIS\stm32f4xx.h(176): error:  #101: "MemoryManagement_IRQn" has already been declared in the current scope
    MemoryManagement_IRQn       = -12,    /*!< 4 Cortex-M4 Memory Management Interrupt                           */
..\CMSIS\stm32f4xx.h(177): error:  #101: "BusFault_IRQn" has already been declared in the current scope
    BusFault_IRQn               = -11,    /*!< 5 Cortex-M4 Bus Fault Interrupt                                   */
..\CMSIS\stm32f4xx.h(178): error:  #101: "UsageFault_IRQn" has already been declared in the current scope
    UsageFault_IRQn             = -10,    /*!< 6 Cortex-M4 Usage Fault Interrupt                                 */
..\CMSIS\stm32f4xx.h(179): error:  #101: "SVCall_IRQn" has already been declared in the current scope
    SVCall_IRQn                 = -5,     /*!< 11 Cortex-M4 SV Call Interrupt                                    */
..\CMSIS\stm32f4xx.h(180): error:  #101: "DebugMonitor_IRQn" has already been declared in the current scope
    DebugMonitor_IRQn           = -4,     /*!< 12 Cortex-M4 Debug Monitor Interrupt                              */
..\CMSIS\stm32f4xx.h(181): error:  #101: "PendSV_IRQn" has already been declared in the current scope
    PendSV_IRQn                 = -2,     /*!< 14 Cortex-M4 Pend SV Interrupt                                    */
..\CMSIS\stm32f4xx.h(182): error:  #101: "SysTick_IRQn" has already been declared in the current scope
    SysTick_IRQn                = -1,     /*!< 15 Cortex-M4 System Tick Interrupt                                */
..\CMSIS\stm32f4xx.h(184): error:  #101: "WWDG_IRQn" has already been declared in the current scope
    WWDG_IRQn                   = 0,      /*!< Window WatchDog Interrupt                                         */
..\CMSIS\stm32f4xx.h(185): error:  #101: "PVD_IRQn" has already been declared in the current scope
    PVD_IRQn                    = 1,      /*!< PVD through EXTI Line detection Interrupt                         */
..\CMSIS\stm32f4xx.h(188): error:  #101: "FLASH_IRQn" has already been declared in the current scope
    FLASH_IRQn                  = 4,      /*!< FLASH global Interrupt                                            */
..\CMSIS\stm32f4xx.h(189): error:  #101: "RCC_IRQn" has already been declared in the current scope
    RCC_IRQn                    = 5,      /*!< RCC global Interrupt                                              */
..\CMSIS\stm32f4xx.h(190): error:  #101: "EXTI0_IRQn" has already been declared in the current scope
    EXTI0_IRQn                  = 6,      /*!< EXTI Line0 Interrupt                                              */
..\CMSIS\stm32f4xx.h(191): error:  #101: "EXTI1_IRQn" has already been declared in the current scope
    EXTI1_IRQn                  = 7,      /*!< EXTI Line1 Interrupt                                              */
..\CMSIS\stm32f4xx.h(192): error:  #101: "EXTI2_IRQn" has already been declared in the current scope
    EXTI2_IRQn                  = 8,      /*!< EXTI Line2 Interrupt                                              */
..\CMSIS\stm32f4xx.h(193): error:  #101: "EXTI3_IRQn" has already been declared in the current scope
    EXTI3_IRQn                  = 9,      /*!< EXTI Line3 Interrupt                                              */
..\CMSIS\stm32f4xx.h(194): error:  #101: "EXTI4_IRQn" has already been declared in the current scope
    EXTI4_IRQn                  = 10,     /*!< EXTI Line4 Interrupt                                              */
..\CMSIS\stm32f4xx.h(346): error:  #101: "CAN1_RX1_IRQn" has already been declared in the current scope
    CAN1_RX1_IRQn               = 21,     /*!< CAN1 RX1 Interrupt                                                */
..\CMSIS\stm32f4xx.h(347): error:  #101: "CAN1_SCE_IRQn" has already been declared in the current scope
    CAN1_SCE_IRQn               = 22,     /*!< CAN1 SCE Interrupt                                                */
..\CMSIS\stm32f4xx.h(348): error:  #101: "EXTI9_5_IRQn" has already been declared in the current scope
    EXTI9_5_IRQn                = 23,     /*!< External Line[9:5] Interrupts                                     */
..\CMSIS\stm32f4xx.h(352): error:  #101: "TIM1_CC_IRQn" has already been declared in the current scope
    TIM1_CC_IRQn                = 27,     /*!< TIM1 Capture Compare Interrupt                                    */
..\CMSIS\stm32f4xx.h(353): error:  #101: "TIM2_IRQn" has already been declared in the current scope
    TIM2_IRQn                   = 28,     /*!< TIM2 global Interrupt                                             */
..\CMSIS\stm32f4xx.h(354): error:  #101: "TIM3_IRQn" has already been declared in the current scope
    TIM3_IRQn                   = 29,     /*!< TIM3 global Interrupt                                             */
..\CMSIS\stm32f4xx.h(355): error:  #101: "TIM4_IRQn" has already been declared in the current scope
    TIM4_IRQn                   = 30,     /*!< TIM4 global Interrupt                                             */
..\CMSIS\stm32f4xx.h(356): error:  #101: "I2C1_EV_IRQn" has already been declared in the current scope
    I2C1_EV_IRQn                = 31,     /*!< I2C1 Event Interrupt                                              */
..\CMSIS\stm32f4xx.h(357): error:  #101: "I2C1_ER_IRQn" has already been declared in the current scope
    I2C1_ER_IRQn                = 32,     /*!< I2C1 Error Interrupt                                              */
..\CMSIS\stm32f4xx.h(358): error:  #101: "I2C2_EV_IRQn" has already been declared in the current scope
    I2C2_EV_IRQn                = 33,     /*!< I2C2 Event Interrupt                                              */
..\CMSIS\stm32f4xx.h(359): error:  #101: "I2C2_ER_IRQn" has already been declared in the current scope
    I2C2_ER_IRQn                = 34,     /*!< I2C2 Error Interrupt                                              */  
..\CMSIS\stm32f4xx.h(360): error:  #101: "SPI1_IRQn" has already been declared in the current scope
    SPI1_IRQn                   = 35,     /*!< SPI1 global Interrupt                                             */
enc28j60.c: 1 warning, 30 errors
"..\Output\STM32429-DEMO-enc28j60.axf" - 60 Error(s), 2 Warning(s).
Target not created

mmuuss586 发表于 2014-11-25 12:19 | 显示全部楼层
启动文件没添加吧;
找个例程看下,对比后看看少加了什么文件还是什么未定义;
 楼主| 1021256354 发表于 2014-11-25 13:17 | 显示全部楼层
版主:启动文件添加了,该添加的都添加了
 楼主| 1021256354 发表于 2014-11-25 13:38 | 显示全部楼层
版主:找到了,多了一个10x.h的文件,隐藏的太深了,不太容易找到,谢谢
sail8498 发表于 2014-11-25 20:46 | 显示全部楼层
看错误应该是重复定义。
zll0000 发表于 2015-5-5 18:37 | 显示全部楼层
1021256354 发表于 2014-11-25 13:38
版主:找到了,多了一个10x.h的文件,隐藏的太深了,不太容易找到,谢谢

遇到同样问题  求解决方案
675817657 发表于 2015-8-5 16:33 | 显示全部楼层
遇到同样问题,楼主解决办法是什么?急求。。。谢谢
675817657 发表于 2015-8-5 16:34 | 显示全部楼层
1021256354 发表于 2014-11-25 13:38
版主:找到了,多了一个10x.h的文件,隐藏的太深了,不太容易找到,谢谢

遇到同样问题,急求答案,谢谢!!!
 楼主| 1021256354 发表于 2015-8-6 10:16 | 显示全部楼层
有一个。c文件中多了一个10x.h的文件,你在找找,具体位置有点忘了
hurry0110 发表于 2016-5-19 15:30 | 显示全部楼层
我现在也遇到了这个问题,哎……
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:多读书 多看报 少吃零食 多睡觉

152

主题

652

帖子

3

粉丝
快速回复 在线客服 返回列表 返回顶部