|
|
| F´ Version |
v4.3.0 |
| Affected Component |
Baremetal (Os::Baremetal::MicroFs) |
Problem Description
Commit f0ab6de ("Fix config") in fprime-community/fprime-baremetal, merged to main, removed the BASE_CONFIG flag from the register_fprime_config() call in fprime-baremetal/config/CMakeLists.txt and replaced it with DEPENDS Fw_Types:
register_fprime_config(
fprime-baremetal-config
HEADERS
"${CMAKE_CURRENT_LIST_DIR}/MicroFsCfg.hpp"
- INTERFACE # No buildable files generated
- BASE_CONFIG
+ DEPENDS
+ Fw_Types
+ INTERFACE
)
BASE_CONFIG is what causes fprime's CMake build system to automatically link every module against this config target project-wide (see fprime/cmake/global_interface.cmake, which links the global interface target to all BASE_CONFIG configuration modules). Removing it means config/MicroFsCfg.hpp is no longer exposed on the include path to any consumer unless that consumer's own project config/ directory happens to provide an equivalent override.
Any downstream deployment that uses Os::Baremetal::MicroFs and does not itself provide a MicroFsCfg.hpp override now fails to build with a missing-header error, because nothing registers the include path that used to come from BASE_CONFIG.
Context / Environment
Operating System: Linux
Targeted Architecture: STM32H7
CPU Architecture: x86_64
Platform: Linux-6.18.33.2-microsoft-standard-WSL2-x86_64-with-glibc2.43
Python version: 3.14.4
CMake version: 3.26.0
Pip version: 26.2.1
Pip packages:
fprime-tools==4.3.0
fprime-gds==4.3.0
fprime-fpp==3.3.0
Project submodules:
https://github.com/nasa/fprime.git @ v4.3.0
https://github.com/fprime-community/fprime-baremetal @ f886e09
How to Reproduce
- Check out
fprime-baremetal at main (post f0ab6de), e.g. db40930 or later, as the lib/fprime-baremetal submodule of an fprime deployment targeting a baremetal OS (e.g. stm32h7).
- Build any deployment that pulls in
Os::Baremetal::MicroFs (directly or transitively through the baremetal Os implementation) without the deployment's own config/ directory providing a MicroFsCfg.hpp override.
- Run
fprime-util build <platform>.
Expected Behavior
The build should succeed, with fprime-baremetal-config continuing to expose config/MicroFsCfg.hpp to every consumer of Os::Baremetal::MicroFs by default, as it did before f0ab6de, either by restoring BASE_CONFIG or by having every module that depends on Os::Baremetal::MicroFs explicitly DEPENDS on fprime-baremetal-config.
Instead, the build fails with:
fatal error: config/MicroFsCfg.hpp: No such file or directory
6 | #include "config/MicroFsCfg.hpp"
| ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Problem Description
Commit
f0ab6de("Fix config") in fprime-community/fprime-baremetal, merged tomain, removed theBASE_CONFIGflag from theregister_fprime_config()call infprime-baremetal/config/CMakeLists.txtand replaced it withDEPENDS Fw_Types:register_fprime_config( fprime-baremetal-config HEADERS "${CMAKE_CURRENT_LIST_DIR}/MicroFsCfg.hpp" - INTERFACE # No buildable files generated - BASE_CONFIG + DEPENDS + Fw_Types + INTERFACE )BASE_CONFIGis what causes fprime's CMake build system to automatically link every module against this config target project-wide (seefprime/cmake/global_interface.cmake, which links the global interface target to allBASE_CONFIGconfiguration modules). Removing it meansconfig/MicroFsCfg.hppis no longer exposed on the include path to any consumer unless that consumer's own projectconfig/directory happens to provide an equivalent override.Any downstream deployment that uses
Os::Baremetal::MicroFsand does not itself provide aMicroFsCfg.hppoverride now fails to build with a missing-header error, because nothing registers the include path that used to come fromBASE_CONFIG.Context / Environment
How to Reproduce
fprime-baremetalatmain(postf0ab6de), e.g.db40930or later, as thelib/fprime-baremetalsubmodule of an fprime deployment targeting a baremetal OS (e.g.stm32h7).Os::Baremetal::MicroFs(directly or transitively through the baremetalOsimplementation) without the deployment's ownconfig/directory providing aMicroFsCfg.hppoverride.fprime-util build <platform>.Expected Behavior
The build should succeed, with
fprime-baremetal-configcontinuing to exposeconfig/MicroFsCfg.hppto every consumer ofOs::Baremetal::MicroFsby default, as it did beforef0ab6de, either by restoringBASE_CONFIGor by having every module that depends onOs::Baremetal::MicroFsexplicitlyDEPENDSonfprime-baremetal-config.Instead, the build fails with: