Skip to content

Instantly share code, notes, and snippets.

@5shekel
Last active May 29, 2023 08:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 5shekel/3eb7de5b2139f68727455a9f20bdf07d to your computer and use it in GitHub Desktop.
Save 5shekel/3eb7de5b2139f68727455a9f20bdf07d to your computer and use it in GitHub Desktop.

notes for fedora

for https://github.com/cnlohr/ch32v003fun we need to have riscv64-unknown-elf-gcc, alas it is not on fedora so...

this looks ok binutils-riscv64-linux-gnu but

following https://github.com/riscv-collab/riscv-gnu-toolchain we need to compile our own on fedora 6 Gb of submodules, took about 40min to dl on iffy network

sudo dnf install autoconf automake python3 libmpc-devel mpfr-devel gmp-devel gawk libusb1-devel  bison flex texinfo patchutils gcc gcc-c++ zlib-devel expat-devel
#submodules take a long time, i prefer to see progress.
#but the submodules will be pulled by make later, if not specified here.
git clone --recursive --progress https://github.com/riscv-collab/riscv-gnu-toolchain && cd riscv-gnu-toolchain

sudo mkdir /opt/riscv
./configure --prefix=/opt/riscv
sudo make

as discussed in the project readme, add /opt/riscv/bin to your path

alternativly (?) https://xpack.github.io/dev-tools/riscv-none-elf-gcc/install/

sudo dnf install npm -y
sudo npm install --global xpm@latest
cd my-project
xpm init # Only at first use.
xpm install @xpack-dev-tools/riscv-none-elf-gcc@latest --verbose

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment