在stm32搭建工程记录: cannot open source input file “RTE_Components.h“: No such file or director
stm32搭建工程记录: cannot open source input file “RTE_Components.h“: No such file or director等一系列文件缺失问题
·
项目场景:stm32零基础学习创建项目
问题描述
问题1、 cannot open source input file “RTE_Components.h“: No such file or director
问题2、Build started: Project: stm32f10x_Project_Template *** Using Compiler ‘V6.14’, folder: ‘E:\Keil\ARM\ARMCLANG\Bin’ Build target ‘Template’ CMSIS/core_cm3.c(445): error: non-ASM statement in naked function is not supported uint32_t result=0; ^ CMSIS/core_cm3.c(442): note: attribute is here uint32_t __get_PSP(void) attribute( ( naked ) ); ^ CMSIS/core_cm3.c(465): error: parameter references not allowed in naked functions “BX lr \n\t” : : “r” (topOfProcStack) ); ^ CMSIS/core_cm3.c(461): note: attribute is here void __set_PSP(uint32_t topOfProcStack) attribute( ( naked ) ); ^ CMSIS/core_cm3.c(479): error: non-ASM statement in naked function is not supported uint32_t result=0; ^ CMSIS/core_cm3.c(476): note: attribute is here uint32_t __get_MSP(void) attribute( ( naked ) ); ^ CMSIS/core_cm3.c(499): error: parameter references not allowed in naked functions “BX lr \n\t” : : “r” (topOfMainStack) ); ^ CMSIS/core_cm3.c(495): note: attribute is here void __set_MSP(uint32_t topOfMainStack) attribute( ( naked ) ); ^ 4 errors generated. compiling core_cm3.c… “.\Objects\stm32f10x_Project_Template.axf” - 4 Error(s), 0 Warning(s). Target not created. Build Time Elapsed: 00:00:00
@Override
public void run() {
bytes = mmInStream.read(buffer);
mHandler.obtainMessage(READ_DATA, bytes, -1, buffer).sendToTarget();
}
原因分析:
问题1:.h文件杂乱分布,配置路径的时候得一个一个找了再配置路径
问题2:编译器版本过高
例如:Handler 发送消息有两种方式,分别是 Handler.obtainMessage()和 Handler.sendMessage(),其中 obtainMessage 方式当数据量过大时,由于 MessageQuene 大小也有限,所以当 message 处理不及时时,会造成先传的数据被覆盖,进而导致数据丢失。
解决方案:
问题一:将报错的.h文件找到并复制路径,再回去配置便可通过编译
问题二:降低编译器版本
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐



所有评论(0)