<feed xmlns='http://www.w3.org/2005/Atom'>
<title>threadx.git/CMakeLists.txt, branch dev</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/threadx.git/atom/CMakeLists.txt?h=dev</id>
<link rel='self' href='http://cgit.235523.xyz/threadx.git/atom/CMakeLists.txt?h=dev'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/'/>
<updated>2026-05-29T12:50:52Z</updated>
<entry>
<title>cmake: fixed THREADX_ARCH undefined when building as standalone library (#540)</title>
<updated>2026-05-29T12:50:52Z</updated>
<author>
<name>Frédéric Desbiens</name>
<email>frederic.desbiens@eclipse-foundation.org</email>
</author>
<published>2026-05-29T12:50:52Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=518127b2e9d4f5fb4d9fad5b278cc8daf983b688'/>
<id>urn:sha1:518127b2e9d4f5fb4d9fad5b278cc8daf983b688</id>
<content type='text'>
CMake loads the toolchain file during the first project() call.
Variables set in the toolchain (THREADX_ARCH, THREADX_TOOLCHAIN) were
therefore not visible before project() was invoked.  Commit 2c16114a
moved project() after those checks to conditionally select LANGUAGES and
CMAKE_TRY_COMPILE_TARGET_TYPE for Windows, which broke standalone builds
that rely on the toolchain to supply THREADX_ARCH.

Fixed by calling project(threadx LANGUAGES C) first so the toolchain is
sourced, then checking THREADX_ARCH, then conditionally enabling ASM via
enable_language(ASM) for non-Windows ports.  The CMAKE_TRY_COMPILE_TARGET_TYPE
override was removed from CMakeLists.txt because every toolchain file in
cmake/ already sets it to STATIC_LIBRARY where needed.

Co-authored-by: Copilot &lt;223556219+Copilot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Added win64 ports of ThreadX and ThreadX SMP (#529)</title>
<updated>2026-05-26T21:17:40Z</updated>
<author>
<name>Frédéric Desbiens</name>
<email>frederic.desbiens@eclipse-foundation.org</email>
</author>
<published>2026-05-26T21:17:40Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=2c16114a450056103bacee0a3254a57dad7e1abd'/>
<id>urn:sha1:2c16114a450056103bacee0a3254a57dad7e1abd</id>
<content type='text'>
 Windows x64 port and regression suite

 This PR adds the Windows x64 (Win64) simulation port for both the standalone
 and SMP variants of ThreadX, along with the full CMake build and test
 infrastructure needed to run the regression suite on Windows.


 New ports

 Win64 standalone (ports/win64/vs_2022): self-contained Windows simulation
 port using Win32 threading primitives as virtual cores. Includes CMake
 integration, build/test scripts, and MSVC project files.

 Win64 SMP (ports/win64_smp/vs_2022): multi-core Windows simulation port.
 Supports up to 4 virtual cores backed by Windows host threads.


 Scheduler and timer improvements

 The initial port used coarse polling and synchronous SuspendThread/ResumeThread
 pairs throughout the scheduler hot path. Several rounds of optimization reduced
 the SMP regression suite runtime from ~150 s to ~78 s (-48%), with no
 regressions:

 - Replaced scheduler polling with an event-driven wake path; switched the
   simulated timer to one-shot rearming to eliminate catch-up ticks.
 - Skip SuspendThread when _tx_thread_preempt_disable != 0 (new suspension
   type 3) -- the primary optimization, yielding up to 7.9x speedup on
   preemption-heavy tests.
 - Skip SuspendThread when a thread is spinning on the Win32 critical section
   (suspension type 4), and fix a stale-TLS bug in
   _tx_win32_critical_section_obtain that could stamp mutex_access on the
   wrong virtual core.
 - Added a 2 ms scheduler event timeout (matching the Linux SMP port) to
   prevent stalls on any missed SetEvent.
 - Enabled high-resolution waitable timers (SetWaitableTimerEx) for accurate
   100 Hz tick cadence.
 - Increased TX_WIN32_CONTENTION_PAUSE_COUNT from 64 to 256 to reduce
   SwitchToThread overhead under heavy CS contention.


 Build and test infrastructure

 - Hardened the Windows build wrapper (scripts/build_tx.ps1): invoke Ninja
   directly for Ninja build trees, fix timeout detection, add a default build
   timeout, and limit fallback replay to real timeout cases.
 - Added -Clean support to Windows test scripts to remove stale CTest state
   before each run.
 - Skip Visual Studio DevShell re-entry when the active MSVC environment
   already matches the requested architecture.
 - Fixed scripts/build_tx.sh (Linux) regression source generation: replaced
   brittle exact-string insertion with line-based matching so the interrupt
   dispatcher hook is inserted reliably for both simulator ports.


 Test suite updates

 - Introduced test/tx/regression/threadx_test_port.h with portable macros
   (TX_TEST_POINTER_WORD, TX_TEST_STORE_POINTER) for storing pointers in test
   arrays on 64-bit targets where ULONG remains 32-bit.
 - Adjusted pool-capacity and pointer-storage patterns in regression tests to
   use ALIGN_TYPE-sized slots, making the suite correct on 64-bit hosts.
 - Restored stricter event flag, sleep, and timer expectations now that
   port-level fixes make prior Windows accommodations unnecessary.
 - Tightened SMP watchdog and clean-build timeout defaults.


 Version metadata

 Updated Win32, Win64, and Win64 SMP port version strings to 6.5.1.202602.

 Co-authored-by: Copilot &lt;223556219+Copilot@users.noreply.github.com&gt;
 Co-authored-by: Codex (gpt 5.5) &lt;codex@openai.com&gt;</content>
</entry>
<entry>
<title>Added RISC-V board Bananapi BPI-F3 (SpacemiT K1 SoC) BSP Support  (#531)</title>
<updated>2026-05-25T19:59:17Z</updated>
<author>
<name>Akif Ejaz</name>
<email>akifejaz40@gmail.com</email>
</author>
<published>2026-05-25T19:59:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=c7d4b2f22869f1f06a99599d4ccfe201b0496f82'/>
<id>urn:sha1:c7d4b2f22869f1f06a99599d4ccfe201b0496f82</id>
<content type='text'>
* Add BananaPi BPI-F3 BSP support

Add RISC-V supervisor support to the rv64/gnu port and
provide a complete board support package for the BananaPi BPI-F3
(SpacemiT K1 SoC, X60 cores).

Port changes (risc-v64/gnu):
- Guard all CSR accesses with TX_RISCV_SMODE to select S-mode registers
  (sstatus/sepc/sie/sret) vs M-mode (mstatus/mepc/mie/mret) in
  context_save, context_restore, schedule, system_return,
  interrupt_control, and stack_build.
- Add S-mode TX_INT_ENABLE/TX_DISABLE and inline TX_RESTORE macros
  to tx_port.h.
- Add TX_RISCV_SMODE CMake option to CMakeLists.txt.

BananaPi BPI-F3 BSP (example_build/bananapi-f3):
- Boot flow: FSBL → OpenSBI (M-mode) → U-Boot (S-mode) → ThreadX
- S-mode trap handler with context save/restore integration
- SBI legacy ecall timer at 10 Hz (24 MHz timebase)
- PLIC driver with S-mode context, stale-IRQ drain, and callbacks
- PXA-compatible UART0 console (115200 8N1)
- Linker script at 0x200000 load address

Tested on risc-v board, BananaPi BPI-F3 hardware.

Signed-off-by: Akif Ejaz &lt;akif.ejaz@10xengineers.ai&gt;

* Fixed S-mode context restore and PLIC spurious IRQ handling

- tx_thread_context_restore.S (non-nested path): set SPIE(0x20) alongside
  SPP(0x100) so sret re-enables interrupts in the restored thread.
- tx_thread_context_restore.S (both S-mode paths): use FS=Dirty (0x6000)
  instead of FS=Initial (0x2000) to match tx_thread_schedule.S and prevent
  FP register corruption across context switches.
- plic.c (plic_irq_intr): return early when plic_claim() yields 0 (no
  pending interrupt) to avoid completing a spurious IRQ ID 0, which is
  undefined behavior per the PLIC spec.

Co-authored-by: Copilot &lt;223556219+Copilot@users.noreply.github.com&gt;

---------

Signed-off-by: Akif Ejaz &lt;akif.ejaz@10xengineers.ai&gt;
Co-authored-by: Frédéric Desbiens &lt;frederic.desbiens@eclipse-foundation.org&gt;
Co-authored-by: Copilot &lt;223556219+Copilot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>build: add conditional CMake support for ThreadX SMP</title>
<updated>2026-04-15T14:52:14Z</updated>
<author>
<name>Frédéric Desbiens</name>
<email>frederic.desbiens@eclipse-foundation.org</email>
</author>
<published>2026-04-15T14:52:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=98e4754381b24e18b3712d1cc4ff528a93b13a77'/>
<id>urn:sha1:98e4754381b24e18b3712d1cc4ff528a93b13a77</id>
<content type='text'>
- Introduce THREADX_SMP option in root CMakeLists.txt.
- Implement conditional source and port directory selection for SMP builds.
- Add CMake support for common_smp and Cortex-A9 SMP port.
- Fix linker flags in Cortex-A9 SMP sample build script.
- Remove duplicate invalidateCaches_IS declarations in v7.h headers.

Assisted-by: Gemini (Experimental)
</content>
</entry>
<entry>
<title>Updated copyright headers and version number constants (#509)</title>
<updated>2026-03-05T09:46:30Z</updated>
<author>
<name>Frédéric Desbiens</name>
<email>frederic.desbiens@eclipse-foundation.org</email>
</author>
<published>2026-03-05T09:46:30Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=c3259a216026372e3833dd8996a68f77e8595fbd'/>
<id>urn:sha1:c3259a216026372e3833dd8996a68f77e8595fbd</id>
<content type='text'>
* Updated version number constants

* Removed revision history from all files

* Added Eclipse ThreadX contributors' copyright header </content>
</entry>
<entry>
<title>Updated CMake minimal version to 3.13</title>
<updated>2025-02-24T20:40:22Z</updated>
<author>
<name>Frédéric Desbiens</name>
<email>frederic.desbiens@eclipse-foundation.org</email>
</author>
<published>2025-02-24T20:40:22Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=898d0ebfde9028c2be7566bad50c5679ad14cdd2'/>
<id>urn:sha1:898d0ebfde9028c2be7566bad50c5679ad14cdd2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Release 6.1.12</title>
<updated>2022-07-26T02:04:40Z</updated>
<author>
<name>Yuxin Zhou</name>
<email>yuxzho@microsoft.com</email>
</author>
<published>2022-07-26T02:04:40Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=8c3c08f10826c4d5332a6d8e2fdf014b793a456a'/>
<id>urn:sha1:8c3c08f10826c4d5332a6d8e2fdf014b793a456a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Release 6.1.9</title>
<updated>2021-10-14T00:51:26Z</updated>
<author>
<name>Yuxin Zhou</name>
<email>yuxzho@microsoft.com</email>
</author>
<published>2021-10-14T00:51:26Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=1af8404c54f9c8d3caa2ac3523c2a5f014aecb1c'/>
<id>urn:sha1:1af8404c54f9c8d3caa2ac3523c2a5f014aecb1c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Release 6.1.8</title>
<updated>2021-07-28T07:24:02Z</updated>
<author>
<name>Yuxin Zhou</name>
<email>yuxzho@microsoft.com</email>
</author>
<published>2021-07-28T07:24:02Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=d0dab582506f132690b35b36ffea129ad51110b0'/>
<id>urn:sha1:d0dab582506f132690b35b36ffea129ad51110b0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix a typo. (#4)</title>
<updated>2020-05-22T22:10:01Z</updated>
<author>
<name>TiejunZhou</name>
<email>50469179+TiejunMS@users.noreply.github.com</email>
</author>
<published>2020-05-22T22:10:01Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=4a9be184e3bcf95094f864a27f9fb7b96f4afa87'/>
<id>urn:sha1:4a9be184e3bcf95094f864a27f9fb7b96f4afa87</id>
<content type='text'>
</content>
</entry>
</feed>
