Uh oh!
There was an error while loading. Please reload this page.
Correct the target template to describe how the framework actually works - #52
Merged
fdesbiens merged 1 commit intoAug 31, 2026
Merged
Conversation
…works
templates/target/ documented a structure the repository does not have, and
following it produced a build that could not configure. Its app/CMakeLists.txt
compiled ../../../../apps/threadx_demo/main.c, but there is no apps/ directory
and never has been, so the first thing a new contributor hit was a CMake error
on a path that does not exist.
Of the three shared root directories the template declared governed, only one
was real:
/bsp real - both framework targets implement board.h, led.h, console.h
/cmake dead - cmake/utilities.cmake was referenced by nothing. All four
targets carry their own copy, and the root file was byte-identical
to the NUCLEO one apart from a license URL typo
/apps absent - referenced by the template, docs/architecture.md, and the
template's own CMake, but never created
The template now says what the framework does: applications and toolchain
files live with their target. The claim that applications have no compile-time
dependency on vendor headers is retired rather than restated, because neither
existing demo satisfies it - both include their board_config.h for memory
sizing and vendor headers for board-specific startup self-tests. A portable
shared application layer stays documented as a goal, labelled as one.
templates/target/app/main.c is added because the template now points at it. It
depends only on <tx_api.h> and the <bsp/...> contracts and uses static thread
stacks, so it avoids needing the board's memory extents and will compile for
any target implementing the interfaces. It is a starting point to grow in
place, not a shared application.
Also removed the template's dead SHARED_APP_DIR and its guarded include of
${SHARED_CMAKE_DIR}/gcc-arm-none-eabi.cmake, a file that was never added, so
the include silently never fired. The template's BSP CMake now uses
SHARED_BSP_DIR instead of a five-level relative path, matching what both real
targets do, and CMAKE_C_STANDARD moves from 11 to 99 per AGENTS.md.
The deleted cmake/utilities.cmake is recoverable from history if the intent
was for it to become the shared location; nothing referenced it in this state,
and leaving a duplicate that looks authoritative invites edits that have no
effect.
Verified the NUCLEO target still builds clean (22068 B ROM, 6000 B RAM) and
its Renode suite still passes; neither target used the removed file.
Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>fdesbiensforce-pushed
the
fix/template-matches-reality
branch
from
August 31, 2026 16:05
479ca43 to
0e89927CompareUh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Correct the target template to describe how the framework actually works
The problem
templates/target/documented a structure the repository does not have, and following it produced a build that could not configure. Itsapp/CMakeLists.txtcompiled../../../../apps/threadx_demo/main.c, but there is noapps/directory and never has been. The first thing a new contributor hits is a CMake error on a path that does not exist.Of the three shared root directories the template declared governed, only one was real:
/bspboard.h,led.h,console.h/cmakecmake/utilities.cmakewas referenced by nothing; all four targets carry their own copy, and the root file was byte-identical to the NUCLEO one apart from a license URL typo (licenses/MITvslicense/mit)/appsdocs/architecture.md, and by the template's own CMake, but never createdWhat changed
The template now says what the framework does: applications and toolchain files live with their target.
The claim that applications have "no compile-time dependency on vendor-specific HALs, SDKs, or hardware registers" is retired rather than restated, because neither existing demo satisfies it — both include their
board_config.hfor memory sizing and vendor headers for board-specific startup self-tests. A portable shared application layer stays documented as a goal, explicitly labelled as one, rather than as a feature that exists.templates/target/app/main.cis added, because the template now points at it. It depends only on<tx_api.h>and the<bsp/...>contracts and uses static thread stacks, so it avoids needing the board's memory extents and will compile for any target implementing the interfaces. It is a starting point to grow in place, not a shared application.Also cleaned up in the template:
SHARED_APP_DIR.${SHARED_CMAKE_DIR}/gcc-arm-none-eabi.cmake— a file that was never added, soif(EXISTS ...)meant it silently never fired.SHARED_BSP_DIRinstead of a five-level relative path, matching what both real targets do.CMAKE_C_STANDARD11 → 99, per AGENTS.md.On deleting
cmake/utilities.cmakeIt was referenced by nothing in this state. Leaving a duplicate that looks authoritative invites edits that have no effect — someone changing the root copy would see no result, because every target loads its own. It is recoverable from history if the intent was for it to become the shared location; say so in review and I will restore it and wire the targets to it instead.
What this does not do
This does not make applications portable. That is a design change, not a cleanup, and it is deliberately out of scope here:
_heap_limitvs__end, PLIC vs NVIC, CSR reads vsHAL_GetTick().BSP_RAM_END; PolarFire uses static arrays.Doing it properly needs at least two new generic BSP interfaces, roughly
bsp_self_test()andbsp_ram_region(&base, &size), which changes the shared contract both targets implement and would require rehoming the self-tests added in #51. Worth a separate discussion.Verification
Documentation and template files only; no target consumes them, and
templates/is inert until copied (there is no rootCMakeLists.txt). Confirmed anyway that nothing regressed:-Werror: 22068 B ROM, 6000 B RAM — unchanged.