在KEIL5不同的STM32芯片之间移植程序,出现了一种错误提示:parsing restarts here after previous syntax error } IRQn_Type;

版权声明:内容若有错误,请您务必指出,感谢让我提高并给予我建议的你! 转载请注明出处 https://blog.csdn.net/qq792358814/article/details/81591717

今天移植ZET6的程序至C8T6,编译的时候出现了这种错误。

..\..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
..\..\User\bsp\lcd\bsp_lcd.c: 1 warning, 1 error

其实算是一种低级错误,解决办法为:在没有其他错误下,在C/C++选项中的宏定义,把STM32F10X_HD,USE_STDPERIPH_DRIVER改为STM32F10X_MD,USE_STDPERIPH_DRIVER 就可以编译得通了。不要忘记把启动文件也改掉为MD的。

猜你喜欢

转载自blog.csdn.net/qq792358814/article/details/81591717