diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 40e6bd6052..121c597bce 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -37,6 +37,7 @@ jobs: - {RTT_BSP: "allwinner_tina", RTT_TOOL_CHAIN: "sourcery-arm"} - {RTT_BSP: "efm32", RTT_TOOL_CHAIN: "sourcery-arm"} - {RTT_BSP: "gd32e230k-start", RTT_TOOL_CHAIN: "sourcery-arm"} + - {RTT_BSP: "gd32vf103v-eval", RTT_TOOL_CHAIN: "sourcery-riscv-none-embed"} - {RTT_BSP: "gd32303e-eval", RTT_TOOL_CHAIN: "sourcery-arm"} - {RTT_BSP: "gd32450z-eval", RTT_TOOL_CHAIN: "sourcery-arm"} - {RTT_BSP: "imx6sx/cortex-a9", RTT_TOOL_CHAIN: "sourcery-arm"} @@ -138,7 +139,7 @@ jobs: - {RTT_BSP: "raspberry-pi/raspi4-32", RTT_TOOL_CHAIN: "sourcery-arm"} - {RTT_BSP: "hc32l196", RTT_TOOL_CHAIN: "sourcery-arm"} - {RTT_BSP: "tae32f5300", RTT_TOOL_CHAIN: "sourcery-arm"} - - {RTT_BSP: "bluetrum/ab32vg1-ab-prougen", RTT_TOOL_CHAIN: "sourcery-riscv"} + - {RTT_BSP: "bluetrum/ab32vg1-ab-prougen", RTT_TOOL_CHAIN: "sourcery-riscv64-unknown-elf"} steps: - uses: actions/checkout@v2 - name: Set up Python @@ -172,6 +173,22 @@ jobs: /opt/mips-2016.05/bin/mips-sde-elf-gcc --version echo "RTT_EXEC_PATH=/opt/mips-2016.05/bin" >> $GITHUB_ENV + - name: Install Riscv64-unknown-elf ToolChains + if: ${{ matrix.legs.RTT_TOOL_CHAIN == 'sourcery-riscv64-unknown-elf' && success() }} + run: | + wget -q https://static.dev.sifive.com/dev-tools/freedom-tools/v2020.12/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 + + - name: Install Riscv-none-embed ToolChains + if: ${{ matrix.legs.RTT_TOOL_CHAIN == 'sourcery-riscv-none-embed' && success() }} + run: | + wget -q https://github.com/xpack-dev-tools/riscv-none-embed-gcc-xpack/releases/download/v8.3.0-2.3/xpack-riscv-none-embed-gcc-8.3.0-2.3-linux-x64.tar.gz + sudo tar zxvf xpack-riscv-none-embed-gcc-8.3.0-2.3-linux-x64.tar.gz -C /opt + /opt/xpack-riscv-none-embed-gcc-8.3.0-2.3/bin/riscv-none-embed-gcc --version + echo "RTT_EXEC_PATH=/opt/xpack-riscv-none-embed-gcc-8.3.0-2.3/bin" >> $GITHUB_ENV + - name: Bsp Scons Compile if: ${{ success() }} shell: bash diff --git a/bsp/bluetrum/ab32vg1-ab-prougen/rtconfig.py b/bsp/bluetrum/ab32vg1-ab-prougen/rtconfig.py index 5afb84e1ba..aa7976335e 100644 --- a/bsp/bluetrum/ab32vg1-ab-prougen/rtconfig.py +++ b/bsp/bluetrum/ab32vg1-ab-prougen/rtconfig.py @@ -1,4 +1,6 @@ import os +import platform + # toolchains options ARCH ='risc-v' @@ -57,8 +59,10 @@ if PLATFORM == 'gcc': DUMP_ACTION = OBJDUMP + ' -D -S $TARGET > rtt.asm\n' POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n' -POST_ACTION += './riscv32-elf-xmaker -b rtthread.xm\n' -POST_ACTION += './riscv32-elf-xmaker -b download.xm\n' + +if "Windows" in platform.platform(): + POST_ACTION += './riscv32-elf-xmaker -b rtthread.xm\n' + POST_ACTION += './riscv32-elf-xmaker -b download.xm\n' def dist_handle(BSP_ROOT, dist_dir): import sys diff --git a/bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/SConscript b/bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/SConscript index 3321a76d91..e30f216093 100644 --- a/bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/SConscript +++ b/bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/SConscript @@ -48,8 +48,8 @@ ASFLAGS = "" CPPDEFINES = [] LOCAL_CPPDEFINES = [] -LIBS = [] -LIBPATH = [] +LIBS = ['hal'] +LIBPATH = [CWD] LINKFLAGS = "" diff --git a/bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/libhal.a b/bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/libhal.a new file mode 100644 index 0000000000..fbd9652b21 Binary files /dev/null and b/bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/libhal.a differ