- 问题:
Keil MDK-ARM V5的工程,使用HAL库搭建的。
HAL库从STM32Cube FW_F1 V1.6.1升级到STM32Cube FW_F1 V1.7.0,
重新编译工程后提示有102条错误,
而原来的工程是能正确运行的。 - 解决办法:
错误信息提示如下:
linking...
stm32_uart_mx\stm32_uart_mx.axf: Error: L6200E: Symbol SystemInit multiply defined (by system_stm32f1xx_1.o and system_stm32f1xx.o).
stm32_uart_mx\stm32_uart_mx.axf: Error: L6200E: Symbol __asm___5_adc_c_7cc13d26____REV16 multiply defined (by adc_1.o and adc.o).
stm32_uart_mx\stm32_uart_mx.axf: Error: L6200E: Symbol __asm___5_adc_c_7cc13d26____REVSH multiply defined (by adc_1.o and adc.o).
stm32_uart_mx\stm32_uart_mx.axf: Error: L6200E: Symbol __asm___5_adc_c_7cc13d26____RRX multiply defined (by adc_1.o and adc.o).
stm32_uart_mx\stm32_uart_mx.axf: Error: L6200E: Symbol hadc1 multiply defined (by adc_1.o and adc.o).
stm32_uart_mx\stm32_uart_mx.axf: Error: L6200E: Symbol HAL_ADC_MspDeInit multiply defined (by adc_1.o and adc.o).
stm32_uart_mx\stm32_uart_mx.axf: Error: L6200E: Symbol HAL_ADC_MspInit multiply defined (by adc_1.o and adc.o).
stm32_uart_mx\stm32_uart_mx.axf: Error: L6200E: Symbol MX_ADC1_Init multiply defined (by adc_1.o and adc.o).
...
Not enough information to list image symbols.
Not enough information to list load addresses in the image map.
Finished: 2 information, 0 warning and 102 error messages.
"stm32_uart_mx\stm32_uart_mx.axf" - 102 Error(s), 1 Warning(s).
Target not created.
Build Time Elapsed: 00:00:21
而工程中并无adc_1.c文件。
处理步骤:
1、先清空整个工程,然后Rebuild All target files,未能解决问题;
2、搜了一下网上,看到有跟我类似错误的,再查了一下自己工程中的c源文件,发现了某些c源文件被重复添加了,
将多余的c源文件清除,重新编译,问题解决。
参考链接:
参考链接