Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/action_utest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,20 @@ jobs:
- name: Install RISC-V ToolChains
if: ${{ matrix.legs.QEMU_ARCH == 'riscv64' && matrix.legs.UTEST != 'rtsmart/riscv64' && success() }}
run: |
wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/v1.4/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz
sudo tar zxvf riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz -C /opt
/opt/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gcc --version
echo "RTT_EXEC_PATH=/opt/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14/bin" >> $GITHUB_ENV
wget -q https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v12.3.0-2/xpack-riscv-none-elf-gcc-12.3.0-2-linux-x64.tar.gz
sudo tar zxvf xpack-riscv-none-elf-gcc-12.3.0-2-linux-x64.tar.gz -C /opt
/opt/xpack-riscv-none-elf-gcc-12.3.0-2/bin/riscv-none-elf-gcc --version
echo "RTT_EXEC_PATH=/opt/xpack-riscv-none-elf-gcc-12.3.0-2/bin" >> $GITHUB_ENV

- name: Install RISC-V Musl ToolChains
if: ${{ matrix.legs.QEMU_ARCH == 'riscv64' && matrix.legs.UTEST == 'rtsmart/riscv64' && success() }}
shell: bash
run: |
wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/v1.7/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2
wget -q https://download.rt-thread.org/download/rt-smart/toolchains/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不建议使用 download.rt-thread.org 的工具链用于ci,特别还是latest版本的工具链。如果需要,可以更新 toolchains-ci 中的版本。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toolchains-ci 如何升级?

sudo tar xjf riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2 -C /opt
/opt/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/bin/riscv64-unknown-linux-musl-gcc --version
/opt/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/bin/riscv64-linux-musleabi-gcc --version
echo "RTT_EXEC_PATH=/opt/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/bin" >> $GITHUB_ENV
echo "RTT_CC_PREFIX=riscv64-unknown-linux-musl-" >> $GITHUB_ENV
echo "RTT_CC_PREFIX=riscv64-linux-musleabi-" >> $GITHUB_ENV

