add toolchains
This commit is contained in:
parent
4d62a2b215
commit
6ccb3defc1
|
@ -13,3 +13,9 @@
|
|||
[submodule "tools/firrtl"]
|
||||
path = tools/firrtl
|
||||
url = https://github.com/freechipsproject/firrtl
|
||||
[submodule "riscv-tools"]
|
||||
path = toolchains/riscv-tools
|
||||
url = https://github.com/riscv/riscv-tools.git
|
||||
[submodule "esp-tools"]
|
||||
path = toolchains/esp-tools
|
||||
url = https://github.com/ucb-bar/esp-tools.git
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
# RISC-V Project Template
|
||||
|
||||
**THIS BRANCH IS UNDER DEVELOPMENT**
|
||||
**IT CURRENTLY HAS MANY SUBMODULES**
|
||||
**PLEASE RUN ./build.sh TO UPDATE SUBMODULES, UNLESS YOU WANT TO SPEND A LONG TIME WAITING FOR SUBMODULE TO CLONE**
|
||||
|
||||
This is a starter template for your custom RISC-V project. It will allow you
|
||||
to leverage the Chisel HDL and RocketChip SoC generator to produce a
|
||||
RISC-V SoC with MMIO-mapped peripherals, DMA, and custom accelerators.
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# exit script if any command fails
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
unamestr=$(uname)
|
||||
RDIR=$(pwd)
|
||||
|
||||
# ignore riscv-tools for submodule init recursive
|
||||
# you must do this globally (otherwise riscv-tools deep
|
||||
# in the submodule tree will get pulled anyway
|
||||
git config --global submodule.riscv-tools.update none
|
||||
git config --global submodule.esp-tools.update none
|
||||
git config --global submodule.experimental-blocks.update none
|
||||
git submodule update --init --recursive #--jobs 8
|
||||
# unignore riscv-tools,catapult-shell2 globally
|
||||
git config --global --unset submodule.riscv-tools.update
|
||||
git config --global --unset submodule.experimental-blocks.update
|
|
@ -0,0 +1,37 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# exit script if any command fails
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
unamestr=$(uname)
|
||||
RDIR=$(pwd)
|
||||
|
||||
if [ $# -ne 0 ]; then
|
||||
TOOLCHAIN=$1
|
||||
if [ $1 == "riscv" ]; then
|
||||
TOOLCHAIN="riscv-tools"
|
||||
elif [ $1 == "hwacha" ]; then
|
||||
TOOLCHAIN="esp-tools"
|
||||
fi
|
||||
else
|
||||
TOOLCHAIN="riscv-tools"
|
||||
fi
|
||||
|
||||
INSTALL_DIR="$TOOLCHAIN-install"
|
||||
mkdir -p "$(pwd)/$INSTALL_DIR"
|
||||
|
||||
RISCV="$(pwd)/$INSTALL_DIR"
|
||||
|
||||
# install risc-v tools
|
||||
export RISCV="$RISCV"
|
||||
git submodule update --init --recursive toolchains/$TOOLCHAIN #--jobs 8
|
||||
cd "toolchains/$TOOLCHAIN"
|
||||
export MAKEFLAGS="-j16"
|
||||
./build.sh
|
||||
cd $RDIR
|
||||
|
||||
echo "export RISCV=$RISCV" > env.sh
|
||||
echo "export PATH=$RISCV/bin:$RDIR/$DTCversion:\$PATH" >> env.sh
|
||||
echo "export LD_LIBRARY_PATH=$RISCV/lib" >> env.sh
|
||||
echo "Toolchain Build Complete!"
|
|
@ -0,0 +1 @@
|
|||
Subproject commit f2e562c0f9089746c6beb15f04b00fbb48f2e9ae
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 962bc09873071aa7816d5f805c6e5797a3b5bcf7
|
Loading…
Reference in New Issue