【踩坑】参考官方文档 蜂鸟E203从运行自测样例到运行HelloWorld路上的坑

【踩坑】参考官方文档 蜂鸟E203从运行自测样例到运行HelloWorld路上的坑

首先这里放出蜂鸟E203快速上手文档的链接,你也可以参考图书《手把手教你 RISC-V CPU工程与实践(上下册)》。

1. riscv-nuclei-elf-gcc: Command not found

如果第一步安装工具链时直接点击Centos/Ubuntu x86-64,会默认下载最新版本,也就是2023.10,但是由于官方对于工具链做出了一些修改,但教程没有跟上,当你运行

source regen.sh

时,会报错

make: Entering directory ‘/home/***/e203_hbirdv2/riscv-tools/riscv-tests/isa/generated’
/home/***/e203_hbirdv2/riscv-tools/riscv-tests/isa/…/…/prebuilt_tools/prefix/bin/riscv-nuclei-elf-gcc -march=rv32imafdc -mabi=ilp32 -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -I…//…/env/p -I…//macros/scalar -T…//…/env/p/link.ld …/rv32ui/simple.S -o rv32ui-p-simple
make: /home/***/e203_hbirdv2/riscv-tools/riscv-tests/isa/…/…/prebuilt_tools/prefix/bin/riscv-nuclei-elf-gcc: Command not found
…/Makefile:78: recipe for target ‘rv32ui-p-simple’ failed
make: *** [rv32ui-p-simple] Error 127
make: Leaving directory ‘/home/***/e203_hbirdv2/riscv-tools/riscv-tests/isa/generated’

这里参考了解决方法:解决:riscv-nuclei-elf-gcc: Command not found …/Makefile:78: recipe for target ‘rv32ui-p-simple‘ faile【分享】 Linux系统下各种工具链无法找到的解决方法都没有解决,于是我看了一下gcc里面的文件,里面的是riscv64-unknown-elf

其实感觉到这里就可以改改其他的东西用2023.10跑起来了,但刚入门的我不太会改,于是我选择重新安了2022.8版本的工具链覆盖它,虽然重装后就成功了,但为我下一个bug埋下了伏笔。

2. “monitor” command not supported by this target.

因为GNU工具链选择了2022.08的版本,所以我OpenOCD也选择了2022.08的版本。

结果在运行到

make upload SOC=hbirdv2 BOARD=ddr200t CORE=e203 DOWNLOAD=flash

时,出现报错

Remote communication error.  Target disconnected.: Connection reset by peer.
"monitor" command not supported by this target.
You can't do that when your target is `exec'
"monitor" command not supported by this target.

在这里插入图片描述大概是由于接触不良引起的,可以试着换几个插口,我是当天没解决第二天过来发现就好了。

3. Error finishing flash operation

好了之后变成了新的报错

Error finishing flash operation

2022.08版本
尝试了很多种办法都没有解决,最终在对比别人的版本和问询客服后觉得问题出现在OpenOCD上。于是我将对应的OpenOCD和工具链都换成了2022.12的版本,问题解决。
2022.12版本

运行成功

在这里插入图片描述

  • 15
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值