- name: Install AARCH64 Musl ToolChains
if: ${{ matrix.legs.QEMU_ARCH == 'aarch64' && matrix.legs.UTEST == 'rtsmart/aarch64' && success() }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/bsp_buildings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ jobs:
- name: Install Riscv64-unknown-elf ToolChains
if: ${{ matrix.legs.RTT_TOOL_CHAIN == 'sourcery-riscv64-unknown-elf' && success() }}
run: |
wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/v1.4/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz
sudo tar zxf riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz -C /opt
/opt/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gcc --version
echo "RTT_EXEC_PATH=/opt/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14/bin" >> $GITHUB_ENV
wget -q https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v12.3.0-2/xpack-riscv-none-elf-gcc-12.3.0-2-linux-x64.tar.gz
sudo tar zxf xpack-riscv-none-elf-gcc-12.3.0-2-linux-x64.tar.gz -C /opt
/opt/xpack-riscv-none-elf-gcc-12.3.0-2/bin/riscv-none-elf-gcc --version
echo "RTT_EXEC_PATH=/opt/xpack-riscv-none-elf-gcc-12.3.0-2/bin" >> $GITHUB_ENV

- name: Install Riscv64 rt-thread smart general toolchain
if: ${{ matrix.legs.RTT_TOOL_CHAIN == 'sourcery-riscv64-general-toolchain' && success() }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/manual_bsp_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ jobs:
- name: Install Riscv64-unknown-elf ToolChains
if: ${{ github.event.inputs.bsp_tool_chain == 'sourcery-riscv64-unknown-elf' && success() }}
run: |
wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/v1.4/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz
sudo tar zxf riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz -C /opt
/opt/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gcc --version
echo "RTT_EXEC_PATH=/opt/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14/bin" >> $GITHUB_ENV
wget -q https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v12.3.0-2/xpack-riscv-none-elf-gcc-12.3.0-2-linux-x64.tar.gz
sudo tar zxf xpack-riscv-none-elf-gcc-12.3.0-2-linux-x64.tar.gz -C /opt
/opt/xpack-riscv-none-elf-gcc-12.3.0-2/bin/riscv-none-elf-gcc --version
echo "RTT_EXEC_PATH=/opt/xpack-riscv-none-elf-gcc-12.3.0-2/bin" >> $GITHUB_ENV

- name: Install Riscv-none-embed ToolChains
if: ${{ github.event.inputs.bsp_tool_chain == 'sourcery-riscv-none-embed' && success() }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/manual_dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ jobs:
- name: Install Riscv64-unknown-elf ToolChains
if: ${{ github.event.inputs.bsp_tool_chain == 'sourcery-riscv64-unknown-elf' && success() }}
run: |
source tools/ci/toolchain.sh riscv64-unknown-elf-gcc
echo "RTT_EXEC_PATH=/opt/riscv64-unknown-elf-gcc/bin" >> $GITHUB_ENV
source tools/ci/toolchain.sh riscv-none-elf-gcc
echo "RTT_EXEC_PATH=/opt/riscv-none-elf-gcc/bin" >> $GITHUB_ENV

- name: Install Riscv-none-embed ToolChains
if: ${{ github.event.inputs.bsp_tool_chain == 'sourcery-riscv-none-embed' && success() }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/manual_trigger_scons_except_STM32_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -334,10 +334,10 @@ jobs:
- name: Install Riscv64-unknown-elf ToolChains
if: ${{ matrix.legs.RTT_TOOL_CHAIN == 'sourcery-riscv64-unknown-elf' && success() }}
run: |
wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/v1.4/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz
sudo tar zxvf riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz -C /opt
/opt/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gcc --version
echo "RTT_EXEC_PATH=/opt/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14/bin" >> $GITHUB_ENV
wget -q https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v12.3.0-2/xpack-riscv-none-elf-gcc-12.3.0-2-linux-x64.tar.gz
sudo tar zxvf xpack-riscv-none-elf-gcc-12.3.0-2-linux-x64.tar.gz -C /opt
/opt/xpack-riscv-none-elf-gcc-12.3.0-2/bin/riscv-none-elf-gcc --version
echo "RTT_EXEC_PATH=/opt/xpack-riscv-none-elf-gcc-12.3.0-2/bin" >> $GITHUB_ENV

- name: Install Riscv-none-embed ToolChains
if: ${{ matrix.legs.RTT_TOOL_CHAIN == 'sourcery-riscv-none-embed' && success() }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/manual_trigger_scons_fail_bsp_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ jobs:
- name: Install Riscv64-unknown-elf ToolChains
if: ${{ matrix.legs.RTT_TOOL_CHAIN == 'sourcery-riscv64-unknown-elf' && success() }}
run: |
wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/v1.4/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz
sudo tar zxvf riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz -C /opt
/opt/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gcc --version
echo "RTT_EXEC_PATH=/opt/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14/bin" >> $GITHUB_ENV
wget -q https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v12.3.0-2/xpack-riscv-none-elf-gcc-12.3.0-2-linux-x64.tar.gz
sudo tar zxvf xpack-riscv-none-elf-gcc-12.3.0-2-linux-x64.tar.gz -C /opt
/opt/xpack-riscv-none-elf-gcc-12.3.0-2/bin/riscv-none-elf-gcc --version
echo "RTT_EXEC_PATH=/opt/xpack-riscv-none-elf-gcc-12.3.0-2/bin" >> $GITHUB_ENV

- name: Install Riscv-none-embed ToolChains
if: ${{ matrix.legs.RTT_TOOL_CHAIN == 'sourcery-riscv-none-embed' && success() }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/manual_trigger_update_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ jobs:
- name: Install Riscv64-unknown-elf ToolChains
if: ${{ github.event.inputs.bsp_tool_chain == 'sourcery-riscv64-unknown-elf' && success() }}
run: |
wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/v1.4/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz
sudo tar zxf riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz -C /opt
/opt/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gcc --version
echo "RTT_EXEC_PATH=/opt/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14/bin" >> $GITHUB_ENV
wget -q https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v12.3.0-2/xpack-riscv-none-elf-gcc-12.3.0-2-linux-x64.tar.gz
sudo tar zxf xpack-riscv-none-elf-gcc-12.3.0-2-linux-x64.tar.gz -C /opt
/opt/xpack-riscv-none-elf-gcc-12.3.0-2/bin/riscv-none-elf-gcc --version
echo "RTT_EXEC_PATH=/opt/xpack-riscv-none-elf-gcc-12.3.0-2/bin" >> $GITHUB_ENV

- name: Install Riscv-none-embed ToolChains
if: ${{ github.event.inputs.bsp_tool_chain == 'sourcery-riscv-none-embed' && success() }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/utest_auto_run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,21 +110,21 @@ jobs:
# Install RISC-V ToolChains
if [[ "${{ matrix.platform.QEMU_ARCH }}" == "riscv64" && "${{ matrix.platform.KERNEL }}" == "standard" ]]; then
echo "Starting install RISC-V ToolChains"
wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/v1.4/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz
sudo tar zxvf riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz -C /opt
/opt/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gcc --version
echo "RTT_EXEC_PATH=/opt/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14/bin" >> $GITHUB_ENV
wget -q https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v12.3.0-2/xpack-riscv-none-elf-gcc-12.3.0-2-linux-x64.tar.gz
sudo tar zxvf xpack-riscv-none-elf-gcc-12.3.0-2-linux-x64.tar.gz -C /opt
/opt/xpack-riscv-none-elf-gcc-12.3.0-2/bin/riscv-none-elf-gcc --version
echo "RTT_EXEC_PATH=/opt/xpack-riscv-none-elf-gcc-12.3.0-2/bin" >> $GITHUB_ENV
echo "TOOLCHAIN_INSTALLED=riscv" >> $GITHUB_ENV
fi

# Install RISC-V Musl ToolChains
if [[ "${{ matrix.platform.QEMU_ARCH }}" == "riscv64" && "${{ matrix.platform.KERNEL }}" == "rtsmart" ]]; then
echo "Starting install RISC-V Musl ToolChains"
wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/v1.7/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2
wget -q https://download.rt-thread.org/download/rt-smart/toolchains/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2
sudo tar xjf riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2 -C /opt
/opt/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/bin/riscv64-unknown-linux-musl-gcc --version
/opt/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/bin/riscv64-linux-musleabi-gcc --version
echo "RTT_EXEC_PATH=/opt/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/bin" >> $GITHUB_ENV
echo "RTT_CC_PREFIX=riscv64-unknown-linux-musl-" >> $GITHUB_ENV
echo "RTT_CC_PREFIX=riscv64-linux-musleabi-" >> $GITHUB_ENV
echo "TOOLCHAIN_INSTALLED=riscv-musl" >> $GITHUB_ENV
fi

Expand Down
24 changes: 24 additions & 0 deletions bsp/bluetrum/ab32vg1-ab-prougen/normal-env.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

@set def_arch=riscv64

pushd %RTT_ENV_URL%\..\..
set RTT_ENV_ROOT=%cd%
popd

:: Download from:
:: https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v12.3.0-2/xpack-riscv-none-elf-gcc-12.3.0-2-win32-x64.zip
:: Extract as:
:: C:\env-windows\tools\gnu_gcc\xpack-riscv-none-elf-gcc-12.3.0-2

@set RTT_CC=gcc
@set RTT_EXEC_PATH=%RTT_ENV_ROOT%\tools\gnu_gcc\xpack-riscv-none-elf-gcc-12.3.0-2\bin
@set RTT_CC_PREFIX=riscv-none-elf-

@set PATH=%RTT_EXEC_PATH%;%RTT_ENV_ROOT%\.venv\Scripts;%_OLD_VIRTUAL_PATH%

@echo "Arch => %def_arch%"
@echo "CC => %RTT_CC%"
@echo "PREFIX => %RTT_CC_PREFIX%"
@echo "EXEC_PATH => %RTT_EXEC_PATH%"

:EXIT
4 changes: 2 additions & 2 deletions bsp/bluetrum/ab32vg1-ab-prougen/rtconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

if PLATFORM == 'gcc':
# toolchains
PREFIX = 'riscv64-unknown-elf-'
PREFIX = 'riscv-none-elf-'
CC = PREFIX + 'gcc'
CXX = PREFIX + 'g++'
AS = PREFIX + 'gcc'
Expand All @@ -43,7 +43,7 @@
DEVICE = ' -mcmodel=medany -march=rv32imc -mabi=ilp32 -msave-restore -ffunction-sections'
CFLAGS = DEVICE + ' -D_USE_LONG_TIME_T'
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp'
LFLAGS = DEVICE + ' -nostartfiles -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,_start -T link.lds'
LFLAGS = DEVICE + ' -nostartfiles -Wl,--no-warn-rwx-segments -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,_start -T link.lds'
CPATH = ''
LPATH = ''

Expand Down
48 changes: 24 additions & 24 deletions bsp/qemu-virt64-riscv/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ English | [中文](./README_cn.md)

- [1. Introduction](#1-introduction)
- [2. Building](#2-building)
- [2.1. Installing the toolchain](#21-installing-the-toolchain)
- [2.2. Setting RT-Thread toolchain environment variables](#22-setting-rt-thread-toolchain-environment-variables)
- [2.3. Downloading the kernel](#23-downloading-the-kernel)
- [2.4. Configuring the kernel](#24-configuring-the-kernel)
- [2.5. Compiling the kernel](#25-compiling-the-kernel)
- [2.1. Installing the toolchain](#21-installing-the-toolchain)
- [2.2. Setting RT-Thread toolchain environment variables](#22-setting-rt-thread-toolchain-environment-variables)
- [2.3. Downloading the kernel](#23-downloading-the-kernel)
- [2.4. Configuring the kernel](#24-configuring-the-kernel)
- [2.5. Compiling the kernel](#25-compiling-the-kernel)
- [3. Running](#3-running)
- [3.1. Installing QEMU](#31-installing-qemu)
- [3.2. Running QEMU](#32-running-qemu)
- [3.2.1. Running RT-Thread Standard Edition](#321-running-rt-thread-standard-edition)
- [3.2.2. Running RT-Thread Smart version](#322-running-rt-thread-smart-version)
- [3.2.3. Running RT-Thread Smart version + Root file-system](#323-running-rt-thread-smart-version--root-file-system)
- [3.1. Installing QEMU](#31-installing-qemu)
- [3.2. Running QEMU](#32-running-qemu)
- [3.2.1. Running RT-Thread Standard Edition](#321-running-rt-thread-standard-edition)
- [3.2.2. Running RT-Thread Smart version](#322-running-rt-thread-smart-version)
- [3.2.3. Running RT-Thread Smart version + Root file-system](#323-running-rt-thread-smart-version--root-file-system)
- [4. How to use rv64ilp32 toolchain](#4-how-to-use-rv64ilp32-toolchain)
- [5. Contact information](#5-contact-information)

Expand Down Expand Up @@ -49,31 +49,31 @@ The specific toolchain used is consistent with the official RT-Thread. For the s
- name: Install RISC-V ToolChains
if: ${{ matrix.legs.QEMU_ARCH == 'riscv64' && matrix.legs.UTEST != 'rtsmart/riscv64' && success() }}
run: |
wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/v1.4/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz
sudo tar zxvf riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz -C /opt
/opt/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gcc --version
echo "RTT_EXEC_PATH=/opt/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14/bin" >> $GITHUB_ENV
wget -q https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v12.3.0-2/xpack-riscv-none-elf-gcc-12.3.0-2-linux-x64.tar.gz
sudo tar zxvf xpack-riscv-none-elf-gcc-12.3.0-2-linux-x64.tar.gz -C /opt
/opt/xpack-riscv-none-elf-gcc-12.3.0-2/bin/riscv-none-elf-gcc --version
echo "RTT_EXEC_PATH=/opt/xpack-riscv-none-elf-gcc-12.3.0-2/bin" >> $GITHUB_ENV

- name: Install RISC-V Musl ToolChains
if: ${{ matrix.legs.QEMU_ARCH == 'riscv64' && matrix.legs.UTEST == 'rtsmart/riscv64' && success() }}
shell: bash
run: |
wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/v1.7/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2
wget -q https://download.rt-thread.org/download/rt-smart/toolchains/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2
sudo tar xjf riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2 -C /opt
/opt/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/bin/riscv64-unknown-linux-musl-gcc --version
/opt/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/bin/riscv64-linux-musleabi-gcc --version
echo "RTT_EXEC_PATH=/opt/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/bin" >> $GITHUB_ENV
echo "RTT_CC_PREFIX=riscv64-unknown-linux-musl-" >> $GITHUB_ENV
echo "RTT_CC_PREFIX=riscv64-linux-musleabi-" >> $GITHUB_ENV
```

Among them, `riscv64-unknown-elf-gcc` is used to build the RT-Thread Standard version, and `riscv64-unknown-linux-musl-gcc` is used to build the RT-Thread Smart version. Download them to your local computer according to the links shown above and decompress them.
Among them, `riscv-none-elf-gcc` is used to build the RT-Thread Standard version, and `riscv64-linux-musleabi-gcc` is used to build the RT-Thread Smart version. Download them to your local computer according to the links shown above and decompress them.

## 2.2. Setting RT-Thread toolchain environment variables

There are three environment variables related to the RT-Thread toolchain

- `RTT_CC` is the toolchain name, which is `"gcc"` here
- `RTT_CC_PREFIX`: is the toolchain prefix, which is `"riscv64-unknown-elf-"` for the Standard version and `"riscv64-unknown-linux-musl-"` for the Smart version.
- `RTT_EXEC_PATH`: the path where the bin folder of the toolchain is located, such as `"$HOME/tools/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14/bin"`. This is set according to the actual path after personal download and decompression. Note that the toolchains of the RT-Thread standard version and the Smart version are two different versions, and the path name of `RTT_EXEC_PATH` must be set to `bin`.
- `RTT_CC_PREFIX`: is the toolchain prefix, which is `"riscv-none-elf-"` for the Standard version and `"riscv64-linux-musleabi-"` for the Smart version.
- `RTT_EXEC_PATH`: the path where the bin folder of the toolchain is located, such as `"$HOME/tools/xpack-riscv-none-elf-gcc-12.3.0-2/bin"`. This is set according to the actual path after personal download and decompression. Note that the toolchains of the RT-Thread standard version and the Smart version are two different versions, and the path name of `RTT_EXEC_PATH` must be set to `bin`.

If you use them all the time, it is recommended to export these three environment variables in the `.bashrc` file.

Expand Down Expand Up @@ -381,8 +381,8 @@ etc mnt run tc var
```bash
Memory region Used Size Region Size %age Used
SRAM: 225856 B 16 MB 1.35%
riscv64-unknown-elf-objcopy -O binary rtthread.elf rtthread.bin
riscv64-unknown-elf-size rtthread.elf
riscv-none-elf-objcopy -O binary rtthread.elf rtthread.bin
riscv-none-elf-size rtthread.elf
text data bss dec hex filename
150907 3664 71268 225839 3722f rtthread.elf
```
Expand All @@ -392,8 +392,8 @@ etc mnt run tc var
```bash
Memory region Used Size Region Size %age Used
SRAM: 209376 B 16 MB 1.25%
riscv64-unknown-elf-objcopy -O binary rtthread.elf rtthread.bin
riscv64-unknown-elf-size rtthread.elf
riscv-none-elf-objcopy -O binary rtthread.elf rtthread.bin
riscv-none-elf-size rtthread.elf
text data bss dec hex filename
138739 1356 69276 209371 331db rtthread.elf
```
Expand Down
Loading