IAR 新版本打开老版本遇到的问题和解决方法 __nounwind和cannot open source file "core_cm3.h"

本文介绍了解决嵌入式开发中常见的编译错误,包括__nounwind声明不兼容问题及找不到core_cm3.h文件的解决办法。通过调整预处理器设置和正确选择MCU型号,可以有效避免这些编译错误。

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

1.__nounwind

declaration is incompatible with "__nounwind __interwork __softfp unsigned int __iar_builtin_STREXB(unsigned char, unsigned char volatile *)

解决方法:右击工程进入options->C/C++Compiler->Preprocessor删除

$PROJ_DIR$\..\Libraries\CMSIS\CM3\CoreSupport

2.打不开”core_cm3.h”

cannot open source file "core_cm3.h" 

原因:没有选MCU型号
解决方法:右击工程进入options->General Options->Target选设备,选设备完后进入Library Configuration,勾选CMSIS内的Use CMSIS

Rebuild started: Project: display *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\MCUSTM32\ARM\ARMCC\Bin' Rebuild target 'display' Note: source file '..\CORE\system_stm32f10x.c' - object file renamed from '.\Objects\system_stm32f10x.o' to '.\Objects\system_stm32f10x_1.o'. compiling stm32f10x_it.c... compiling main.c... ..\APP\display.h(26): warning: #1-D: last line of file ends without a newline #endif /* __DISPLAY_H */ ..\USER\main.h(23): warning: #1-D: last line of file ends without a newline #endif /* __MAIN_H */ ..\USER\main.h(7): error: #5: cannot open source input file "systick.h": No such file or directory #include "systick.h" ..\USER\main.c: 2 warnings, 1 error compiling system_stm32f10x.c... assembling startup_stm32f10x_md.s... compiling stm32f10x_rcc.c... compiling core_cm3.c... compiling display.c... ..\APP\display.h(26): warning: #1-D: last line of file ends without a newline #endif /* __DISPLAY_H */ ..\APP\display.c: 1 warning, 0 errors compiling stm32f10x_gpio.c... compiling misc.c... compiling timer.c... ..\APP\display.h(26): warning: #1-D: last line of file ends without a newline #endif /* __DISPLAY_H */ ..\USER\main.h(23): warning: #1-D: last line of file ends without a newline #endif /* __MAIN_H */ ..\USER\main.h(7): error: #5: cannot open source input file "systick.h": No such file or directory #include "systick.h" ..\APP\timer.c: 2 warnings, 1 error compiling key.c... ..\APP\display.h(26): warning: #1-D: last line of file ends without a newline #endif /* __DISPLAY_H */ ..\USER\main.h(7): error: #5: cannot open source input file "systick.h": No such file or directory #include "systick.h" ..\APP\key.c: 1 warning, 1 error compiling systick_delay.c... compiling stm32f10x_tim.c... ".\Objects\display.axf" - 3 Error(s), 6 Warning(s). Target not created. Build Time Elapsed: 00:00:02
06-07
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值