Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
在你之后
rt-thread
提交
3847e380
R
rt-thread
项目概览
在你之后
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
3847e380
编写于
6月 18, 2021
作者:
G
guo
提交者:
GitHub
6月 18, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #4810 from Guozhanxin/riscv64ci
[ci] add riscv64 autotest.
上级
0f658213
89717a45
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
238 addition
and
13 deletion
+238
-13
.github/workflows/action_utest.yml
.github/workflows/action_utest.yml
+38
-13
examples/utest/configs/kernel/config_riscv64.h
examples/utest/configs/kernel/config_riscv64.h
+200
-0
未找到文件。
.github/workflows/action_utest.yml
浏览文件 @
3847e380
...
...
@@ -11,33 +11,58 @@ jobs:
fail-fast
:
false
matrix
:
legs
:
-
{
UTEST
:
"
kernel/mem"
,
RTT_BSP
:
"
bsp/qemu-vexpress-a9"
,
QEMU_ARCH
:
"
vexpress-a9"
,
CONFIG_FILE
:
"
examples/utest/configs/kernel/config.h
"
}
-
{
UTEST
:
"
components/utest"
,
RTT_BSP
:
"
bsp/qemu-vexpress-a9"
,
QEMU_ARCH
:
"
vexpress-a9"
,
CONFIG_FILE
:
"
examples/utest/configs/utest_self/config.h
"
}
-
{
UTEST
:
"
kernel/mem"
,
RTT_BSP
:
"
bsp/qemu-vexpress-a9"
,
QEMU_ARCH
:
"
arm"
,
QEMU_MACHINE
:
"
vexpress-a9"
,
CONFIG_FILE
:
"
kernel/config.h"
,
SD_FILE
:
"
sd.bin
"
}
-
{
UTEST
:
"
components/utest"
,
RTT_BSP
:
"
bsp/qemu-vexpress-a9"
,
QEMU_ARCH
:
"
arm"
,
QEMU_MACHINE
:
"
vexpress-a9"
,
CONFIG_FILE
:
"
utest_self/config.h"
,
SD_FILE
:
"
sd.bin
"
}
-
{
UTEST
:
"
kernel/mem/riscv64"
,
RTT_BSP
:
"
bsp/qemu-riscv-virt64"
,
QEMU_ARCH
:
"
riscv64"
,
QEMU_MACHINE
:
"
virt"
,
CONFIG_FILE
:
"
kernel/config_riscv64.h"
,
SD_FILE
:
"
None"
}
env
:
TEST_QEMU_ARCH
:
${{ matrix.legs.QEMU_ARCH }}
TEST_QEMU_MACHINE
:
${{ matrix.legs.QEMU_MACHINE }}
TEST_BSP_ROOT
:
${{ matrix.legs.RTT_BSP }}
TEST_CONFIG_FILE
:
${{ matrix.legs.CONFIG_FILE }}
TEST_SD_FILE
:
${{ matrix.legs.SD_FILE }}
steps
:
-
uses
:
actions/checkout@v1
-
name
:
Prepare env
-
name
:
Install Tools
shell
:
bash
run
:
|
sudo apt-get update
sudo apt-get -yqq install scons qemu-system git
-
name
:
Install Arm ToolChains
if
:
${{ matrix.legs.QEMU_ARCH == 'arm' && success() }}
shell
:
bash
run
:
|
sudo apt-get update > /dev/null
sudo apt-get -yqq install scons qemu-system-arm git
wget -q https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
sudo tar xjf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 -C /opt
-
name
:
Build bsp
run
:
|
export RTT_EXEC_PATH=/opt/gcc-arm-none-eabi-10-2020-q4-major/bin
/opt/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-gcc --version
cp $TEST_CONFIG_FILE $TEST_BSP_ROOT/rtconfig.h
echo "RTT_EXEC_PATH=/opt/gcc-arm-none-eabi-10-2020-q4-major/bin" >> $GITHUB_ENV
-
name
:
Install RISC-V ToolChains
if
:
${{ matrix.legs.QEMU_ARCH == 'riscv64' && 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
:
Build BSP
run
:
|
cp examples/utest/configs/$TEST_CONFIG_FILE $TEST_BSP_ROOT/rtconfig.h
scons -j$(nproc) -C $TEST_BSP_ROOT
-
name
:
Start test
-
name
:
Start Test
if
:
${{ success() }}
run
:
|
git clone https://github.com/armink/UtestRunner.git
pushd $TEST_BSP_ROOT
dd if=/dev/zero of=sd.bin bs=1024 count=65536
popd
pushd UtestRunner
python3 qemu_runner.py --elf ../$TEST_BSP_ROOT/rtthread.elf --sd ../$TEST_BSP_ROOT/sd.bin
if [ $TEST_SD_FILE != "None" ]; then
python3 qemu_runner.py --system $TEST_QEMU_ARCH --machine $TEST_QEMU_MACHINE --elf ../$TEST_BSP_ROOT/rtthread.elf --sd ../$TEST_BSP_ROOT/$TEST_SD_FILE
else
python3 qemu_runner.py --system $TEST_QEMU_ARCH --machine $TEST_QEMU_MACHINE --elf ../$TEST_BSP_ROOT/rtthread.elf
fi
cat rtt_console.log
popd
popd
\ No newline at end of file
examples/utest/configs/kernel/config_riscv64.h
0 → 100644
浏览文件 @
3847e380
#ifndef RT_CONFIG_H__
#define RT_CONFIG_H__
/* Automatically generated file; DO NOT EDIT. */
/* RT-Thread Project Configuration */
/* RT-Thread Kernel */
#define RT_NAME_MAX 20
#define RT_ALIGN_SIZE 8
#define RT_THREAD_PRIORITY_32
#define RT_THREAD_PRIORITY_MAX 32
#define RT_TICK_PER_SECOND 100
#define RT_USING_HOOK
#define RT_USING_IDLE_HOOK
#define RT_IDLE_HOOK_LIST_SIZE 4
#define IDLE_THREAD_STACK_SIZE 16384
#define RT_USING_TIMER_SOFT
#define RT_TIMER_THREAD_PRIO 4
#define RT_TIMER_THREAD_STACK_SIZE 16384
/* kservice optimization */
#define RT_DEBUG
/* Inter-Thread communication */
#define RT_USING_SEMAPHORE
#define RT_USING_MUTEX
#define RT_USING_EVENT
#define RT_USING_MAILBOX
#define RT_USING_MESSAGEQUEUE
/* Memory Management */
#define RT_USING_MEMPOOL
#define RT_USING_MEMHEAP
#define RT_USING_SMALL_MEM
#define RT_USING_MEMTRACE
#define RT_USING_HEAP
/* Kernel Device Object */
#define RT_USING_DEVICE
#define RT_USING_CONSOLE
#define RT_CONSOLEBUF_SIZE 256
#define RT_CONSOLE_DEVICE_NAME "uart"
#define RT_VER_NUM 0x40004
#define ARCH_CPU_64BIT
#define ARCH_RISCV
#define ARCH_RISCV64
/* RT-Thread Components */
#define RT_USING_COMPONENTS_INIT
#define RT_USING_USER_MAIN
#define RT_MAIN_THREAD_STACK_SIZE 16384
#define RT_MAIN_THREAD_PRIORITY 10
/* C++ features */
/* Command shell */
#define RT_USING_FINSH
#define FINSH_THREAD_NAME "tshell"
#define FINSH_USING_HISTORY
#define FINSH_HISTORY_LINES 5
#define FINSH_USING_SYMTAB
#define FINSH_USING_DESCRIPTION
#define FINSH_THREAD_PRIORITY 20
#define FINSH_THREAD_STACK_SIZE 4096
#define FINSH_CMD_SIZE 80
#define FINSH_USING_MSH
#define FINSH_USING_MSH_DEFAULT
#define FINSH_USING_MSH_ONLY
#define FINSH_ARG_MAX 10
/* Device virtual file system */
#define RT_USING_DFS
#define DFS_USING_WORKDIR
#define DFS_FILESYSTEMS_MAX 2
#define DFS_FILESYSTEM_TYPES_MAX 2
#define DFS_FD_MAX 32
#define RT_USING_DFS_DEVFS
#define RT_USING_DFS_ROMFS
/* Device Drivers */
#define RT_USING_DEVICE_IPC
#define RT_PIPE_BUFSZ 512
#define RT_USING_SERIAL
#define RT_SERIAL_USING_DMA
#define RT_SERIAL_RB_BUFSZ 64
#define RT_USING_PIN
/* Using USB */
/* POSIX layer and C standard library */
#define RT_USING_LIBC
#define RT_USING_POSIX
#define RT_LIBC_FIXED_TIMEZONE 8
/* Network */
/* Socket abstraction layer */
/* Network interface device */
/* light weight TCP/IP stack */
/* AT commands */
/* VBUS(Virtual Software BUS) */
/* Utilities */
#define RT_USING_UTEST
#define UTEST_THR_STACK_SIZE 4096
#define UTEST_THR_PRIORITY 20
/* RT-Thread Utestcases */
#define RT_USING_UTESTCASES
/* Utest Self Testcase */
#define UTEST_SELF_PASS_TC
/* Kernel Testcase */
#define UTEST_MEMHEAP_TC
/* RT-Thread online packages */
/* IoT - internet of things */
/* Wi-Fi */
/* Marvell WiFi */
/* Wiced WiFi */
/* IoT Cloud */
/* security packages */
/* language packages */
/* multimedia packages */
/* tools packages */
/* system packages */
/* Micrium: Micrium software products porting for RT-Thread */
/* peripheral libraries and drivers */
/* AI packages */
/* miscellaneous packages */
/* samples: kernel and components samples */
/* entertainment: terminal games and other interesting software packages */
#define BOARD_virt
#define RT_USING_USERSPACE
/* RISCV qemu virt64 configs */
#define BSP_USING_UART1
#define BSP_UART1_TXD_PIN 20
#define BSP_UART1_RXD_PIN 21
#define __STACKSIZE__ 16384
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录