alex 054251f810 Test upstream RISC-V SMP candidates on HERE VP
Build the SMP library and Moonlight board support against a selectable ThreadX source tree. Keep the pinned regression matrix and add RV32GC and RV64GC context tests. Adapt the direct timeout fixture to the RV64 timer extension and give timing-sensitive cases more phase coverage on HERE VP.
2026-11-27 11:13:06 +01:00
2026-05-28 12:35:30 +02:00
2026-01-27 20:58:23 +01:00
2026-06-09 18:10:29 +02:00

ThreadX Port for the TGFS cores and accompanying Virtual prototypes

This repositiory contains a RISC-V implementation of ThreadX designed to run on the TGFS cores or the RISC-V VP by MINRES (available on Github).

Note: SMP support additionally requires a VP variant that allows the number of cores to be configured.

Building the RTOS

A set of presets is provided, targetting 32 and 64-bit systems.

E.g. building for the RV64IMAC configuration:

cmake --preset Debug
cmake --build --preset Debug --parallel

Running on the VP

A run command can look like this:

riscv-vp --isa=rv64imac_m -f build/Debug/thread_demo.elf

Running the Regression Suites

The regression suites live in test/. Both suites register their cases with CTest and require the path to the MINRES riscv-vp simulator to be provided through THREADX_TEST_SIMULATOR.

The SMP regression suite additionally requires a riscv-vp variant that supports a configurable number of cores.

Examples:

cmake -S test/threadx --preset Debug32 -DTHREADX_TEST_SIMULATOR=/opt/riscv-vp/bin/riscv-vp
cmake --build build/Debug32/test/threadx/ --parallel
ctest --test-dir build/Debug32/test/threadx --output-on-failure --parallel 4

To validate a ThreadX checkout that contains the GNU RISC-V SMP ports, pass its absolute path as THREADX_SMP_SOURCE_DIR. The SMP library, demo, and regression suite all use that checkout. The two context presets run focused hard-float tests on a four-hart HERE VP.

cd test/smp
cmake --preset Context64 \
  -DTHREADX_TEST_SIMULATOR=/opt/riscv-vp/bin/riscv-vp \
  -DTHREADX_SMP_SOURCE_DIR=/path/to/threadx
cmake --build --preset Context64 --parallel
ctest --test-dir ../../build/Context64/test/smp -R '^vp_smp_context$' --output-on-failure

Use Context32 for RV32GC. The regular SMP presets run the integer regression suite. Jenkins runs both suites on the pinned HERE VP image and uses the latest image as a canary when it differs.

Demo Applications

The repository currently provides three demo applications:

  • thread_demo: a basic single-kernel ThreadX demo based on the standard ThreadX sample application
  • smp_demo: the same basic demo application for running on a ThreadX SMP kernel
  • tcp_demo: a NetX Duo demo that exercises the TCP/IP stack on top of ThreadX
S
Description
No description provided
Readme
413 KiB
0 Stars 9 Watchers 2 Forks
Languages
C 90.5%
CMake 7.7%
Linker Script 1%
Assembly 0.8%