解决提示“Browse information of one or more files is not available: xxx\Source\system_gd32f20x.c“问题

今天分享一个之前遇到的让我头疼了一个下午的问题,就是因为我把一个头文件添加进工程之后就开始各种报错。

因为之前不知道为什么我的keil可能安装了一个新的,所以之前工程的头文件路径变了,然后编译就开始报错,错误信息为:

gd32f20x_libopt.h(43): error:  #5: cannot open source input file "RTE_Components.h": No such file or directory

然后我就把RTE_Components.h头文件路径添加进工程,结果再编译就提示我下述各种错误:
什么USART0没有定义啊,但是这个系统变量不是已经在系统文件定义了嘛

Handware\Usart2.c(100): error:  #20: identifier "USART0" is undefined

还有什么各种源文件信息不能浏览之类的错误提示:

Browse information of one or more files is not available:
.\Handware\Usart.c
.\CMSIS\GD\GD32F20x\Source\system_gd32f20x.c

后来才发现原因就是我把这个RTE_Components.h文件路径添加到了工程造成的,而之前提示我缺少该文件的也是系统,而提示RTE_Components.h的原因是我把关于cm3的一些头文件路径没有添加到路径造成的,而出现各种错误就是因为添加了该RTE_Components.h头文件造成的,其头文件代码如下:也就是用宏定义了gd32f20x.h文件而已。

#ifndef RTE_COMPONENTS_H
#define RTE_COMPONENTS_H


/*
 * Define the Device Header File: 
 */
#define CMSIS_device_header "gd32f20x.h"


#endif /* RTE_COMPONENTS_H */

所以如果有小伙伴也遇到上述这些错误,或许可以参考一下本人的经验,将RTE_Components.h头文件删除即可~

本人水平有限,上述信息仅供学习参考,如有错误和不妥之处,请多多指教。
另外创作不易,请勿抄袭,如果有帮助到大家的话希望大家可以点个赞和收藏,谢谢~

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
Want to know how to use an electronic component? This second book of a three-volume set includes key information on electronics parts for your projects--complete with photographs, schematics, and diagrams. You'll learn what each one does, how it works, why it's useful, and what variants exist. No matter how much you know about electronics, you'll find fascinating details you've never come across before. Perfect for teachers, hobbyists, engineers, and students of all ages, this reference puts reliable, fact-checked information right at your fingertips--whether you're refreshing your memory or exploring a component for the first time. Beginners will quickly grasp important concepts, and more experienced users will find the specific details their projects require. Volume 2 covers signal processing, including LEDs, LCDs, audio, thyristors, digital logic, and amplification. Unique: the first and only encyclopedia set on electronic components, distilled into three separate volumes Incredibly detailed: includes information distilled from hundreds of sources Easy to browse: parts are clearly organized by component type Authoritative: fact-checked by expert advisors to ensure that the information is both current and accurate Reliable: a more consistent source of information than online sources, product datasheets, and manufacturer's tutorials Instructive: each component description provides details about substitutions, common problems, and workarounds Comprehensive: Volume 1 covers power, electromagnetism, and discrete semiconductors; Volume 2 includes LEDs, LCDs, audio, thyristors, digital logic, and amplification; Volume 3 covers a range of sensing devices.

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

OMGMac

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

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

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

打赏作者

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

抵扣说明:

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

余额充值