687
edits
Changes
→Build and install gdb
cd $HOME/obj/gdb-build
../../src/gdb-8.3/configure --prefix $HOME/riscv --target riscv64-unknown-elf --enable-multilib--with-python=/usr/local/bin/python3
make -j8 && make install
cd $HOME/obj/gcc-build
../../src/gcc-9.2.0/configure --prefix $HOME/riscv --target riscv64-unknown-elf --enable-multilib --enable-languages=c --with-gnu-as --with-gnu-ld --without-headers --with-newlib
make -j8 all-gcc && make install-gcc
rm -rf $HOME/obj/gcc-build && mkdir -p $HOME/obj/gcc-build
cd $HOME/obj/gcc-build
../../src/gcc-9.2.0/configure --prefix $HOME/riscv --target riscv64-unknown-elf --enable-multilib --enable-languages=c --with-gnu-as --with-gnu-ld --with-newlib
make -j8 all && make install
cd $HOME/src
git clone --recursive git@github.com:riscv/riscv-openocd.git
cd $HOME/src/riscv-openocd
# brew install pkg-config libtool automake autoconf # required by bootstrap
./configure --prefix=$HOME/riscv --enable-remote-bitbang --enable-jtag_vpi
make -j8 && make install
== Add tools to PATH and set RISCV ==
printf 'PATH=$HOME/riscv/bin:$PATH\nRISCV=$HOME/riscv\nexport RISCV\n' >> $HOME/lib/profile.local
Also, if you have installed spike from a repository, you might want to symlink it into <code>RISCV/bin</code>.
ln -s /usr/local/bin/spike $HOME/riscv/bin/spike