Conversation
casaroli
force-pushed
the
fdpicxip-in-tree
branch
from
August 28, 2026 17:05
719eeed to
f8e2299
Compare
🔗 Cross-repo PR dependenciesThe read-only Build run reported the following dependent PR(s) and fetched head SHA(s): CI run: https://github.com/apache/nuttx-apps/actions/runs/33193062300 |
acassis
previously approved these changes
Sep 8, 2026
casaroli
force-pushed
the
fdpicxip-in-tree
branch
2 times, most recently
from
September 8, 2026 20:37
2c01062 to
68ddc94
Compare
Contributor
Author
Done |
acassis
previously approved these changes
Sep 8, 2026
🔗 Cross-repo PR dependenciesThe read-only Build run reported the following dependent PR(s) and fetched head SHA(s): CI run: https://github.com/apache/nuttx-apps/actions/runs/34276056553 |
casaroli
force-pushed
the
fdpicxip-in-tree
branch
from
September 25, 2026 09:47
ce1b305 to
c2f56cc
Compare
🔗 Cross-repo PR dependenciesThe read-only Build run reported the following dependent PR(s) and fetched head SHA(s):
CI run: https://github.com/apache/nuttx-apps/actions/runs/36120398868 |
The fixtures were built by makefiles and scripts in nuttx/tools/fdpic. Review of apache/nuttx#19940 asked that NuttX not carry a module build of its own, so the build moves here, beside the sources it builds. They keep a build of their own because they are loader edge cases: a library with a SONAME, a module with more DT_NEEDED entries than the loader follows, one whose imports stay in the lazy binding table, and one naming a symbol the firmware does not export. Application.mk cannot say any of that. The build uses the configured tree's module flags (CMODULEFLAGS, CXXMODULEFLAGS, LDMODULEFLAGS), linker script and crt0 source. Three things are pinned instead, so that the committed headers do not depend on how the tree is configured: the CPU (cortex-m3, so one set of headers runs on both v7-M and v8-M), no debug information, and -Os. A library is compiled with default visibility, because the module flags hide every symbol and a library must export its functions. fdpic-embed.py becomes xxd and a template. fdpic-verify.sh and nuttx-exports.sh go with no replacement: they checked at build time what the xipfs suite already asserts at run time. The headers are regenerated, and the .fdpic suffix is gone: a module is named like any other module. A fixture now starts in the tree's crt0, which needs apache/nuttx#20388 to run its constructors, and the library fixtures need apache/nuttx#20368. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
casaroli
force-pushed
the
fdpicxip-in-tree
branch
from
September 28, 2026 18:47
c2f56cc to
2a6dc45
Compare
🔗 Cross-repo PR dependenciesThe read-only Build run reported the following dependent PR(s) and fetched head SHA(s):
CI run: https://github.com/apache/nuttx-apps/actions/runs/36467652465 |
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.
Summary
The FDPIC fixtures this example and
testing/fs/xipfscarry were built by an explicitmake regenthat reached intonuttx/tools/fdpic. Review of apache/nuttx#19940 asked that NuttX not carry a module build of its own, so the build moves here, beside the sources it builds.They keep a build of their own because they are loader edge cases, not ordinary modules: a library with a
SONAME, a module with moreDT_NEEDEDentries than the loader will follow, one whose imports stay in the lazy binding table, and one naming a symbol the firmware does not export.Application.mkcannot say-soname, or "no entry point", or "link against that other module".The build uses the configured tree's module flags (
CMODULEFLAGS,CXXMODULEFLAGS,LDMODULEFLAGS), linker script andcrt0source. Three things are pinned so the committed headers do not depend on how the tree is configured: the CPU (cortex-m3, so one set of headers runs on v7-M and v8-M), no debug information, and-Os. A library is compiled with default visibility, because the module flags hide every symbol and a library must export its functions.fdpic-embed.pybecomesxxdand a template.fdpic-verify.shandnuttx-exports.shgo with no replacement: they checked at build time what the xipfs suite already asserts at run time.depends-on: apache/nuttx/pull/20388
depends-on: apache/nuttx/pull/20368
Impact
make regenis not part of the application build, and the*_bin.hheaders stay committed, so both apps still build with a plain toolchain and no FDPIC linker.The headers are regenerated here. A fixture now starts in the tree's
crt0, which needs apache/nuttx#20388 to run its constructors under FDPIC, and the library fixtures need apache/nuttx#20368.NUTTX_DIRhas to be configured withCONFIG_FDPIC, andCONFIG_HAVE_CXXINITIALIZEdecides whethercrt0runs constructors, so the headers were generated with it on.Testing
mps2-an500:xipfswithCONFIG_FDPICunder QEMU,xipfs_test fdpic:Regenerating against a tree configured with
CONFIG_DEBUG_NOOPTand against one withCONFIG_DEBUG_FULLOPTgives byte for byte the same headers.tools/checkpatch.sh -c -u -m -gpasses.