一.先下载并初始化rocket-chip仓库
用一般用户就可以在/home/登陆账号(whch)/ 下载,用如下命令
si# Download and initialize the Rocket Chip repository
git clone https://github.com/ucb-bar/rocket-chip.git
cd rocket-chip
git submodule update --init
下面安装 rocket-chip generator所需要的依赖:工具链和chisel工具
二.下载riscv编译工具链
就是在rocket-chip下进行,以下命令都是连续的。
$ git clone https://github.com/freechipsproject/rocket-tools
$ cd rocket-tools
$ git submodule update --init --recursive
三.配置环境变量
whch@whch:~/rocket-chip$ pwd
/home/whch/rocket-chip #下面的环境路径
vim ~/.bashrc
#在里面加入如下命令
export TOP=/home/whch/rocket-chip
export RISCV=$TOP/ rocket-tools
export PATH=$PATH:$RISCV/bin
#然后wq保存
#接着让环境生效
source ~/.bashrc

本文介绍了如何解决在RISC-V环境中运行./build.sh脚本时遇到的问题,详细步骤包括:下载并初始化rocket-chip仓库,安装riscv编译工具链,配置环境变量,安装chisel与测试,以及编译工具链的安装。在编译过程中,特别提到了内存溢出问题的解决方法。
最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



