-
Notifications
You must be signed in to change notification settings - Fork 12
how to build flash and use examples on linux
Benjamin Vernoux edited this page Nov 1, 2023
·
20 revisions
Toolchain available and compatible:
- Open source GCC RISC-V v12.2.0 toolchain https://github.com/hydrausb3/riscv-none-elf-gcc-xpack/releases
- MRS_Toolchain_Linux_x64_V1.50 (Toolchain&Debugger)
- MounRiver_Studio_Community_Linux_x64_V120 (RISC-V IDE Community) from shell
- Tested on Ubuntu x64 22.04 LTS & 20.04 LTS(does not work on ArchLinux)
- Download open source GCC RISC-V v12.2.0 from https://github.com/hydrausb3/riscv-none-elf-gcc-xpack/releases
- Extract the archive and add the bin directory to your PATH
PATH=$PATH:~/xpack-riscv-none-elf-gcc-12.2.0-1/bin
- Alternative closed source toolchain Download MRS_Toolchain_Linux_x64_V1.50.tar.xz
- Extract the archive and install it like described in the README
- Add the path to "RISC-V Embedded GCC" bin directory for MRS_Toolchain_Linux_x64_V1.50
PATH=$PATH:~/MRS_Toolchain_Linux_x64_V1.50/RISC-V\ Embedded\ GCC/bin
- Alternatively you can download MounRiver_Studio_Community_Linux_x64_V120.tar.xz
- Extract the archive and install it like described in the README
- Add the path to "RISC-V Embedded GCC" bin directory for MounRiver_Studio_Community_Linux_x64_V120
PATH=$PATH:~/MounRiver_Studio_Community_Linux_x64_V120/MRS_Community/toolchain/RISC-V\ Embedded\ GCC/bin
- Start a Terminal emulator
- Prerequisites
- Install git
sudo apt install git
- Install git
cd ~
git clone --recursive https://github.com/hydrausb3/hydrausb3_fw.git
- Change current directory to firmware example (here HydraUSB3_Blink_ULED)
cd ~/hydrausb3_fw/HydraUSB3_Blink_ULED
- Clean and build the firmware example
make clean all
- The flashable firmware with
wch-ch56x-isp
(*.bin) is available in~/hydrausb3_fw/HydraUSB3_Blink_ULED/build/HydraUSB3_Blink_ULED.bin
See https://github.com/hydrausb3/hydrausb3_fw/wiki/Flash-and-use-hydrausb3_fw-example-on-Linux