打印

MDK从4.7升级到5.1,怎么以前的工程提示错误了

[复制链接]
2018|9
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
花落辞殇|  楼主 | 2015-12-9 21:59 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
compiling main.c...
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
Source\User\main.c: 1 warning, 1 error
compiling Init.c...
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
Source\User\Init.c: 1 warning, 1 error
compiling Delays.c...
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
Source\User\Delays.c: 1 warning, 1 error
compiling TIM_x.c...
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
Source\User\TIM_x.c: 1 warning, 1 error
compiling AD_x.c...
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
Source\User\AD_x.c: 1 warning, 1 error
compiling PrintProcessings.c...
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
Source\User\PrintProcessings.c: 1 warning, 1 error
compiling HZlib.c...
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
Source\User\HZlib.c: 1 warning, 1 error
compiling Usart1.c...
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
Source\User\Usart1.c: 1 warning, 1 error
compiling Usart2.c...
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
Source\User\Usart2.c: 1 warning, 1 error
compiling Usart3.c...
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
Source\User\Usart3.c: 1 warning, 1 error
compiling RefreshPrint.c...
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
Source\User\RefreshPrint.c: 1 warning, 1 error
compiling PrintEndProcess.c...
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
Source\User\PrintEndProcess.c: 1 warning, 1 error
compiling AlarmProcess.c...
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
Source\User\AlarmProcess.c: 1 warning, 1 error
compiling SpecialSymbol.c...
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
Source\User\SpecialSymbol.c: 1 warning, 1 error
compiling misc.c...
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
Source\Libraries\STM32F10x_StdPeriph_Driver\src\misc.c: 1 warning, 1 error
compiling stm32f10x_rcc.c...
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
Source\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_rcc.c: 1 warning, 1 error
compiling stm32f10x_gpio.c...
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
Source\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_gpio.c: 1 warning, 1 error
compiling stm32f10x_tim.c...
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
Source\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_tim.c: 1 warning, 1 error
compiling stm32f10x_flash.c...
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
Source\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_flash.c: 1 warning, 1 error
compiling stm32f10x_i2c.c...
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
Source\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_i2c.c: 1 warning, 1 error
compiling stm32f10x_usart.c...
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
Source\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_usart.c: 1 warning, 1 error
compiling stm32f10x_adc.c...
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
.\Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
Source\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_adc.c: 1 warning, 1 error
compiling system_stm32f10x.c...
Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(298): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;
Source\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.c: 1 warning, 1 error
".\Obj\103RE_安卓_Print1.axf" - 23 Error(s), 23 Warning(s).
Target not created
错误太多了,以前是好好的呀。

相关帖子

沙发
Boooooosh| | 2015-12-10 21:34 | 只看该作者
我觉得是库版本不兼容的问题

使用特权

评论回复
板凳
Elric_QZH| | 2015-12-11 23:03 | 只看该作者
估计是库头文件变了,找原来的头文件过来吧。

使用特权

评论回复
地板
zhangyi3312| | 2015-12-12 22:50 | 只看该作者
我碰到相同的问题,解决方法如下:打开C:\Keil\UV4\PackInstaller.exe,然后在Packs选项中找到Keil::STM32F1xx_DFP单击前面的+号展开,选中1.0.2点击后面的卸载按钮,卸载后编译就正常。
具体什么原因不知.

使用特权

评论回复
5
爱潜泳的鱼| | 2015-12-13 10:58 | 只看该作者
error:  #67: expected a "}"这个错误
C/C++选项卡里的define有问题

使用特权

评论回复
6
会飞的大白| | 2015-12-13 19:22 | 只看该作者
cpu型号  下载选的哪个内存大小的那个文件,还有这个md  hd 这三个要对应
在C/C++选项卡里,把STM3210X_HD从prepocessor symbol define 里面删掉

使用特权

评论回复
7
大白农| | 2015-12-14 20:11 | 只看该作者
zhangyi3312 发表于 2015-12-12 22:50
我碰到相同的问题,解决方法如下:打开C:\Keil\UV4\PackInstaller.exe,然后在Packs选项中找到Keil::STM32F ...

这么做的原因:在老版本的官方STM32F10X.H文件里,这句话不是这么写的,若没记错的话,是
...&&!defined(STM32F10X_HD) && ...
原来是有括号的,不做标识符来处理,而新版的,如图,直接说明了出来,那就没有必要,可以根据C/C++知识自己去推断;

使用特权

评论回复
8
新人求带| | 2015-12-15 22:22 | 只看该作者
只要把  c/c++那个栏目中的  define的 芯片密度类型改了即可

使用特权

评论回复
9
Classover| | 2015-12-18 20:32 | 只看该作者
在MDK5中要注意:C/C++选项中的Defina  STM32F10X_HD/MD/LD 一定要和目标芯片FLASH的情况严格对应,否则会出现上述报错

使用特权

评论回复
10
Dennis-Zhou| | 2015-12-19 14:47 | 只看该作者
在MDK5中要注意:C/C++选项中的Defina  STM32F10X_HD/MD/LD 一定要和目标芯片FLASH的情况严格对应,否则会出现上述报错

使用特权

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

本版积分规则

11

主题

103

帖子

0

粉丝