Compiled the module manager C sources, which no check had ever built - #689
Open
fdesbiens wants to merge 1 commit into
Open
Compiled the module manager C sources, which no check had ever built#689fdesbiens wants to merge 1 commit into
fdesbiens wants to merge 1 commit into
Conversation
eclipse-threadx#672 corrected this script's assembly glob and brought the module ports into the count, but only their assembly. Their C stayed outside every check: 27 files of portable module manager under common_modules, plus the per-port code under ports_module/<core>/gnu/module_manager/src. By this script's own standard -- a port simply absent from the count reads as covered -- 293 files across nine Arm module ports were compiled by nothing, with either compiler. Each module port ships its own tx_port.h and txm_module_port.h carrying the control-block extensions the dispatch code needs, so a port is compiled against its own headers rather than the base port's. Two details the ports themselves dictate: An SMP port's control blocks come from common_smp. Pairing cortex_a35_smp with the single-core headers hid _tx_thread_smp_protect and _tx_thread_smp_unprotect behind implicit declarations and lost tx_thread_smp_core_executing from TX_THREAD, so fourteen files reported errors for a port that builds correctly. The TrustZone ports carry cmse_nonsecure_entry, which needs -mcmse to be honoured rather than ignored. tx_thread_secure_stack.c also carries GCC's optimize attribute, which clang does not implement; that divergence is suppressed by name, for a file GCC builds cleanly. All nine ports compile: 293 of 293. Verified that the stage fails as intended by injecting a defect into a throwaway worktree -- a defect in common_modules is reported under every port, one in a port's own source only under that port. Assisted-by: Claude Code (Opus 5)
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 free
to 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.
Follow-up to #672.
Problem
#672 corrected this script's assembly glob and brought the module ports into the count — but only their assembly. Their C stayed outside every check:
common_modules/module_manager/srcports_module/<core>/gnu/module_manager/srcBy this script's own standard, stated three times in its comments — a port that is simply absent from the count reads as covered — 293 files across nine Arm module ports were compiled by nothing, with either compiler.
Change
A sixth stage compiles the portable module manager plus each port's own C, once per Arm module port. Every module port ships its own
tx_port.handtxm_module_port.hcarrying the control-block extensions the dispatch code needs, so a port is compiled against its own headers rather than the base port's.Two details the ports themselves dictate, both found by running the stage rather than by reading:
SMP ports take
common_smp/inc. Pairingcortex_a35_smpwith the single-core headers hid_tx_thread_smp_protectand_tx_thread_smp_unprotectbehind implicit declarations and losttx_thread_smp_core_executingfromTX_THREAD— fourteen files reporting errors for a port that builds correctly. That was the harness being wrong, not the port.TrustZone ports need
-mcmse, orcmse_nonsecure_entryis silently ignored rather than honoured.tx_thread_secure_stack.cadditionally carries GCC'soptimizeattribute, which clang does not implement. That one is a genuine toolchain divergence in a file GCC builds cleanly, so it is suppressed by name rather than left to fail.Result
Full run green, all stages, including the example builds.
The stage was verified to actually fail
A check that only ever passes proves nothing, so defects were injected into a throwaway worktree: one in
common_modules, one in a single port's own source. The shared defect is reported under every port; the port-specific one only under that port; counts decrement correspondingly.Interaction with #639
The stage globs
ports_module/*/gnu/module_manager/src, so a new module port is picked up automatically with no edit here — which is the point, but it means #639 (Cortex-R52 module manager port) is affected.Running this stage against #639's head, nine ports pass and R52 reports:
mpu.hexists only underports/cortex_r52/gnu/example_build/{fvp_baser_aemv8r,s32z280_evb}/. With either on the include path the file compiles cleanly, so it is not broken — it is a port source depending on a board-specific header from an example build directory, and it cannot be compiled as a port source on its own. Worth noting that the two board copies ofmpu.hdiffer, and this file exists to statically assert offsets the port's assembly hard-codes, so which board is reachable is not obviously immaterial.That is for #639 to resolve; flagging it here because merging this first will surface it there.