Keil Studio for VScode 创建工程出现 ‘RTE_Components.h‘ was not found

项目场景

Keil Studio for VScode 创建工程


问题描述

出现 ‘RTE_Components.h’ was not found,并且无法编译。


原因分析

Arm CMSIS csolution extension 的一个 bug,最后从 CMSIS Build Manager 的 output 查出问题。

cbuild d:\Develop\Projects\VSCodeProjects\demo\demo.csolution.yml -t database --context .Debug+STM32F103C8
spawn cbuild ENOENT
cbuild d:\Develop\Projects\VSCodeProjects\demo\demo.csolution.yml -t database --context .Debug+STM32F103C8
info cbuild: Build Invocation 2.2.1 (C) 2023 Arm Ltd. and Contributors
D:/Develop/Projects/VSCodeProjects/demo/demo.cbuild-idx.yml - info csolution: file generated successfully
D:/Develop/Projects/VSCodeProjects/demo/Project/Project.Debug+STM32F103C8.cbuild.yml - info csolution: file generated successfully
D:/Develop/Projects/VSCodeProjects/demo/demo.cbuild-pack.yml - info csolution: file generated successfully
D:/Develop/Projects/VSCodeProjects/demo/Project/Project.Debug+STM32F103C8.cprj - info csolution: file generated successfully
info cbuild: Processing 1 context(s)
info cbuild: Retrieve build information for context: "Project.Debug+STM32F103C8"
================================================================
info cbuild: (1/1) Building context: "Project.Debug+STM32F103C8"

M650: Command completed successfully.


*** WARNING M634:
  File 'd:/Develop/Projects/VSCodeProjects/demo/Project/RTE/_Debug_STM32F103C8/RTE_Components.h' was not found, use the option '--update-rte' to generate it

*** ERROR M204:
  Path not found: 'd:/Develop/Projects/VSCodeProjects/demo/Project/RTE/_Debug_STM32F103C8'!
error cbuild: error executing 'cbuildgen cmake'
error cbuild: error building 'd:\Develop\Projects\VSCodeProjects\demo\Project\Project.Debug+STM32F103C8.cprj'
error cbuild: exit status 1
Process failed with exit code 4294967295
Process failed with exit code 4294967295


解决方案

根据 Log 提示,输入以下命令

cbuild xxx.csolution.yml --update-rte

xxx 换成你 csolution project 的名字
例如我的
在这里插入图片描述
我就需要输入命令:

cbuild demo.csolution.yml --update-rte
  • 6
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值