Notifications
Clear all

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

 

(@ewtang)
New Member
Joined: 4 years ago
Posts: 4
Topic starter  

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.


   
Quote
RCWO
 RCWO
(@rcwo)
Member Admin Registered
Joined: 5 years ago
Posts: 59
 

@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)
Estimable Member
Joined: 4 years ago
Posts: 44
 

@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)
New Member
Joined: 4 years ago
Posts: 4
Topic starter  
@rcwo
Noted with thanks. I enjoy every bit of the tutorial.
This post was modified 4 years ago by ewtang

   
RCWO reacted
ReplyQuote
(@ewtang)
New Member
Joined: 4 years ago
Posts: 4
Topic starter  

@guanyang-he

謝謝

This post was modified 4 years ago by ewtang

   
ReplyQuote