Conversation
…URATION_OVERRIDES) Add docs/user-manual/build-system/configuration.md explaining how configuration modules are assembled in the build cache, how the framework, platforms, libraries, and subtopologies provide defaults, and how projects override them. Recommend the default-config/config-<lib-name> convention for library configuration. Fix the register_fprime_config API docstring (DEPENDS and EXCLUDE_FROM_ALL are supported), update the platform template, retire the legacy config_directory setting docs, and cross-link related pages. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Recommend <project>/config-overrides/ for project overrides (a <project>/config/ directory shadows the build-cache config/ include path), mark the library default-config folder as optional, and drop the config_directory mention. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…G deprecation Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- platform template: header and STEP 2 wording match the configuration-module contract - configuration.md: INTERFACE vs STATIC rule (FPP enum/struct/array autocode .cpp) - implement-osal.md: Step 1 uses config-overrides/ like Step 2 - custom-uplink-downlink-data.md: point at configuration.md instead of config_directory Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- narrow INTERFACE guidance to type aliases / integer constants (string, float, bool constants and enum/struct/array emit .cpp) - hedge STATIC wording: AUTOCODER_INPUTS modules default to STATIC, SOURCES-only modules should declare STATIC (nasa#5970) - explain why <default-config/config-<lib>/...> includes bypass overrides - fix include-root error remediation and message text - state build-cache flattening; RawTimeSource.hpp example - add config_directory migration note to settings.md - add add_fprime_subdirectory step to subtopology override recipe - add INTERFACE to override-only implement-osal example - remove stale TOC anchor in configuring-fprime.md - sync cmake/API.cmake docstring (checks scope, precedence, config-my-library) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- CHOOSES_IMPLEMENTATIONS: document de-duplication caveat (project cannot re-select an implementation the platform already listed) - INTERFACE is required (not recommended) for HEADERS/OVERRIDES-only modules; add 'No SOURCES given to target' to the errors table - FPP override resolution is via fpp-depend, DEPENDS <lib>_Types is optional - fold duplicated STATIC note in register_fprime_config docstring; align terminology - fix platform template STEP 5 comment on GLOBAL_IMPLICIT_DEPENDENCY purpose Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- GLOBAL_IMPLICIT_DEPENDENCY modules must depend on the global interface target, not Fw_Types (cycle under BUILD_SHARED_LIBS=ON) - library override directories need a library-specific name; document the binary-directory collision and the flat configuration file namespace - FPP-only consumers get the config dependency from FPP analysis - override-before-fprime_setup_included_code() as a cause of the nonexistent-file error; reference nasa#5970 for the STATIC default - platform template: remove empty CHOOSES_IMPLEMENTATIONS - subtopologies.md: replace stale 'different from config' rule - trim duplicated library-default rationale in secondary pages Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- develop-fprime-libraries.md: link the Default Configuration section from Contents - configuration.md: mention component-local <Component>/config/<Component>Config modules - run-baremetal.md: point at configuration modules instead of a copied default/config - skills: project configuration module may re-choose implementations; 'configuration module' wording Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Coverage report — base
|
| Module | Line | Δ | Function | Δ | Branch | Δ |
|---|---|---|---|---|---|---|
Os/Generic |
90.14 | -0.10 | 89.13 | +0.00 | 74.90 | -0.20 |
Fw/DataStructures |
97.42 | +0.09 | 97.14 | +0.00 | 81.75 | +0.18 |
Os/Posix |
71.03 | +0.39 | 87.50 | +0.00 | 50.89 | +0.22 |
New modules
| Module | Line | Function | Branch |
|---|---|---|---|
Fw/Prm |
0.00 | 0.00 | 0.00 |
Modules without UTs
CFDP/Checksum/GTest, Drv/LinuxGpioDriver, Drv/LinuxI2cDriver, Drv/LinuxSpiDriver, Drv/Ports/DataTypes, Drv/PosixUartDriver, FppTestProject/FppTest/topology/async, FppTestProject/FppTest/topology/components/Comp, FppTestProject/FppTest/topology/components/Framework, FppTestProject/FppTest/topology/components/Receiver, FppTestProject/FppTest/topology/components/Sender, FppTestProject/FppTest/topology/guarded, FppTestProject/FppTest/topology/sync, FppTestProject/FppTest/topology/top_ports, FppTestProject/FppTest/topology/types, Fw/Com, Fw/Comp, Fw/FilePacket/GTest, Fw/Fpy, Fw/Obj, Fw/Port, Fw/Sm, Fw/Test, Fw/Types/GTest, Os/Models, Svc/Ccsds/Types, Svc/Ccsds/Utils, Svc/FatalHandler, Svc/Subtopologies/CdhCore, Svc/Subtopologies/ComCcsds, Svc/Subtopologies/ComCcsdsSdls, Svc/Subtopologies/ComFprime, Svc/Subtopologies/ComLoggerTee, Svc/Subtopologies/DataProducts, Svc/Subtopologies/DpCompression, Svc/Subtopologies/FileHandling, Svc/Subtopologies/FileHandlingCfdp, Svc/Subtopologies/FileHandlingCfdp/FileHandlingCfdpConfig, TestDeploymentsProject/Ref/DpDemo, TestDeploymentsProject/Ref/PingReceiver, TestDeploymentsProject/Ref/RecvBuffApp, TestDeploymentsProject/Ref/SendBuffApp, TestDeploymentsProject/Ref/Top, TestDeploymentsProject/Ref/TypeDemo, cmake/test/data/TestConfigDeployment, cmake/test/data/TestDeployment/TestBuildAutocoder, cmake/test/data/TestDeployment/TestDuplicateDirective, cmake/test/data/TestDeployment/TestHeaderAutocoder, cmake/test/data/TestDeployment/TestLinkDepends, cmake/test/data/TestDeployment/TestRelative, cmake/test/data/test-fprime-library/TestLibrary/TestComponent, cmake/test/data/test-fprime-library2/TestLibrary2/TestComponent
|
| # STEP 5: Register the platform configuration. A platform supplies "PlatformTypes.fpp" and | ||
| # "PlatformTypes.h" from a configuration module and chooses an implementation for every Os | ||
| # package. Each module is marked GLOBAL_IMPLICIT_DEPENDENCY so that every module in the build | ||
| # receives the platform types and, for the module below, the OS type compile definition. | ||
| # Note: Typically, the unix platform directory is a good default, as it grabs standard | ||
| # types from <cstdint> and chooses the POSIX implementations. Additional platform-specific | ||
| # choices and definitions are then registered in a second, INTERFACE-only configuration | ||
| # module as done below (see Linux.cmake). Otherwise, write a directory equivalent to | ||
| # cmake/platform/unix/Platform/ for the platform. The configuration directory must not sit | ||
| # directly under an include root (project, framework, or library root). Remove the | ||
| # CHOOSES_IMPLEMENTATIONS directive below if this platform adds no choices beyond | ||
| # unix/Platform: a directive with an empty list is a generate-time error. |
There was a problem hiding this comment.
[Maintainability] suggestion maint-misleading-comment: 12-line STEP 5 comment restates the user manual inline.
Every other STEP in this template is a 1-2 line instruction; this one explains include-root rules, module marking and the unix default in prose that already lives in configuration.md / cmake-platforms.md (both linked from this file). Two copies of the same explanation drift independently, and the wall of text hides the one actionable instruction (remove the directive when the list is empty).
| # STEP 5: Register the platform configuration. A platform supplies "PlatformTypes.fpp" and | |
| # "PlatformTypes.h" from a configuration module and chooses an implementation for every Os | |
| # package. Each module is marked GLOBAL_IMPLICIT_DEPENDENCY so that every module in the build | |
| # receives the platform types and, for the module below, the OS type compile definition. | |
| # Note: Typically, the unix platform directory is a good default, as it grabs standard | |
| # types from <cstdint> and chooses the POSIX implementations. Additional platform-specific | |
| # choices and definitions are then registered in a second, INTERFACE-only configuration | |
| # module as done below (see Linux.cmake). Otherwise, write a directory equivalent to | |
| # cmake/platform/unix/Platform/ for the platform. The configuration directory must not sit | |
| # directly under an include root (project, framework, or library root). Remove the | |
| # CHOOSES_IMPLEMENTATIONS directive below if this platform adds no choices beyond | |
| # unix/Platform: a directive with an empty list is a generate-time error. | |
| # STEP 5: Register the platform configuration module(s). unix/Platform supplies PlatformTypes.{fpp,h} | |
| # and the POSIX choices; the INTERFACE module below adds platform-specific choices and the OS | |
| # type definition (see Linux.cmake). Drop CHOOSES_IMPLEMENTATIONS if there is nothing to add: an | |
| # empty directive is a generate-time error. Details: docs/user-manual/build-system/configuration.md |
| <OS-IMPLEMENTATIONS-SPECIFIC-TO-THIS-PLATFORM> | ||
| GLOBAL_IMPLICIT_DEPENDENCY | ||
| ) | ||
| target_compile_definitions(Platform<PLATFORM-NAME> INTERFACE ${PLATFORM_OS_TYPE_DEFINITION}) |
There was a problem hiding this comment.
[Maintainability] could fix maint-inconsistent-local-convention: OS-type definition set in STEP 2, consumed 40 lines later via PLATFORM_OS_TYPE_DEFINITION.
Linux.cmake and Darwin.cmake (the reference files this template points to) pass the literal directly to target_compile_definitions. The extra variable exists only to keep a "STEP 2" slot; if a copier deletes or renames either half, the unquoted ${PLATFORM_OS_TYPE_DEFINITION} expands to nothing and the definition silently disappears. Inline the literal here and reduce STEP 2 to a note (or drop it).
| target_compile_definitions(Platform<PLATFORM-NAME> INTERFACE ${PLATFORM_OS_TYPE_DEFINITION}) | |
| target_compile_definitions(Platform<PLATFORM-NAME> INTERFACE -DTGT_OS_TYPE_<PLATFORM-NAME>) |
| | `RAWTIME_BOOTTIME` | `CLOCK_BOOTTIME` | Monotonic and advances during suspend (Linux only) | | ||
|
|
||
| To switch an entire deployment to a different clock, override this header in the project's configuration directory and | ||
| To switch an entire deployment to a different clock, override this header in the project's configuration module and |
There was a problem hiding this comment.
[Documentation] could fix stale-user-manual: this section still frames the setting as living in "the Os/ subdirectory of the configuration directory" (line 384), and the header is included as config/RawTimeSource.hpp. Under the model this PR documents in configuration.md (overrides match by file name, the directory name is the include prefix, subdirectories are not preserved) a reader may expect to reproduce the Os/ path in their override module. Worth stating that the override is matched by file name only.
| To switch an entire deployment to a different clock, override this header in the project's configuration module and | |
| To switch an entire deployment to a different clock, override this header in the project's configuration module (matched by file name, `RawTimeSource.hpp`; the `Os/` sub-directory of `default/config` is not part of the include path or the override match) and |
| add_definitions(-DTGT_OS_TYPE_<PLATFORM-NAME>) | ||
| ## STEP 2: Specify the OS type compile definition i.e. LINUX or DARWIN. This is attached to the platform | ||
| # configuration module registered in STEP 5. | ||
| set(PLATFORM_OS_TYPE_DEFINITION -DTGT_OS_TYPE_<PLATFORM-NAME>) |
There was a problem hiding this comment.
[Design] could fix — design-scope-creep: this is the one non-documentation design change in a PR described as "Documents configuration modules". Replacing add_definitions(-DTGT_OS_TYPE_...) with an INTERFACE definition on the GLOBAL_IMPLICIT_DEPENDENCY module matches Linux.cmake/Darwin.cmake and is the right pattern, but it narrows reach: the define now only lands on targets that link the F´ global interface, not on plain add_library/add_executable targets a project builds alongside F´. Worth a line in the PR description (and STEP 2 comment) so new-platform authors migrating from the old template know the scope changed.
| is the same. Do not name the directory `config/`: the project root is an include root, so | ||
| `<project>/config/FpConfig.h` would be found at the same include path as the build-cache copy of the | ||
| framework's `config/FpConfig.h` and shadow it. | ||
| 3. **Edit the copy.** |
There was a problem hiding this comment.
[Operational] suggestion ops-doc-reality: an override is a whole-file replacement, and the page never says that the copy freezes every other setting in that file at the framework version it was copied from. Scenario: project overrides FpConfig.h (23 FW_* defines) to change one value, later upgrades F´ to a release adding FW_NEW_FEATURE; the copied file lacks it, and each of the ~170 #if FW_... guards in Fw/, Svc/, Os/ evaluates an undefined macro as 0 with no diagnostic (the framework's flag set has no -Wundef), so the feature is silently off in the flight build while default/config/FpConfig.h says it is on. Smallest remedy: state the consequence and the upgrade action next to the copy step.
| 3. **Edit the copy.** | |
| 3. **Edit the copy.** The copy replaces the whole file, so every other setting in it is frozen at the framework | |
| version it was copied from. After upgrading F´, diff each overridden file against its new default and carry | |
| over added settings: a `FW_*` macro missing from an overridden header is not an error, `#if FW_...` guards | |
| treat it as 0. |
lestarch-autobot
left a comment
There was a problem hiding this comment.
Automated review summary (run 1)
Per-agent results
| Agent | must fix | suggestion | could fix | future work | outstanding | Verdict |
|---|---|---|---|---|---|---|
| Security Vulnerabilities | 0 | 0 | 0 | 0 | 0 | Go |
| Supply Chain / Runner Safety | 0 | 0 | 0 | 0 | 0 | Go |
| F Prime C/C++ Design | 0 | 0 | 0 | 0 | 0 | Go |
| Documentation Currency | 0 | 0 | 1 | 0 | 0 | Go |
| Design | 0 | 0 | 1 | 0 | 1 | Go |
| Architecture | 0 | 0 | 0 | 0 | 0 | Go |
| Test Quality | 0 | 0 | 0 | 0 | 0 | Go |
| Correctness | 0 | 0 | 0 | 0 | 0 | Go |
| Operational | 0 | 1 | 0 | 0 | 1 | Go |
| Maintainability | 0 | 1 | 1 | 0 | 2 | Go |
| CI safety | — | — | — | — | — | Go |
| Totals | 0 | 2 | 3 | 0 | 4 | Go |
Supply-chain surfaces
| Surface | Outstanding |
|---|---|
| Dependencies | clean |
| Vendored / submodule | clean |
| Build / test infrastructure | clean |
| Workflows / actions / scripts | clean |
| Generator output | clean |
| Prompt-injection | clean |
| Review-system integrity | clean |
Merge readiness
Merge readiness: Go — all ten reviewers completed with zero outstanding must-fix findings; 5 non-blocking inline threads remain for author discretion.
Docs are the star charts of a framework — thanks for updating these; clear skies for the next platform port.
Change Description
Documents configuration modules, long standing request
Fixes #4514
AI Usage
Authored by AI