mirror of
https://github.com/eclipse-threadx/threadx.git
synced 2026-08-17 09:33:32 +08:00
Added a QEMU virt-machine BSP and CTest infrastructure to run the ThreadX regression suite on both RISC-V 32-bit and 64-bit targets in CI. New components: - BSP (entry, trap, PLIC, CLINT timer, UART, linker script) targeting QEMU virt machine for RV32 and RV64 - CMake build system with Ninja, supporting multiple build configs - CI scripts: install_riscv.sh (toolchain + QEMU), build_tx_riscv.sh, test_tx_riscv.sh - GitHub Actions workflow job for RISC-V regression gating Port fixes: - RV32 tx_thread_context_restore.S: set MPIE alongside MPP (0x1800 → 0x1880) so mret re-enables interrupts - RV32/RV64 tx_port.h: add TX_REGRESSION_TEST extension macros needed by the test harness - RV32/RV64 example_build scripts: add compile and QEMU launch steps Regression test portability fixes: - Block memory tests: increase pool sizes (320 → 340) to accommodate larger RISC-V block-header alignment - Byte memory test: replace hardcoded offsets with BYTE_POOL_OVERHEAD macro for portable pool-size computation - Event flag timeout test: make counter tolerance unconditional, removing linux-only guard Signed-off-by: Akif Ejaz <akif.ejaz@10xengineers.ai>
20 lines
470 B
Bash
Executable File
20 lines
470 B
Bash
Executable File
#!/bin/bash
|
|
# Run RISC-V regression tests for both RV32 and RV64 on QEMU.
|
|
# Usage: test_tx_riscv.sh [all|<config>]
|
|
|
|
SCRIPT_DIR="$(dirname "$(realpath "$0")")"
|
|
RUN_SH="${SCRIPT_DIR}/../test/tx/cmake/riscv/run.sh"
|
|
|
|
ARGS="${@:-all}"
|
|
|
|
exit_code=0
|
|
|
|
echo "=== Testing RISC-V32 ==="
|
|
CTEST_PARALLEL_LEVEL=4 "$RUN_SH" riscv32 test $ARGS || exit_code=$?
|
|
|
|
echo ""
|
|
echo "=== Testing RISC-V64 ==="
|
|
CTEST_PARALLEL_LEVEL=4 "$RUN_SH" riscv64 test $ARGS || exit_code=$?
|
|
|
|
exit $exit_code
|