KEIL5.38 STM32新建工程core_cm3.h报错

在新建工程后遇到编译错误,尝试了多种方法如自定义__INLINE未果。发现问题源于新安装的ARMCompiler版本(5.38)包含不同编译器,与旧的core_cm3不兼容。将编译器版本回降至5后,编译成功。

新建工程,该做的都做了后,编译发现报错

 

网上找了很久,什么说法的都有,自己定义__INLINE的,都不行。

而且打开别人的工程,编译是正常的。

后面才发现别人的工程魔术棒里是ARM Compiler不一样

因为我自己装的版本是5.38比较新,多了一个新的编译器版本如下图

 这样导致新的编译器和旧的core_cm3不兼容

把编译器从6降低到5,如下图

编译就可以了

 

 

Rebuild started: Project: LED *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\Keil_v5\ARM\ARMCLANG\Bin' Rebuild target 'LED' assembling startup_stm32f10x_hd.s... startup_stm32f10x_hd.s: Warning: A1950W: The legacy armasm assembler is deprecated. Consider using the armclang integrated assembler instead. compiling core_cm3.c... Warning: A1950W: The legacy armasm assembler is deprecated. Consider using the armclang integrated assembler instead. Fatal error: L3900U: Unrecognized option '--vfemode=force'. Finished: 0 information, 0 warning, 0 error and 1 fatal error messages. compiling misc.c... compiling stm32f10x_adc.c... compiling system_stm32f10x.c... compiling stm32f10x_it.c... compiling main.c... compiling stm32f10x_bkp.c... compiling stm32f10x_can.c... compiling stm32f10x_cec.c... compiling stm32f10x_dbgmcu.c... compiling stm32f10x_dma.c... compiling stm32f10x_exti.c... compiling stm32f10x_crc.c... compiling stm32f10x_dac.c... compiling stm32f10x_flash.c... compiling stm32f10x_fsmc.c... compiling stm32f10x_iwdg.c... compiling stm32f10x_i2c.c... compiling stm32f10x_gpio.c... compiling stm32f10x_pwr.c... compiling stm32f10x_rcc.c... compiling stm32f10x_rtc.c... compiling stm32f10x_sdio.c... compiling stm32f10x_spi.c... compiling stm32f10x_wwdg.c... compiling delay.c... compiling stm32f10x_usart.c... compiling bsp.c... compiling stm32f10x_tim.c... compiling bsp_LED.c... "..\OBJ\LED.axf" - 1 Error(s), 2 Warning(s). Target not created. Build Time Elapsed: 00:00:03
03-08
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Dr_Haven

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值