FoRUmS

Notes on Appendix A: Using the Native RISC-V Toolchain and OpenOCD in Ubuntu 18.04  

 

ewtang
(@ewtang)
New Member
Joined: 2 months ago
Posts: 4
02/01/2021 7:44 am  

I followed the procedures of "III. Simulating a program on RVfpga using Verilator" in Appendix A of GSG and I haven't installed PlatformIO.

In step 4, make failed as the Makefile requires env variable TOOLCHAIN_PREFIX to be set as follows:

TOOLCHAIN_PREFIX=/opt/riscv/bin/riscv32-unknown-elf-

Please check.


ReplyQuote
RCWO
 RCWO
(@rcwo)
Member Admin
Joined: 1 year ago
Posts: 15
03/01/2021 1:31 am  

@ewtang  It is a good question - our thanks to you for studying our materials so carefully - and pointing out this key point..

QUESTION: I followed the procedures of "III. Simulating a program on RVfpga using Verilator" in Appendix A of GSG and I haven't installed PlatformIO:
In step 4, make failed as the Makefile requires env variable TOOLCHAIN_PREFIX to be set as follows: TOOLCHAIN_PREFIX=/opt/riscv/bin/riscv32-unknown-elf-

ANSWER from RVfpga co-Author Prof D. Chaver-Martinez:
*You are totally right
*Yes, the first line in the makefiles available at RVfpga/examples/AL_Operations/commandLine and RVfpga/examples/LedsSwitches/commandLine should be replaced by the one that you propose:
*Currently shown: TOOLCHAIN_PREFIX ?= ${HOME}/.platformio/packages/toolchain-riscv/bin/riscv64-unknown-elf-
*CHANGE to: TOOLCHAIN_PREFIX=/opt/riscv/bin/riscv32-unknown-elf-

Note:
- The current line points to the Toolchain included in PlatformIO and, if you installed PlatformIO previously, the current Makefile should also work.
However, as you point out, the proper way is to reference the RISC-V Toolchain installed natively as explained in "Appendix A - I. Native installation on a Linux Ubuntu OS".

These modifications will be included in v1.1
 
Thank you for your excellent work with RVfpga.


ReplyQuote
guanyang.he
(@guanyang-he)
Member Admin
Joined: 8 months ago
Posts: 20
03/01/2021 12:54 pm  

@ewtang

这是一个非常好的问题。感谢您如此认真地研究我们的材料-并指出了这一关键点。

问题:我遵循了GSG附录A中的 “III,使用Verilator在RVfpga上模拟程序” 的过程,但我尚未安装PlatformIO:
-在第4步中,生成失败,因为Makefile要求将环境变量TOOLCHAIN_PREFIX设置如下:TOOLCHAIN_PREFIX=/opt/riscv/bin/riscv32-unknown-elf-

RVfpga作者之一D.Chaver-Martinez教授的答案:
*您完全正确
*是的,应该用您建议的内容替换RVfpga/examples/AL_Operations/commandLine and RVfpga/examples/LedsSwitches/commandLine上的makefile中的第一行:
*当前显示: TOOLCHAIN_PREFIX ?= ${HOME}/.platformio/packages/toolchain-riscv/bin/riscv64-unknown-elf-
*更改为:TOOLCHAIN_PREFIX=/opt/riscv/bin/riscv32-unknown-elf-

注意:
-当前行指向PlatformIO中包含的工具链,如果以前安装了PlatformIO,则当前的Makefile也应该起作用。
但是,正如您所指出的那样,正确的方法是引用本地安装的RISC-V工具链,如“附录A-I. Linux Ubuntu OS上的本地安装”中所述。

这些修改将包含在v1.1中

感谢您与RVfpga的出色帮助。


ReplyQuote
ewtang
(@ewtang)
New Member
Joined: 2 months ago
Posts: 4
04/02/2021 2:44 am  
@rcwo
Noted with thanks. I enjoy every bit of the tutorial.
This post was modified 4 weeks ago by ewtang

RCWO liked
ReplyQuote
ewtang
(@ewtang)
New Member
Joined: 2 months ago
Posts: 4
04/02/2021 2:44 am  

@guanyang-he

謝謝

This post was modified 4 weeks ago by ewtang

ReplyQuote