初级会员

- 积分
- 67
- 金钱
- 67
- 注册时间
- 2015-1-12
- 在线时间
- 4 小时
|
1金钱
原子哥的源程序,没有任何改动,我在keil mdk5下打开的时候,编译,显示通过。然后,我改了一下设备,将ZE改成了C8或者CB,就出现了编译错误。请问需要怎么改动设备啊。
compiling main.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;
main.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 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;
..\fwlib\src\misc.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;
..\fwlib\src\stm32f10x_adc.c: 1 warning, 1 error
compiling stm32f10x_bkp.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;
..\fwlib\src\stm32f10x_bkp.c: 1 warning, 1 error
compiling stm32f10x_can.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;
..\fwlib\src\stm32f10x_can.c: 1 warning, 1 error
compiling stm32f10x_cec.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;
..\fwlib\src\stm32f10x_cec.c: 1 warning, 1 error
compiling stm32f10x_crc.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;
..\fwlib\src\stm32f10x_crc.c: 1 warning, 1 error
compiling stm32f10x_dac.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;
..\fwlib\src\stm32f10x_dac.c: 1 warning, 1 error
compiling stm32f10x_dbgmcu.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;
..\fwlib\src\stm32f10x_dbgmcu.c: 1 warning, 1 error
compiling stm32f10x_dma.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;
..\fwlib\src\stm32f10x_dma.c: 1 warning, 1 error
compiling stm32f10x_exti.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;
..\fwlib\src\stm32f10x_exti.c: 1 warning, 1 error
compiling stm32f10x_flash.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;
..\fwlib\src\stm32f10x_flash.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;
..\fwlib\src\stm32f10x_fsmc.c: 1 warning, 1 error
compiling stm32f10x_gpio.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;
..\fwlib\src\stm32f10x_gpio.c: 1 warning, 1 error
compiling stm32f10x_i2c.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;
..\fwlib\src\stm32f10x_i2c.c: 1 warning, 1 error
compiling stm32f10x_iwdg.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;
..\fwlib\src\stm32f10x_iwdg.c: 1 warning, 1 error
compiling stm32f10x_pwr.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;
..\fwlib\src\stm32f10x_pwr.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;
..\fwlib\src\stm32f10x_rcc.c: 1 warning, 1 error
compiling stm32f10x_rtc.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;
..\fwlib\src\stm32f10x_rtc.c: 1 warning, 1 error
compiling stm32f10x_sdio.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;
..\fwlib\src\stm32f10x_sdio.c: 1 warning, 1 error
compiling stm32f10x_spi.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;
..\fwlib\src\stm32f10x_spi.c: 1 warning, 1 error
compiling stm32f10x_tim.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;
..\fwlib\src\stm32f10x_tim.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;
..\fwlib\src\stm32f10x_usart.c: 1 warning, 1 error
compiling stm32f10x_wwdg.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;
..\fwlib\src\stm32f10x_wwdg.c: 1 warning, 1 error
compiling core_cm3.c...
assembling startup_stm32f10x_md.s...
"..\obj\templete11.axf" - 26 Error(s), 26 Warning(s).
Target not created
|
最佳答案
查看完整内容[请看2#楼]
解决方法,在keil4中不会遇到的问题,在keil5下面,由于define等原因,会造成符号报错。两种方法解决。
1. 直接删掉C/C++中define里面对芯片的定义
2. 选择正确的启动文件(大容量的启动文件对低容量的芯片是兼容的,所以,在芯片型号从大容量改成低容量的时候,可以直接用第一种方法)
|