scripts/check_clang.sh links every example build it can drive, and reports the
ones it cannot. Three ports remain on that report:
no script driver, so outside this stage: cortex_a5_smp cortex_a7_smp cortex_a9_smp
Closing this empties that line. A check that permanently prints known exceptions
teaches people to skim past it, so zero is worth reaching.
What is missing
Nothing much, which is what makes this a good first issue. All three examples are
already complete — startup.S, sample_threadx.ld, sample_threadx.c, and the
MP_GIC / MP_Mutexes / MP_SCU / MP_PrivateTimer / v7 drivers are all
present under ports_smp/<core>/gnu/example_build/. They also already have
build_threadx.bat and build_threadx_sample.bat, which name every source and
every flag.
What they lack is the .sh counterparts, so nothing on Linux or in CI can build
them:
ports_smp/cortex_a5_smp/gnu/example_build/
ports_smp/cortex_a7_smp/gnu/example_build/
ports_smp/cortex_a9_smp/gnu/example_build/
How to do it
Follow the pattern #594 established for the 19 script-driven ports and #597
extended to the AArch64 SMP ports. Copy a build_threadx.sh /
build_threadx_sample.sh pair from a port that already has one, then translate
the two .bat files beside it: the library script is 257 lines of kernel sources,
and the sample script is only 7 or 8 lines.
Keep the TOOLCHAIN=gnu|atfe selection the existing scripts use, so
check_clang.sh can drive them with Arm Toolchain for Embedded as it does the
others.
Three wrinkles worth knowing before you start
These are the things that will cost you an hour if nobody tells you:
- The
.bat files emit sample_threadx.axf, but check_clang.sh decides
whether an example built by looking for sample_threadx.out. Emit .out, as
the other ports' scripts do, or the stage will report a failure for an example
that linked fine.
- They link
-e Vectors, not the reset_handler entry symbol the Cortex-M
and Cortex-A examples use. Keep Vectors; it is what startup.S defines here.
cortex_a5_smp has tx_initialize_low_level.s in lowercase. A lowercase
.s gets no preprocessing from the compiler driver. Check whether that file
needs any before renaming it, and if it does not, leave the name alone and just
reference it correctly.
How to check your work
scripts/check_clang.sh --clang /path/to/clang
The three cores should disappear from the "no script driver" line, and the
script-driven example count should rise from 42 to 45. Please build with both
toolchains — plain GNU and TOOLCHAIN=atfe — since catching GNU-versus-LLVM
divergence is the reason that check exists.
Scope note
These images are link-verified only. There is no Cortex-A9 SMP model in CI, so a
green result means "it links", not "it runs" — the same standard #597 set for the
AArch64 examples. Please do not claim more than that in the PR description.
The ports' own kernel sources are already covered by the assembly stage of the
same script, so this issue is about the examples rather than the ports.
scripts/check_clang.shlinks every example build it can drive, and reports theones it cannot. Three ports remain on that report:
Closing this empties that line. A check that permanently prints known exceptions
teaches people to skim past it, so zero is worth reaching.
What is missing
Nothing much, which is what makes this a good first issue. All three examples are
already complete —
startup.S,sample_threadx.ld,sample_threadx.c, and theMP_GIC/MP_Mutexes/MP_SCU/MP_PrivateTimer/v7drivers are allpresent under
ports_smp/<core>/gnu/example_build/. They also already havebuild_threadx.batandbuild_threadx_sample.bat, which name every source andevery flag.
What they lack is the
.shcounterparts, so nothing on Linux or in CI can buildthem:
ports_smp/cortex_a5_smp/gnu/example_build/ports_smp/cortex_a7_smp/gnu/example_build/ports_smp/cortex_a9_smp/gnu/example_build/How to do it
Follow the pattern #594 established for the 19 script-driven ports and #597
extended to the AArch64 SMP ports. Copy a
build_threadx.sh/build_threadx_sample.shpair from a port that already has one, then translatethe two
.batfiles beside it: the library script is 257 lines of kernel sources,and the sample script is only 7 or 8 lines.
Keep the
TOOLCHAIN=gnu|atfeselection the existing scripts use, socheck_clang.shcan drive them with Arm Toolchain for Embedded as it does theothers.
Three wrinkles worth knowing before you start
These are the things that will cost you an hour if nobody tells you:
.batfiles emitsample_threadx.axf, butcheck_clang.shdecideswhether an example built by looking for
sample_threadx.out. Emit.out, asthe other ports' scripts do, or the stage will report a failure for an example
that linked fine.
-e Vectors, not thereset_handlerentry symbol the Cortex-Mand Cortex-A examples use. Keep
Vectors; it is whatstartup.Sdefines here.cortex_a5_smphastx_initialize_low_level.sin lowercase. A lowercase.sgets no preprocessing from the compiler driver. Check whether that fileneeds any before renaming it, and if it does not, leave the name alone and just
reference it correctly.
How to check your work
The three cores should disappear from the "no script driver" line, and the
script-driven example count should rise from 42 to 45. Please build with both
toolchains — plain GNU and
TOOLCHAIN=atfe— since catching GNU-versus-LLVMdivergence is the reason that check exists.
Scope note
These images are link-verified only. There is no Cortex-A9 SMP model in CI, so a
green result means "it links", not "it runs" — the same standard #597 set for the
AArch64 examples. Please do not claim more than that in the PR description.
The ports' own kernel sources are already covered by the assembly stage of the
same script, so this issue is about the examples rather than the ports.