..\USER\stm32f10x.h(428): error: #67: expected a "}" ADC1_2_IRQn = 18, /*!<

本文介绍了使用MDK编译过程中遇到的stm32f10x.h文件错误,具体表现为语法错误和解析重启问题,并提供了解决方案:确保MDK的型号配置与头文件定义一致。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

MDK软件编译,出现如下错误:

..\USER\stm32f10x.h(428): error:  #67: expected a "}"
    ADC1_2_IRQn                 = 18,     /*!< ADC1 and ADC2 global Interrupt                       */
..\USER\stm32f10x.h(472): warning:  #12-D: parsing restarts here after previous syntax error
  } IRQn_Type;

解决办法:
1

配置MDK型号和头文件定义相匹配

2

..\USER\stm32f10x.h(298): error: #67: expected a "}" ADC1_2_IRQn = 18, /*!< ADC1 and ADC2 global Interrupt */ ..\USER\stm32f10x.h(472): warning: #12-D: parsing restarts here after previous syntax error } IRQn_Type; ..\STM32F10x_FWLib\src\stm32f10x_gpio.c: 1 warning, 1 error compiling stm32f10x_adc.c... ..\USER\stm32f10x.h(298): error: #67: expected a "}" ADC1_2_IRQn = 18, /*!< ADC1 and ADC2 global Interrupt */ ..\USER\stm32f10x.h(472): warning: #12-D: parsing restarts here after previous syntax error } IRQn_Type; ..\STM32F10x_FWLib\src\stm32f10x_adc.c: 1 warning, 1 error compiling sys.c... ..\USER\stm32f10x.h(298): error: #67: expected a "}" ADC1_2_IRQn = 18, /*!< ADC1 and ADC2 global Interrupt */ ..\USER\stm32f10x.h(472): warning: #12-D: parsing restarts here after previous syntax error } IRQn_Type; ..\SYSTEM\sys\sys.c: 1 warning, 1 error compiling key.c... ..\USER\stm32f10x.h(298): error: #67: expected a "}" ADC1_2_IRQn = 18, /*!< ADC1 and ADC2 global Interrupt */ ..\USER\stm32f10x.h(472): warning: #12-D: parsing restarts here after previous syntax error } IRQn_Type; ..\HARDWARE\KEY\key.c: 1 warning, 1 error compiling stm32f10x_it.c... stm32f10x.h(298): error: #67: expected a "}" ADC1_2_IRQn = 18, /*!< ADC1 and ADC2 global Interrupt */ stm32f10x.h(472): warning: #12-D: parsing restarts here after previous syntax error } IRQn_Type; stm32f10x_it.c: 1 warning, 1 error compiling delay.c... ..\USER\stm32f10x.h(298): error: #67: expected a "}" ADC1_2_IRQn = 18, /*!< ADC1 and ADC2 global Interrupt */ ..\USER\stm32f10x.h(472): warning: #12-D: parsing restarts here after previous syntax error } IRQn_Type; ..\SYSTEM\delay\delay.c(134): error: #20: identifier "SystemCoreClock" is undefined fac_us=SystemCoreClock/8000000; //为系统时?拥?1/8 ..\SYSTEM\delay\delay.c: 1 warning, 2 errors compiling usart.c... ..\USER\stm32f10x.h(298): error: #67: expected a "}" ADC1_2_IRQn = 18, /*!< ADC1 and ADC2 global Interrupt */ ..\USER\stm32f10x.h(472): warning: #12-D: parsing restarts here after previous syntax error } IRQn_Type; ..\SYSTEM\usart\usart.c: 1 warning, 1 error compiling led.c... ..\USER\stm32f10x.h(298): error: #67: expected a "}" ADC1_2_IRQn = 18, /*!< ADC1 and ADC2 global Interrupt */ ..\USER\stm32f10x.h(472): warning: #12-D: parsing restarts here after previous syntax error } IRQn_Type; ..\HARDWARE\LED\led.c: 1 warning, 1 error compiling main.c... ..\USER\stm32f10x.h(298): error: #67: expected a "}" ADC1_2_IRQn = 18, /*!< ADC1 and ADC2 global Interrupt */ ..\USER\stm32f10x.h(472): warning: #12-D: parsing restarts here after previous syntax error } IRQn_Type; main.c: 1 warning, 1 error compiling lsens.c... ..\USER\stm32f10x.h(298): error: #67: expected a "}" ADC1_2_IRQn = 18, /*!< ADC1 and ADC2 global Interrupt */ ..\USER\stm32f10x.h(472): warning: #12-D: parsing restarts here after previous syntax error } IRQn_Type; ..\HARDWARE\LSENS\lsens.c: 1 warning, 1 error compiling system_stm32f10x.c... stm32f10x.h(298): error: #67: expected a "}" ADC1_2_IRQn = 18, /*!< ADC1 and ADC2 global Interrupt */ stm32f10x.h(472): warning: #12-D: parsing restarts here after previous syntax error } IRQn_Type; system_stm32f10x.c: 1 warning, 1 error compiling misc.c... ..\USER\stm32f10x.h(298): error: #67: expected a "}" ADC1_2_IRQn = 18, /*!< ADC1 and ADC2 global Interrupt */ ..\USER\stm32f10x.h(472): warning: #12-D: parsing restarts here after previous syntax error } IRQn_Type; ..\STM32F10x_FWLib\src\misc.c: 1 warning, 1 error compiling adc.c... ..\USER\stm32f10x.h(298): error: #67: expected a "}" ADC1_2_IRQn = 18, /*!< ADC1 and ADC2 global Interrupt */ ..\USER\stm32f10x.h(472): warning: #12-D: parsing restarts here after previous syntax error } IRQn_Type; ..\HARDWARE\ADC\adc.c: 1 warning, 1 error compiling stm32f10x_rcc.c... ..\USER\stm32f10x.h(298): error: #67: expected a "}" ADC1_2_IRQn = 18, /*!< ADC1 and ADC2 global Interrupt */ ..\USER\stm32f10x.h(472): warning: #12-D: parsing restarts here after previous syntax error } IRQn_Type; ..\STM32F10x_FWLib\src\stm32f10x_rcc.c: 1 warning, 1 error compiling stm32f10x_usart.c... ..\USER\stm32f10x.h(298): error: #67: expected a "}" ADC1_2_IRQn = 18, /*!< ADC1 and ADC2 global Interrupt */ ..\USER\stm32f10x.h(472): warning: #12-D: parsing restarts here after previous syntax error } IRQn_Type; ..\STM32F10x_FWLib\src\stm32f10x_usart.c: 1 warning, 1 error compiling stm32f10x_fsmc.c... ..\USER\stm32f10x.h(298): error: #67: expected a "}" ADC1_2_IRQn = 18, /*!< ADC1 and ADC2 global Interrupt */ ..\USER\stm32f10x.h(472): warning: #12-D: parsing restarts here after previous syntax error } IRQn_Type; ..\STM32F10x_FWLib\src\stm32f10x_fsmc.c: 1 warning, 1 error compiling lcd.c... ..\USER\stm32f10x.h(298): error: #67: expected a "}" ADC1_2_IRQn = 18, /*!< ADC1 and ADC2 global Interrupt */ ..\USER\stm32f10x.h(472): warning: #12-D: parsing restarts here after previous syntax error } IRQn_Type; ..\HARDWARE\LCD\lcd.c: 1 warning, 1 error compiling core_cm3.c... "..\OBJ\LSENS.axf" - 18 Error(s), 17 Warning(s). Target not created. Build Time Elapsed: 00:00:03
最新发布
06-26
Rebuild started: Project: Template *** Using Compiler &#39;V5.06 update 6 (build 750)&#39;, folder: &#39;C:\qiancode\ARM\ARMCC\Bin&#39; Rebuild target &#39;Target 1&#39; assembling startup_stm32f10x_hd_vl.s... compiling main.c... compiling stm32f10x_it.c... User\stm32f10x.h(343): error: #67: expected a "}" ADC1_IRQn = 18, /*!< ADC1 global Interrupt */ User\stm32f10x.h(472): warning: #12-D: parsing restarts here after previous syntax error } IRQn_Type; User\stm32f10x_it.c: 1 warning, 1 error compiling stm32f10x_gpio.c... .\User\stm32f10x.h(343): error: #67: expected a "}" ADC1_IRQn = 18, /*!< ADC1 global Interrupt */ .\User\stm32f10x.h(472): warning: #12-D: parsing restarts here after previous syntax error } IRQn_Type; Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_gpio.c: 1 warning, 1 error compiling core_cm3.c... compiling system_stm32f10x.c... .\User\stm32f10x.h(343): error: #67: expected a "}" ADC1_IRQn = 18, /*!< ADC1 global Interrupt */ .\User\stm32f10x.h(472): warning: #12-D: parsing restarts here after previous syntax error } IRQn_Type; Libraries\CMSIS\system_stm32f10x.c: 1 warning, 1 error compiling stm32f10x_adc.c... .\User\stm32f10x.h(343): error: #67: expected a "}" ADC1_IRQn = 18, /*!< ADC1 global Interrupt */ .\User\stm32f10x.h(472): warning: #12-D: parsing restarts here after previous syntax error } IRQn_Type; Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_adc.c: 1 warning, 1 error compiling stm32f10x_usart.c... .\User\stm32f10x.h(343): error: #67: expected a "}" ADC1_IRQn = 18, /*!< ADC1 global Interrupt */ .\User\stm32f10x.h(472): warning: #12-D: parsing restarts here after previous syntax error } IRQn_Type; Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_usart.c:
03-10
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值