[3/10] tools/fdpic: Add the module build helpers the demo apps use. - #19940
Draft
casaroli wants to merge 1 commit into
Draft
[3/10] tools/fdpic: Add the module build helpers the demo apps use.#19940casaroli wants to merge 1 commit into
casaroli wants to merge 1 commit into
Conversation
apps/examples/fdpicxip is in apps master and its modules/Makefile reads FDPICDIR = $(NUTTX_DIR)/tools/fdpic MODULE_MK = $(FDPICDIR)/nuttx-fdpic.mk EMBED = $(FDPICDIR)/fdpic-embed.py which is not in this tree, so the committed module blobs cannot be regenerated. This adds what that Makefile names. nuttx-fdpic.mk builds a module: compile with the stock arm-none-eabi GCC, which emits correct FDPIC objects for C and C++, then assemble and link with an arm-uclinuxfdpiceabi binutils, which is the only piece a distribution does not carry. build-binutils.sh builds that, and takes about a minute. nuttx-exports.sh turns a built firmware's exec_symtab.c into a symbol list, fdpic-verify.sh checks a module's imports against it, and fdpic-embed.py turns a module into a C header for an image that carries one inside it. The tools are host side and nothing in the NuttX build calls them. The loader that runs what they build is proposed separately, so a module built here has nothing to load it yet, and the page says so. Documentation/components/tools/fdpic.rst describes them, under Host Tools, where the tools index picks it up by glob. Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
This was referenced Aug 23, 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 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
apps/examples/fdpicxipis in apps master and itsmodules/Makefilereads$(NUTTX_DIR)/tools/fdpic/nuttx-fdpic.mkand$(NUTTX_DIR)/tools/fdpic/fdpic-embed.py, which are not in this tree, so its committed module blobs cannot be regenerated. This adds what that Makefile names.nuttx-fdpic.mkbuilds a module: compile with the stockarm-none-eabiGCC, which emits correct FDPIC objects for C and C++, then assemble and link with anarm-uclinuxfdpiceabibinutils, which is the only piece a distribution does not carry.build-binutils.shbuilds that, and takes about a minute.nuttx-exports.shturns a built firmware'sexec_symtab.cinto a symbol list,fdpic-verify.shchecks a module's imports against it, andfdpic-embed.pyturns a module into a C header.Documentation/components/tools/fdpic.rstdescribes them under Host Tools, where the tools index picks it up by glob. This answers @cederom's request on #19673 to move the tool README into the documentation.This is the third of ten PRs that #19673 is being split into, so each can be reviewed on its own. The first four have no FDPIC content at all and do not depend on each other, so they can merge in any order. The remaining six are the FDPIC work itself, one subsystem each, and each is a no-op with
CONFIG_FDPICoff: loader core, ARM relocations, the callback entry points, theexec()path,DT_NEEDEDthroughdlopen(), then documentation and a board configuration. The others are[1/10]#19938,[2/10]#19939 and[4/10]#19941.Impact
Host side only. Nothing in the NuttX build calls these tools, no
Kconfigoption selects them, and no target code changes.The loader that runs what they build is proposed separately, so a module built here has nothing in NuttX to load it yet. The page says so.
Testing
make htmlinDocumentation/produces no warning for the new page. The local build fails on pre-existing duplicate C declarations and a missingplantuml, neither related to this change.tools/checkpatch.shpasses.These are the tools that built the module blobs committed in
apps/examples/fdpicxip, on macOS with thearm-uclinuxfdpiceabibinutils 2.43 thatbuild-binutils.shbuilds.