clean up
This commit is contained in:
@@ -10,18 +10,21 @@ Below is the guide to set up the build environment, compile, and flash the CH32V
|
||||
|
||||
## 1. Install toolchain
|
||||
|
||||
Download xPack RISC-V GCC:
|
||||
### 1.1. Download xPack RISC-V GCC:
|
||||
[https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases](https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases)
|
||||
|
||||
Choose `linux-x64` for X86-64 or `linux-arm64` for ARM64.
|
||||
|
||||
Extract it:
|
||||
```bash
|
||||
cd ~/Downloads
|
||||
mkdir -p ~/toolchains
|
||||
tar -xzf xpack-riscv-none-elf-gcc-*-linux-x64.tar.gz -C ~/toolchains
|
||||
tar -xzf xpack-riscv-none-elf-gcc-15.2.0-1-linux-x64.tar.gz -C ~/toolchains # Update e.g.: to your version
|
||||
```
|
||||
|
||||
Activate it (add this to your ~/.bashrc for permanence):
|
||||
```Bash
|
||||
export TOOLCHAIN=$HOME/toolchains/xpack-riscv-none-elf-gcc-* # Update e.g.: xpack-riscv-none-elf-gcc-15.2.0-1
|
||||
export TOOLCHAIN=$HOME/toolchains/xpack-riscv-none-elf-gcc-15.2.0-1 # Update e.g.: to your version
|
||||
export PATH=$TOOLCHAIN/bin:$PATH
|
||||
```
|
||||
|
||||
@@ -30,9 +33,24 @@ Verify the installation:
|
||||
riscv-none-elf-gcc --version
|
||||
```
|
||||
|
||||
It should print:
|
||||
```Bash
|
||||
riscv-none-elf-gcc (xPack GNU RISC-V Embedded GCC x86_64) 15.2.0
|
||||
Copyright (C) 2025 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
```
|
||||
|
||||
### 1.2. Install dependencies
|
||||
```bash
|
||||
sudo apt update
|
||||
sudo apt install libusb-1.0-0-dev libudev-dev
|
||||
```
|
||||
|
||||
## 2. Install Flashing Tool (minichlink)
|
||||
Clone the ch32fun repository and build minichlink:
|
||||
```Bash
|
||||
cd ~/
|
||||
git clone https://github.com/cnlohr/ch32fun ~/ch32fun
|
||||
cd ~/ch32fun/minichlink
|
||||
make
|
||||
|
||||
Reference in New Issue
Block a user