From 214c24386ada42d9fff7b799739c6ea24ae179c0 Mon Sep 17 00:00:00 2001 From: Peter Harper <77111776+peterharperuk@users.noreply.github.com> Date: Wed, 2 Jul 2025 15:42:53 +0100 Subject: [PATCH] Add a "quick start" section for RISC-V to the readme (#2537) --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 4d24d9fa..08a10402 100644 --- a/README.md +++ b/README.md @@ -201,3 +201,23 @@ instructions for other platforms, and just in general, we recommend you see [Ras # RISC-V support on RP2350 See [Raspberry Pi Pico-series C/C++ SDK](https://rptl.io/pico-c-sdk) for information on setting up a build environment for RISC-V on RP2350. + +## RISC-V quick start + +The [pico-sdk-tools](https://github.com/raspberrypi/pico-sdk-tools/releases) repository contains some prebuilt versions of the RISC-V compiler. + +You can use these to get a working RISC-V compiler on Raspberry Pi OS for example. + +``` +wget https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-5/riscv-toolchain-14-aarch64-lin.tar.gz +sudo mkdir -p /opt/riscv/riscv-toolchain-14 +sudo chown $USER /opt/riscv/riscv-toolchain-14 +tar xvf riscv-toolchain-14-aarch64-lin.tar.gz -C /opt/riscv/riscv-toolchain-14 +``` + +To use the RISC-V compiler to build code you need to set a couple of environment variables and run cmake from fresh. + +``` +export PICO_TOOLCHAIN_PATH=/opt/riscv/riscv-toolchain-14/ +export PICO_PLATFORM=rp2350-riscv +```