Quantcast
Viewing all articles
Browse latest Browse all 5540

General • Re: pico riscv compiler

I followed the instructions in one of the PDF files but can't remember which and can't find it so included what I did below. That successfully built the RISC-V compiler on my Pi 4B 1G, Bookworm 32-bit.

It was a 10 hour build and ate 16 GB of disk space.

And because it's a Pi 4B 1GB I had to enable a 2GB swap file to prevent it crashing out with Out of Memory after 20 or so minutes.

Code:

cd ~/appsmkdir riscvsudo apt-get install autoconf automake autotools-dev curl python3 \                     python3-pip libmpc-dev libmpfr-dev libgmp-dev \                     gawk build-essential bison flex texinfo gperf \                     libtool patchutils bc zlib1g-dev libexpat-dev \                     ninja-build git cmake libglib2.0-dev libslirp-devsudo mkdir -p /opt/riscv/gcc14-rp2350-no-zcmpsudo chown -R $(whoami) /opt/riscv/gcc14-rp2350-no-zcmpgit clone https://github.com/riscv/riscv-gnu-toolchaincd riscv-gnu-toolchaingit clone https://github.com/gcc-mirror/gcc gcc-14 -b releases/gcc-14 ./configure \  -prefix=/opt/riscv/gcc14-rp2350-no-zcmp \  --with-arch=rv32ima_zicsr_zifencei_zba_zbb_zbs_zbkb_zca_zcb \  --with-abi=ilp32 \  --with-multilib-generator="rv32ima_zicsr_zifencei_zba_zbb_zbs_zbkb_zca_zcb-ilp32--;rv32imac_zicsr_zifencei_zba_zbb_zbs_zbkb-ilp32--" \  --with-gcc-src=`pwd`/gcc-14time make
Then updated my '~/.bashrc' -

Code:

cd ~nano .bashrc  export PATH="$PATH:/opt/riscv/gcc14-rp2350-no-zcmp/bin"
You may have to logout or reboot for that to take effect but I believe you should be able to execute that 'export' line at the command line and it will instantly happen. YMMV.

No joy yet with dragging and dropping that '/opt/riscv/gcc14-rp2350-no-zcmp/bin' to my Pi 3B Buster 32-bit. It seems to have a GCC dependency on '/lib/arm-linux-gnueabihf/libc.so.6' I haven't resolved. Which is a shame because I don't have the disk space to build it on that.

Statistics: Posted by hippy — Sun Aug 18, 2024 7:59 pm



Viewing all articles
Browse latest Browse all 5540

Trending Articles