按照视频方法编写点亮led 出现了这样的错误 有没有解决过的?

2019-07-20 05:11发布

*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'D:keil5ARMARMCCBin'
Rebuild target 'Template'
compiling main.c...
..SYSTEMsyssys.h(83): error:  #130: expected a "{"
  void WFI_SET(void);                //Ö′DDWFIÖ¸áî
main.c(8): warning:  #12-D: parsing restarts here after previous syntax error
  {
main.c(9): warning:  #223-D: function "delay_init" declared implicitly
          delay_init(168);
main.c(18): warning:  #223-D: function "delay_ms" declared implicitly
                  delay_ms(500);
main.c: 3 warnings, 1 error
assembling startup_stm32f40_41xxx.s...
compiling stm32f4xx_it.c...
compiling system_stm32f4xx.c...
compiling misc.c...
compiling stm32f4xx_adc.c...
compiling stm32f4xx_can.c...
compiling stm32f4xx_crc.c...
compiling stm32f4xx_cryp.c...
compiling stm32f4xx_cryp_aes.c...
compiling stm32f4xx_cryp_des.c...
compiling stm32f4xx_cryp_tdes.c...
compiling stm32f4xx_dac.c...
compiling stm32f4xx_dbgmcu.c...
compiling stm32f4xx_dcmi.c...
compiling stm32f4xx_dma2d.c...
compiling stm32f4xx_exti.c...
compiling stm32f4xx_dma.c...
compiling stm32f4xx_flash.c...
compiling stm32f4xx_flash_ramfunc.c...
compiling stm32f4xx_fsmc.c...
compiling stm32f4xx_gpio.c...
compiling stm32f4xx_hash_md5.c...
compiling stm32f4xx_hash.c...
compiling stm32f4xx_hash_sha1.c...
compiling stm32f4xx_iwdg.c...
compiling stm32f4xx_i2c.c...
compiling stm32f4xx_ltdc.c...
compiling stm32f4xx_pwr.c...
compiling stm32f4xx_rcc.c...
compiling stm32f4xx_rng.c...
compiling stm32f4xx_sdio.c...
compiling stm32f4xx_rtc.c...
compiling stm32f4xx_sai.c...
compiling stm32f4xx_syscfg.c...
compiling stm32f4xx_spi.c...
compiling stm32f4xx_tim.c...
compiling stm32f4xx_wwdg.c...
compiling stm32f4xx_usart.c...
compiling delay.c...
compiling led.c...
..USERstm32f4xx.h(172): error:  #130: expected a "{"
  typedef enum IRQn
..USERstm32f4xx.h(175): error:  #20: identifier "NonMaskableInt_IRQn" is undefined
    NonMaskableInt_IRQn         = -14,    /*!< 2 Non Maskable Interrupt                                          */
..USERstm32f4xx.h(176): error:  #20: identifier "MemoryManagement_IRQn" is undefined
    MemoryManagement_IRQn       = -12,    /*!< 4 Cortex-M4 Memory Management Interrupt                           */
..USERstm32f4xx.h(177): error:  #20: identifier "BusFault_IRQn" is undefined
    BusFault_IRQn               = -11,    /*!< 5 Cortex-M4 Bus Fault Interrupt                                   */
..USERstm32f4xx.h(178): error:  #20: identifier "UsageFault_IRQn" is undefined
    UsageFault_IRQn             = -10,    /*!< 6 Cortex-M4 Usage Fault Interrupt                                 */
..USERstm32f4xx.h(179): error:  #20: identifier "SVCall_IRQn" is undefined
    SVCall_IRQn                 = -5,     /*!< 11 Cortex-M4 SV Call Interrupt                                    */
..USERstm32f4xx.h(180): error:  #20: identifier "DebugMonitor_IRQn" is undefined
    DebugMonitor_IRQn           = -4,     /*!< 12 Cortex-M4 Debug Monitor Interrupt                              */
..USERstm32f4xx.h(181): error:  #20: identifier "PendSV_IRQn" is undefined
    PendSV_IRQn                 = -2,     /*!< 14 Cortex-M4 Pend SV Interrupt                                    */
..USERstm32f4xx.h(182): error:  #20: identifier "SysTick_IRQn" is undefined
    SysTick_IRQn                = -1,     /*!< 15 Cortex-M4 System Tick Interrupt                                */
..USERstm32f4xx.h(184): error:  #20: identifier "WWDG_IRQn" is undefined
    WWDG_IRQn                   = 0,      /*!< Window WatchDog Interrupt                                         */
..USERstm32f4xx.h(185): error:  #20: identifier "PVD_IRQn" is undefined
    PVD_IRQn                    = 1,      /*!< PVD through EXTI Line detection Interrupt                         */
..USERstm32f4xx.h(186): error:  #20: identifier "TAMP_STAMP_IRQn" is undefined
    TAMP_STAMP_IRQn             = 2,      /*!< Tamper and TimeStamp interrupts through the EXTI line             */
..USERstm32f4xx.h(187): error:  #20: identifier "RTC_WKUP_IRQn" is undefined
    RTC_WKUP_IRQn               = 3,      /*!< RTC Wakeup interrupt through the EXTI line                        */
..USERstm32f4xx.h(188): error:  #20: identifier "FLASH_IRQn" is undefined
    FLASH_IRQn                  = 4,      /*!< FLASH global Interrupt                                            */
..USERstm32f4xx.h(189): error:  #20: identifier "RCC_IRQn" is undefined
    RCC_IRQn                    = 5,      /*!< RCC global Interrupt                                              */
..USERstm32f4xx.h(190): error:  #20: identifier "EXTI0_IRQn" is undefined
    EXTI0_IRQn                  = 6,      /*!< EXTI Line0 Interrupt                                              */
..USERstm32f4xx.h(191): error:  #20: identifier "EXTI1_IRQn" is undefined
    EXTI1_IRQn                  = 7,      /*!< EXTI Line1 Interrupt                                              */
..USERstm32f4xx.h(192): error:  #20: identifier "EXTI2_IRQn" is undefined
    EXTI2_IRQn                  = 8,      /*!< EXTI Line2 Interrupt                                              */
..USERstm32f4xx.h(193): error:  #20: identifier "EXTI3_IRQn" is undefined
    EXTI3_IRQn                  = 9,      /*!< EXTI Line3 Interrupt                                              */
..USERstm32f4xx.h(194): error:  #20: identifier "EXTI4_IRQn" is undefined
    EXTI4_IRQn                  = 10,     /*!< EXTI Line4 Interrupt                                              */
..USERstm32f4xx.h(195): error:  #20: identifier "DMA1_Stream0_IRQn" is undefined
    DMA1_Stream0_IRQn           = 11,     /*!< DMA1 Stream 0 global Interrupt                                    */
..USERstm32f4xx.h(196): error:  #20: identifier "DMA1_Stream1_IRQn" is undefined
    DMA1_Stream1_IRQn           = 12,     /*!< DMA1 Stream 1 global Interrupt                                    */
..USERstm32f4xx.h(197): error:  #20: identifier "DMA1_Stream2_IRQn" is undefined
    DMA1_Stream2_IRQn           = 13,     /*!< DMA1 Stream 2 global Interrupt                                    */
..USERstm32f4xx.h(198): error:  #20: identifier "DMA1_Stream3_IRQn" is undefined
    DMA1_Stream3_IRQn           = 14,     /*!< DMA1 Stream 3 global Interrupt                                    */
..USERstm32f4xx.h(199): error:  #20: identifier "DMA1_Stream4_IRQn" is undefined
    DMA1_Stream4_IRQn           = 15,     /*!< DMA1 Stream 4 global Interrupt                                    */
..USERstm32f4xx.h(200): error:  #20: identifier "DMA1_Stream5_IRQn" is undefined
    DMA1_Stream5_IRQn           = 16,     /*!< DMA1 Stream 5 global Interrupt                                    */
..USERstm32f4xx.h(201): error:  #20: identifier "DMA1_Stream6_IRQn" is undefined
    DMA1_Stream6_IRQn           = 17,     /*!< DMA1 Stream 6 global Interrupt                                    */
..USERstm32f4xx.h(202): error:  #20: identifier "ADC_IRQn" is undefined
    ADC_IRQn                    = 18,     /*!< ADC1, ADC2 and ADC3 global Interrupts                             */
..USERstm32f4xx.h(205): error:  #20: identifier "CAN1_TX_IRQn" is undefined
    CAN1_TX_IRQn                = 19,     /*!< CAN1 TX Interrupt                                                 */
..USERstm32f4xx.h(206): error:  #20: identifier "CAN1_RX0_IRQn" is undefined
    CAN1_RX0_IRQn               = 20,     /*!< CAN1 RX0 Interrupt                                                */
..HARDWAREledled.c: 0 warnings, 30 errors
compiling sys.c...
compiling usart.c...
"..OBJTemplate.axf" - 31 Error(s), 3 Warning(s).
Target not created.
Build Time Elapsed:  00:00:21
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。