RISCV C至UART的十六进制编译

问题描述

我正在尝试将UART回送程序转换为相应的十六进制代码。命令

riscv32-unknown-elf-gcc test.c -march=rv32im
riscv32-unknown-elf-gcc -o test test.c

同时给出错误的命令

test.c:2:10: fatal error: rt/rt_api.h: No such file or directory
 #include <rt/rt_api.h>
          ^~~~~~~~~~~~~
compilation terminated.

使用API​​编译c代码的确切命令是什么,我正在使用Pulppissimo工具链。 我的程序是 https://github.com/pulp-platform/pulp-rt-examples/tree/master/periph/uart/loopback

解决方法

您有此错误,因为riscv gcc搜索路径中不存在rt / rt_api.h。
要查看搜索路径中存在的文件夹,您可以在命令中添加out = pd.concat([S.shift(x) for x in range(1,6)[::-1]],1) Out[124]: 0 1 2 3 4 0 NaN NaN NaN NaN NaN 1 NaN NaN NaN NaN 1.0 2 NaN NaN NaN 1.0 1.0 3 NaN NaN 1.0 1.0 2.0 4 NaN 1.0 1.0 2.0 3.0 5 1.0 1.0 2.0 3.0 5.0 6 1.0 2.0 3.0 5.0 8.0 7 2.0 3.0 5.0 8.0 13.0 8 3.0 5.0 8.0 13.0 21.0 选项或使用:

-v

您所能做的就是找到rt / rt_api.h的位置,并提供找到gcc的路径。您的命令将是:

riscv32-unknown-elf-cpp -v /dev/null /dev/null

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...