Merge pull request #5128 from liukangcc/action
[update] add riscv toolchain for ci.
This commit is contained in:
commit
98404184b1
|
@ -36,6 +36,7 @@ jobs:
|
|||
- {RTT_BSP: "at91sam9260", RTT_TOOL_CHAIN: "sourcery-arm"}
|
||||
- {RTT_BSP: "allwinner_tina", 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"}
|
||||
|
@ -137,7 +138,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
|
||||
|
@ -171,6 +172,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
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
import os
|
||||
import platform
|
||||
|
||||
|
||||
# toolchains options
|
||||
ARCH ='risc-v'
|
||||
|
@ -55,8 +57,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
|
||||
|
|
|
@ -48,8 +48,8 @@ ASFLAGS = ""
|
|||
CPPDEFINES = []
|
||||
LOCAL_CPPDEFINES = []
|
||||
|
||||
LIBS = []
|
||||
LIBPATH = []
|
||||
LIBS = ['hal']
|
||||
LIBPATH = [CWD]
|
||||
|
||||
LINKFLAGS = ""
|
||||
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue