Overriding default headers (typically application configuration includes) #403
Replies: 2 comments
-
Side note, if you ever wondered how cpu1_platform_cfg.h gets included, or sample_mission_cfg.h, sample_perfids.h, etc a similar method is used but it's done from within the cfe module CMake logic. Open source update for consideration would be to replace the custom logic that processes these, and just use the approach suggested above (have a shared, cpu1, cpu2 subdir in sample_defs as an example), could also show how to override tables. |
Beta Was this translation helpful? Give feedback.
-
Updated and confirmed relative to the Draco dev cycle. Note the table search path is here: |
Beta Was this translation helpful? Give feedback.
-
Common question we get is how to override application config headers if you don't want the default without dirtying the repo. In your target_defs you can add the following to arch_build_custom.cmake:
Then within target_defs add a directory for the target system name (cpu name) with the include files you want to override. What this does is during prep it creates a "wrapper" header in the build target include directory with the name "filename" that includes the file in your target_defs directory. The build target include directory comes before the app include directory, so this file will be the one included when you build.
Beta Was this translation helpful? Give feedback.
All reactions