Skip to content

Load the F Prime build system during cFS prepare() so modules can register autocoders - #29

Merged
LeStarch merged 3 commits into
fprime-community:develfrom
lestarch-autobot:devin/cfs-prepare-fprime
Oct 27, 2026
Merged

LeStarch merged 3 commits into
fprime-community:develfrom
lestarch-autobot:devin/cfs-prepare-fprime

Conversation

@lestarch-autobot

@lestarch-autobot lestarch-autobot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

cFS includes each module's arch_build.cmake (inside prepare()) before any module directory is added. Loading the F Prime
build system there with FPRIME_INCLUDE_FRAMEWORK_CODE OFF opens the window in which other modules' arch_build.cmake
files may call register_fprime_build_autocoder / register_fprime_target; the F Prime code is then included exactly once
by the normal CMake flow (the mission's fprime module, or this CMakeLists.txt when nothing else did, guarded on the
MODULE_DETECTION property since a second fprime_setup_included_code() fatals on fpp_locs).

mission_build.cmake exports FPRIME_LIBRARY_LOCATIONS to the arch builds, so a mission lists its F Prime libraries in
mission_build_custom.cmake (this one included; library.cmake stays empty, the components come from CMakeLists.txt).
arch_build.cmake calls enable_language(CXX) before loading F Prime: cFS is project(CFE C) and F Prime fixes its
required C++ options (-Wno-unused-parameter, -Wno-vla) at first load, so without it Fw_Types fails under -Werror.
enable_language is legal inside prepare(); no mission defs change is needed.

Verified on fprime_cfs_reference (fresh make prep, SIMULATION=native): both libraries included, a custom autocoder
registered from a later module's arch_build.cmake, full fprime_app build.

AI Used (y/n): y
AI Usage: Written by Devin (lestarch-autobot) at Michael Starch's direction; design, verification runs and review by Michael Starch.

Written by Devin

devin-ai-integration Bot and others added 2 commits September 28, 2026 23:38
Sync the project ComCfg.fpp override with the FrameContext change merged
in nasa/fprime#5996 (SppPacketType enum and pktType field), which
Svc/Ccsds SpacePacketFramer/Deframer now require.

Co-Authored-By: michael.d.starch <michael.d.starch@jpl.nasa.gov>
…ister autocoders

cFS includes each module's arch_build.cmake (inside prepare()) before any module directory is added. Loading the F Prime
build system there with FPRIME_INCLUDE_FRAMEWORK_CODE OFF opens the window in which other modules' arch_build.cmake
files may call register_fprime_build_autocoder / register_fprime_target; the F Prime code is then included exactly once
by the normal CMake flow (the mission's fprime module, or this CMakeLists.txt when nothing else did, guarded on the
MODULE_DETECTION property since a second fprime_setup_included_code() fatals on fpp_locs).

mission_build.cmake exports FPRIME_LIBRARY_LOCATIONS to the arch builds, so a mission lists its F Prime libraries in
mission_build_custom.cmake (this one included; library.cmake stays empty, the components come from CMakeLists.txt).
The mission must enable C++ before prepare() (enable_language(CXX) in arch_build_custom.cmake): cFS is project(CFE C)
and F Prime fixes its required C++ options at first load.

Verified on fprime_cfs_reference (fresh make prep, SIMULATION=native): both libraries included, a custom autocoder
registered from a later module's arch_build.cmake, full fprime_app build.

Co-authored-by: M Starch <LeStarch@googlemail.com>
cFS is project(CFE C); F Prime fixes its required C++ options (-Wno-unused-parameter, -Wno-vla) at first load from CMAKE_CXX_COMPILER_ID, so without this the reference build fails under -Werror in Fw_Types. enable_language(CXX) is legal inside cFS prepare() and makes this module self-sufficient (no mission defs change needed).

Co-authored-by: M Starch <LeStarch@googlemail.com>
@LeStarch
LeStarch merged commit 1ef65dc into fprime-community:devel Oct 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants