diff --git a/.github/workflows/action_utest.yml b/.github/workflows/action_utest.yml index 74f89dcfe28..fb087c9eb42 100644 --- a/.github/workflows/action_utest.yml +++ b/.github/workflows/action_utest.yml @@ -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 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() }} diff --git a/.github/workflows/bsp_buildings.yml b/.github/workflows/bsp_buildings.yml index 388f6f2354e..0c2a2e0b5a5 100644 --- a/.github/workflows/bsp_buildings.yml +++ b/.github/workflows/bsp_buildings.yml @@ -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() }} diff --git a/.github/workflows/manual_bsp_build.yml b/.github/workflows/manual_bsp_build.yml index 421eb976c1a..6793750ec2e 100644 --- a/.github/workflows/manual_bsp_build.yml +++ b/.github/workflows/manual_bsp_build.yml @@ -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() }} diff --git a/.github/workflows/manual_dist.yml b/.github/workflows/manual_dist.yml index 2977807efde..ffffd2dc75a 100644 --- a/.github/workflows/manual_dist.yml +++ b/.github/workflows/manual_dist.yml @@ -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() }} diff --git a/.github/workflows/manual_trigger_scons_except_STM32_all.yml b/.github/workflows/manual_trigger_scons_except_STM32_all.yml index 5e173eb76e2..55333a788bc 100644 --- a/.github/workflows/manual_trigger_scons_except_STM32_all.yml +++ b/.github/workflows/manual_trigger_scons_except_STM32_all.yml @@ -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() }} diff --git a/.github/workflows/manual_trigger_scons_fail_bsp_all.yml b/.github/workflows/manual_trigger_scons_fail_bsp_all.yml index 83f5a69d43e..25c73fbce1c 100644 --- a/.github/workflows/manual_trigger_scons_fail_bsp_all.yml +++ b/.github/workflows/manual_trigger_scons_fail_bsp_all.yml @@ -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() }} diff --git a/.github/workflows/manual_trigger_update_all.yml b/.github/workflows/manual_trigger_update_all.yml index 16d0d03fa15..f6cee4bf57d 100644 --- a/.github/workflows/manual_trigger_update_all.yml +++ b/.github/workflows/manual_trigger_update_all.yml @@ -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() }} diff --git a/.github/workflows/utest_auto_run.yml b/.github/workflows/utest_auto_run.yml index 6fa2fce9f6e..5b15ed3467d 100644 --- a/.github/workflows/utest_auto_run.yml +++ b/.github/workflows/utest_auto_run.yml @@ -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 diff --git a/bsp/bluetrum/ab32vg1-ab-prougen/normal-env.bat b/bsp/bluetrum/ab32vg1-ab-prougen/normal-env.bat new file mode 100644 index 00000000000..851312249e7 --- /dev/null +++ b/bsp/bluetrum/ab32vg1-ab-prougen/normal-env.bat @@ -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 diff --git a/bsp/bluetrum/ab32vg1-ab-prougen/rtconfig.py b/bsp/bluetrum/ab32vg1-ab-prougen/rtconfig.py index 0ed65223bcf..ca0a494053a 100644 --- a/bsp/bluetrum/ab32vg1-ab-prougen/rtconfig.py +++ b/bsp/bluetrum/ab32vg1-ab-prougen/rtconfig.py @@ -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' @@ -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 = '' diff --git a/bsp/qemu-virt64-riscv/README.md b/bsp/qemu-virt64-riscv/README.md index c04fd2b498a..423516a9181 100644 --- a/bsp/qemu-virt64-riscv/README.md +++ b/bsp/qemu-virt64-riscv/README.md @@ -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) @@ -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. @@ -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 ``` @@ -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 ``` diff --git a/bsp/qemu-virt64-riscv/README_cn.md b/bsp/qemu-virt64-riscv/README_cn.md index 418dfc624b7..f037a126d70 100644 --- a/bsp/qemu-virt64-riscv/README_cn.md +++ b/bsp/qemu-virt64-riscv/README_cn.md @@ -6,17 +6,17 @@ - [1. 简介](#1-简介) - [2. 构建](#2-构建) - - [2.1. 安装工具链](#21-安装工具链) - - [2.2. 设置 RT-Thread 工具链环境变量](#22-设置-rt-thread-工具链环境变量) - - [2.3. 下载内核](#23-下载内核) - - [2.4. 配置内核](#24-配置内核) - - [2.5. 编译内核](#25-编译内核) + - [2.1. 安装工具链](#21-安装工具链) + - [2.2. 设置 RT-Thread 工具链环境变量](#22-设置-rt-thread-工具链环境变量) + - [2.3. 下载内核](#23-下载内核) + - [2.4. 配置内核](#24-配置内核) + - [2.5. 编译内核](#25-编译内核) - [3. 运行](#3-运行) - - [3.1. 安装 QEMU](#31-安装-qemu) - - [3.2. 运行 QEMU](#32-运行-qemu) - - [3.2.1. 运行 RT-Thread 标准版](#321-运行-rt-thread-标准版) - - [3.2.2. 运行 RT-Thread Smart 版](#322-运行-rt-thread-smart-版) - - [3.2.3. 运行 RT-Thread Smart 版 + 根文件系统](#323-运行-rt-thread-smart-版--根文件系统) + - [3.1. 安装 QEMU](#31-安装-qemu) + - [3.2. 运行 QEMU](#32-运行-qemu) + - [3.2.1. 运行 RT-Thread 标准版](#321-运行-rt-thread-标准版) + - [3.2.2. 运行 RT-Thread Smart 版](#322-运行-rt-thread-smart-版) + - [3.2.3. 运行 RT-Thread Smart 版 + 根文件系统](#323-运行-rt-thread-smart-版--根文件系统) - [4. 如何使用 rv64ilp32 工具链](#4-如何使用-rv64ilp32-工具链) - [5. 联系人信息](#5-联系人信息) @@ -49,31 +49,31 @@ Codename: jammy - 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 ``` -其中 `riscv64-unknown-elf-gcc` 用于构建 RT-Thread 标准版,`riscv64-unknown-linux-musl-gcc` 用于构建 RT-Thread Smart 版。根据上面所示链接分别下载到本地后解压缩。 +其中 `riscv-none-elf-gcc` 用于构建 RT-Thread 标准版,`riscv64-linux-musleabi-用于构建 RT-Thread Smart 版。根据上面所示链接分别下载到本地后解压缩。 ## 2.2. 设置 RT-Thread 工具链环境变量 和 RT-Thread 工具链相关的环境变量有三个 - `RTT_CC` 为工具链名称, 这里统一为 `"gcc"` -- `RTT_CC_PREFIX`: 为工具链前缀, 这里对于标准版是 `"riscv64-unknown-elf-"`,对于 Smart 版是 `"riscv64-unknown-linux-musl-"`。 -- `RTT_EXEC_PATH`: 工具链的 bin 文件夹所在路径, 如 `"$HOME/tools/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14/bin"`, 这个根据个人下载解压后的实际路径进行设置,注意 RT-Thread 标准版和 Smart 版本的工具链是两套不同的版本,而且设置 `RTT_EXEC_PATH` 的路径名时要一直到 `bin`。 +- `RTT_CC_PREFIX`: 为工具链前缀, 这里对于标准版是 `"riscv-none-elf-"`,对于 Smart 版是 `"riscv64-linux-musleabi- +- `RTT_EXEC_PATH`: 工具链的 bin 文件夹所在路径, 如 `"$HOME/tools/xpack-riscv-none-elf-gcc-12.3.0-2/bin"`, 这个根据个人下载解压后的实际路径进行设置,注意 RT-Thread 标准版和 Smart 版本的工具链是两套不同的版本,而且设置 `RTT_EXEC_PATH` 的路径名时要一直到 `bin`。 如果一直使用的话,建议将这三个环境变量在 `.bashrc` 文件中 export。 @@ -382,8 +382,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 ``` @@ -393,8 +393,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 ``` diff --git a/bsp/qemu-virt64-riscv/SConstruct b/bsp/qemu-virt64-riscv/SConstruct index 3387d0e1490..bb8d86cfb29 100644 --- a/bsp/qemu-virt64-riscv/SConstruct +++ b/bsp/qemu-virt64-riscv/SConstruct @@ -11,6 +11,7 @@ TARGET = 'rtthread.' + rtconfig.TARGET_EXT DefaultEnvironment(tools=[]) env = Environment(tools = ['mingw'], + COMPILATIONDB_USE_ABSPATH = True, AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS, CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS, @@ -18,6 +19,9 @@ env = Environment(tools = ['mingw'], LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) env['ASCOM'] = env['ASPPCOM'] +env.Tool('compilation_db') +cdb = env.CompilationDatabase('compile_commands.json') +Alias('cdb', cdb) Export('RTT_ROOT') Export('rtconfig') @@ -29,10 +33,6 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu = False) stack_size = 4096 -if GetDepend('RT_USING_SMART'): - # use smart link.lds - env['LINKFLAGS'] = env['LINKFLAGS'].replace('link.lds', 'link_smart.lds') - stack_lds = open('link_stacksize.lds', 'w') if GetDepend('__STACKSIZE__'): stack_size = GetDepend('__STACKSIZE__') stack_lds.write('__STACKSIZE__ = %d;\n' % stack_size) diff --git a/bsp/qemu-virt64-riscv/normal-env.bat b/bsp/qemu-virt64-riscv/normal-env.bat new file mode 100644 index 00000000000..851312249e7 --- /dev/null +++ b/bsp/qemu-virt64-riscv/normal-env.bat @@ -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 diff --git a/bsp/qemu-virt64-riscv/rtconfig.py b/bsp/qemu-virt64-riscv/rtconfig.py index 09d530af4a1..9f355514679 100644 --- a/bsp/qemu-virt64-riscv/rtconfig.py +++ b/bsp/qemu-virt64-riscv/rtconfig.py @@ -21,7 +21,7 @@ if PLATFORM == 'gcc': # toolchains - PREFIX = os.getenv('RTT_CC_PREFIX') or 'riscv64-unknown-elf-' + PREFIX = os.getenv('RTT_CC_PREFIX') or 'riscv-none-elf-' CC = PREFIX + 'gcc' CXX = PREFIX + 'g++' AS = PREFIX + 'gcc' @@ -32,10 +32,21 @@ OBJDUMP = PREFIX + 'objdump' OBJCPY = PREFIX + 'objcopy' - DEVICE = ' -mcmodel=medany -march=rv64imafdc -mabi=lp64 ' + DEVICE = ' -mcmodel=medany -march=rv64gc ' + USE_SMART = PREFIX.find('-musleabi-') > 0 + if USE_SMART: + DEVICE += '-mabi=lp64 ' + else: + DEVICE += '-mabi=lp64d ' CFLAGS = DEVICE + '-ffreestanding -flax-vector-conversions -Wno-cpp -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -fdiagnostics-color=always' AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -D__ASSEMBLY__ ' - LFLAGS = DEVICE + ' -nostartfiles -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,_start -T link.lds' + ' -lsupc++ -lgcc -static' + LFLAGS = DEVICE + ' -nostartfiles -Wl,--no-warn-rwx-segments -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,_start ' + if USE_SMART: + # smart link options + LFLAGS += ' -T link_smart.lds -lsupc++ -lgcc -static ' + else: + # normal link options + LFLAGS += ' -T link.lds --specs=nosys.specs -static ' CPATH = '' LPATH = '' diff --git a/bsp/qemu-virt64-riscv/smart-env.bat b/bsp/qemu-virt64-riscv/smart-env.bat index 87c310560fc..0e8682c35a1 100644 --- a/bsp/qemu-virt64-riscv/smart-env.bat +++ b/bsp/qemu-virt64-riscv/smart-env.bat @@ -1,26 +1,20 @@ -@set def_arch=arm +@set def_arch=riscv64 -@if not "%1"=="" ( - @set def_arch=%1 -) +pushd %RTT_ENV_URL%\..\.. +set RTT_ENV_ROOT=%cd% +popd -@if %def_arch%==arm ( - @set RTT_CC=gcc - @set RTT_EXEC_PATH=%cd%\tools\gnu_gcc\arm-linux-musleabi_for_i686-w64-mingw32\bin - @set RTT_CC_PREFIX=arm-linux-musleabi- - @copy configs\def_config_arm .config -) else if %def_arch%==riscv64 ( - @set RTT_CC=gcc - @set RTT_EXEC_PATH=E:\workspace\rt-smart\userapps\tools\gnu_gcc\riscv64-linux-musleabi_for_i686-w64-mingw32\bin - @set RTT_CC_PREFIX=riscv64-unknown-linux-musl- - @copy configs\def_config_riscv64 .config -) else ( - @echo "ERROR:supported_arch=arm riscv64!" - @goto EXIT -) +:: Download from: +:: https://download.rt-thread.org/download/rt-smart/toolchains/riscv64-linux-musleabi_for_i686-w64-mingw32_latest.zip +:: Extract as: +:: C:\env-windows\tools\gnu_gcc\riscv64-linux-musleabi_for_i686-w64-mingw32 -@set PATH=%RTT_EXEC_PATH%;%PATH% +@set RTT_CC=gcc +@set RTT_EXEC_PATH=%RTT_ENV_ROOT%\tools\gnu_gcc\riscv64-linux-musleabi_for_i686-w64-mingw32\bin +@set RTT_CC_PREFIX=riscv64-linux-musleabi- + +@set PATH=%RTT_EXEC_PATH%;%RTT_ENV_ROOT%\.venv\Scripts;%_OLD_VIRTUAL_PATH% @echo "Arch => %def_arch%" @echo "CC => %RTT_CC%" diff --git a/bsp/ultrarisc/ur_dp1000_evb/SConstruct b/bsp/ultrarisc/ur_dp1000_evb/SConstruct index 3611cca388c..027ccdabea7 100755 --- a/bsp/ultrarisc/ur_dp1000_evb/SConstruct +++ b/bsp/ultrarisc/ur_dp1000_evb/SConstruct @@ -29,14 +29,10 @@ stack_size = 4096 # prepare building environment objs = PrepareBuilding(env, RTT_ROOT, has_libcpu = False) -if GetDepend('RT_USING_SMART'): - # use smart link.lds - env['LINKFLAGS'] = env['LINKFLAGS'].replace('link.lds', 'link_smart.lds') - # os.system('cp .configmini .config') #copy rtconfig.hmini to rtconfig.h # os.system('cp rtconfig.hmini rtconfig.h') - + stack_lds = open('link_stacksize.lds', 'w') if GetDepend('__STACKSIZE__'): stack_size = GetDepend('__STACKSIZE__') stack_lds.write('__STACKSIZE__ = %d;\n' % stack_size) diff --git a/bsp/ultrarisc/ur_dp1000_evb/normal-env.bat b/bsp/ultrarisc/ur_dp1000_evb/normal-env.bat new file mode 100644 index 00000000000..851312249e7 --- /dev/null +++ b/bsp/ultrarisc/ur_dp1000_evb/normal-env.bat @@ -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 diff --git a/bsp/ultrarisc/ur_dp1000_evb/rtconfig.py b/bsp/ultrarisc/ur_dp1000_evb/rtconfig.py index c544da9b287..48218557c56 100755 --- a/bsp/ultrarisc/ur_dp1000_evb/rtconfig.py +++ b/bsp/ultrarisc/ur_dp1000_evb/rtconfig.py @@ -29,7 +29,7 @@ if PLATFORM == 'gcc': # toolchains #PREFIX = 'riscv64-unknown-elf-' - PREFIX = os.getenv('RTT_CC_PREFIX') or 'riscv64-unknown-elf-' + PREFIX = os.getenv('RTT_CC_PREFIX') or 'riscv-none-elf-' CC = PREFIX + 'gcc' CXX = PREFIX + 'g++' AS = PREFIX + 'gcc' @@ -41,10 +41,21 @@ OBJCPY = PREFIX + 'objcopy' # + ' -Wl,--no-warn-rwx-segments' - DEVICE = ' -mcmodel=medany -march=rv64gc -mabi=lp64' + DEVICE = ' -mcmodel=medany -march=rv64gc ' + USE_SMART = PREFIX.find('-musleabi-') > 0 + if USE_SMART: + DEVICE += ' -mabi=lp64 ' + else: + DEVICE += ' -mabi=lp64d ' CFLAGS = DEVICE + ' -Wno-cpp -ffreestanding -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -D_POSIX_SOURCE ' AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -D__ASSEMBLY__' - LFLAGS = DEVICE + ' -nostartfiles -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,_start -T link.lds' + ' -lsupc++ -lgcc -static' + LFLAGS = DEVICE + ' -nostartfiles -Wl,--no-warn-rwx-segments -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,_start ' + if USE_SMART: + # smart link options + LFLAGS += ' -T link_smart.lds -lsupc++ -lgcc -static ' + else: + # normal link options + LFLAGS += ' -T link.lds --specs=nosys.specs -static ' CPATH = '' LPATH = '' diff --git a/bsp/ultrarisc/ur_dp1000_evb/smart-env.bat b/bsp/ultrarisc/ur_dp1000_evb/smart-env.bat new file mode 100644 index 00000000000..0e8682c35a1 --- /dev/null +++ b/bsp/ultrarisc/ur_dp1000_evb/smart-env.bat @@ -0,0 +1,24 @@ + +@set def_arch=riscv64 + +pushd %RTT_ENV_URL%\..\.. +set RTT_ENV_ROOT=%cd% +popd + +:: Download from: +:: https://download.rt-thread.org/download/rt-smart/toolchains/riscv64-linux-musleabi_for_i686-w64-mingw32_latest.zip +:: Extract as: +:: C:\env-windows\tools\gnu_gcc\riscv64-linux-musleabi_for_i686-w64-mingw32 + +@set RTT_CC=gcc +@set RTT_EXEC_PATH=%RTT_ENV_ROOT%\tools\gnu_gcc\riscv64-linux-musleabi_for_i686-w64-mingw32\bin +@set RTT_CC_PREFIX=riscv64-linux-musleabi- + +@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 \ No newline at end of file diff --git a/tools/ci/bsp_detail.py b/tools/ci/bsp_detail.py index 7e68e16adca..0f6ee1dd8c4 100644 --- a/tools/ci/bsp_detail.py +++ b/tools/ci/bsp_detail.py @@ -27,6 +27,7 @@ 'riscv64-unknown-elf-gcc': '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', 'riscv32-unknown-elf-gcc': 'https://github.com/hpmicro/riscv-gnu-toolchain/releases/download/2022.05.15/riscv32-unknown-elf-newlib-multilib_2022.05.15_linux.tar.gz', 'llvm-arm': 'https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-16.0.0/LLVMEmbeddedToolchainForArm-16.0.0-Linux-x86_64.tar.gz', + 'riscv-none-elf-gcc': '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', 'riscv-none-embed-gcc': 'https://github.com/RT-Thread/toolchains-ci/releases/download/v1.5/xpack-riscv-none-embed-gcc-8.3.0-2.3-linux-x64.tar.gz', 'riscv32-esp-elf-gcc': 'https://github.com/espressif/crosstool-NG/releases/download/esp-2022r1-RC1/riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz', 'clang': 'https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-16.0.0/LLVMEmbeddedToolchainForArm-16.0.0-Linux-x86_64.tar.gz', diff --git a/tools/ci/bsp_detail.yml b/tools/ci/bsp_detail.yml index 17aff176b8e..b3dcb9cdd92 100644 --- a/tools/ci/bsp_detail.yml +++ b/tools/ci/bsp_detail.yml @@ -407,7 +407,7 @@ beaglebone: bluetrum/ab32vg1-ab-prougen: .config: true README.md: true - gcc: riscv64-unknown-elf-gcc + gcc: riscv-none-elf-gcc menuconfig: true rtconfig.h: true bm3803: @@ -1484,7 +1484,7 @@ qemu-virt64-riscv: .config: true README.md: true README_ZH.md: true - gcc: riscv64-unknown-elf-gcc + gcc: riscv-none-elf-gcc menuconfig: true rtconfig.h: true raspberry-pi/raspi2: diff --git a/tools/ci/toolchain.sh b/tools/ci/toolchain.sh index 24293b32b7f..ad94eb2d3b3 100755 --- a/tools/ci/toolchain.sh +++ b/tools/ci/toolchain.sh @@ -6,6 +6,7 @@ declare -A download_urls=( ["aarch64-none-elf-gcc"]="https://github.com/RT-Thread/toolchains-ci/releases/download/v1.6/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf.tar.xz" ["riscv64-unknown-elf-gcc"]="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" ["riscv32-unknown-elf-gcc"]="https://github.com/hpmicro/riscv-gnu-toolchain/releases/download/2022.05.15/riscv32-unknown-elf-newlib-multilib_2022.05.15_linux.tar.gz" +["riscv-none-elf-gcc"]="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" ["riscv-none-embed-gcc"]="https://github.com/RT-Thread/toolchains-ci/releases/download/v1.5/xpack-riscv-none-embed-gcc-8.3.0-2.3-linux-x64.tar.gz" ["riscv32-esp-elf-gcc"]="https://github.com/espressif/crosstool-NG/releases/download/esp-2022r1-RC1/riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz" ["clang"]="https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-16.0.0/LLVMEmbeddedToolchainForArm-16.0.0-Linux-x86_64.tar.gz" diff --git a/tools/ci/toolchain_bsp.yml b/tools/ci/toolchain_bsp.yml index 16c2ea026b2..1cc219cb1dd 100644 --- a/tools/ci/toolchain_bsp.yml +++ b/tools/ci/toolchain_bsp.yml @@ -359,6 +359,13 @@ powerpc-eabi-gcc: bsp: - taihu count: 1 +riscv-none-elf-gcc: + bsp: + - bluetrum/ab32vg1-ab-prougen + - qemu-virt64-riscv + - ultrarisc/ur_dp1000_evb + count: 3 + download_url: 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 riscv-none-embed-gcc: bsp: - gd32/risc-v/gd32vf103r-start @@ -399,7 +406,6 @@ riscv32-unknown-elf-gcc: download_url: https://github.com/hpmicro/riscv-gnu-toolchain/releases/download/2022.05.15/riscv32-unknown-elf-newlib-multilib_2022.05.15_linux.tar.gz riscv64-unknown-elf-gcc: bsp: - - bluetrum/ab32vg1-ab-prougen - bouffalo_lab/bl60x - bouffalo_lab/bl61x - bouffalo_lab/bl70x @@ -407,10 +413,9 @@ riscv64-unknown-elf-gcc: - bouffalo_lab/bl808/m0 - cvitek/c906_little - cvitek/cv18xx_risc-v - - qemu-virt64-riscv - sparkfun-redv - thead-smart - count: 11 + count: 9 download_url: 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 riscv64-unknown-linux-musl-gcc: bsp: