lowRISC / lowrisc-chip

The root repo for lowRISC project and FPGA demos.
http://www.lowrisc.org/
Other
596 stars 148 forks source link

riscv environment variable #155

Closed nak-tech closed 4 years ago

nak-tech commented 4 years ago

I clone riscv-gnu-toolchain from https://github.com/riscv/riscv-gnu-toolchain, then install the toolschain, point RISCV :=/opt/riscv in Makefile, the hierarchy in /opt/riscv is /opt/riscv/ |--bin |--include |--lib |--libexec |--riscv32-unknown-elf |--riscv64-unknown-linux-gnu |--share |--sysroot then run make bitstream, I got following message:

make -C ../../../rocket-chip/vsim verilog make[1]: Entering directory '/home/ghlab/work/lowrisc-chip/lowrisc-chip/rocket-chip/vsim' /home/ghlab/work/lowrisc-chip/lowrisc-chip/rocket-chip/Makefrag:3: Please set environment variable RISCV. Please take a look at README. Stop. make[1]: Leaving directory '/home/ghlab/work/lowrisc-chip/lowrisc-chip/rocket-chip/vsim' Makefile:120: recipe for target 'verilog' failed make: [verilog] Error 2

Wrong tool or wrong variable setting?

jrrk2 commented 4 years ago

try using:

export RISCV=/opt/riscv

in your shell. This will ensure that it applies to all commands you run, not just one Makefile. Likewise any settings in Makefiles will need export in front of them to apply to the environment of subsidiary Makefiles. Also be sue to mention what branch of lowrisc-chip you are working on in your issue.

nak-tech commented 4 years ago

here is the next error msg.

make -C ../../../rocket-chip/vsim verilog make[1]: Entering directory '/home/ghlab/work/lowrisc-chip/lowrisc-chip/rocket-chip/vsim' make -C /home/ghlab/work/lowrisc-chip/lowrisc-chip/rocket-chip/firrtl SBT="java -Xmx2G -Xss8M -XX:MaxPermSize=256M -jar /home/ghlab/work/lowrisc-chip/lowrisc-chip/rocket-chip/sbt-launch.jar" root_dir=/home/ghlab/work/lowrisc-chip/lowrisc-chip/rocket-chip/firrtl build-scala make[2]: Entering directory '/home/ghlab/work/lowrisc-chip/lowrisc-chip/rocket-chip/firrtl' java -Xmx2G -Xss8M -XX:MaxPermSize=256M -jar /home/ghlab/work/lowrisc-chip/lowrisc-chip/rocket-chip/sbt-launch.jar "assembly" /bin/sh: 1: java: not found Makefile:25: recipe for target '/home/ghlab/work/lowrisc-chip/lowrisc-chip/rocket-chip/firrtl/utils/bin/firrtl.jar' failed make[2]: [/home/ghlab/work/lowrisc-chip/lowrisc-chip/rocket-chip/firrtl/utils/bin/firrtl.jar] Error 127 make[2]: Leaving directory '/home/ghlab/work/lowrisc-chip/lowrisc-chip/rocket-chip/firrtl' /home/ghlab/work/lowrisc-chip/lowrisc-chip/rocket-chip/Makefrag:27: recipe for target '/home/ghlab/work/lowrisc-chip/lowrisc-chip/rocket-chip/firrtl/utils/bin/firrtl.jar' failed make[1]: [/home/ghlab/work/lowrisc-chip/lowrisc-chip/rocket-chip/firrtl/utils/bin/firrtl.jar] Error 2 make[1]: Leaving directory '/home/ghlab/work/lowrisc-chip/lowrisc-chip/rocket-chip/vsim' Makefile:120: recipe for target 'verilog' failed make: *** [verilog] Error 2

jrrk2 commented 4 years ago

Did you install the list of pre-requisites as per the lowrisc documentation ?

sudo apt-get install autoconf automake autotools-dev curl \ libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison \ flex texinfo gperf libncurses5-dev libusb-1.0-0-dev libboost-dev \ swig git libtool libreadline-dev libelf-dev python-dev \ microcom chrpath gawk texinfo nfs-kernel-server xinetd pseudo \ libusb-1.0-0-dev hugo device-tree-compiler zlib1g-dev libssl-dev \ debootstrap debian-ports-archive-keyring qemu-user-static iverilog \ openjdk-8-jdk-headless iperf3 libglib2.0-dev libpixman-1-dev

nak-tech commented 4 years ago

I did not see this information, is that should be found at documentation link in 'See the documentation for build instructions.' that is a void link.

nak-tech commented 4 years ago

bit generated. Thanks.