STM32程序编译报错解决方案1——stm32f10x.h(478): error: #5: cannot open source input file “core_cm3.h“

安装一次CubeMx后,可编译的工程报错:
.\platform\Start_up\stm32f10x.h(478): error:  #5: cannot open source input file "core_cm3.h": No such file or directory
因为缺失CMSIS

 

 完美解决:

 

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
根据引用\[1\]和引用\[2\]的内容,你遇到的问题是在编译第一个文件时出现了错误,提示找不到"core_cm3.h"头文件。你在网上查到了一种解决方法是添加一个"stm32f10x_lib.h"文件,但是添加后又出现了其他头文件缺失的问题。根据引用\[3\]的内容,你发现在使用Keil 5.17编译时提示缺少"stm32f10x_lib.h"文件,但是在Keil 4.10版本中却可以编译成功。 根据你的描述,你可以尝试将程序内包含的"stm32f10x_lib.h"全部替换为"stm32f10x.h",并更新替换"sys.c"文件。这种方法是参考了原子的程序,可能更适合你的工程结构和代码风格。 总结起来,你遇到的问题是缺少"stm32f10x_lib.h"头文件,你可以尝试将其替换为"stm32f10x.h"并更新"sys.c"文件。这样应该能解决你的问题。 #### 引用[.reference_title] - *1* [解决 KEIL514 编译错误 \SYSTEM\sys\stm32f10x.h(478): error: #5: cannot open source input file "core_...](https://blog.csdn.net/weixin_43229238/article/details/100058705)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* *3* [error: #5: cannot open source input filestm32f10x_lib.h“:](https://blog.csdn.net/u014448875/article/details/117263643)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值