Fix #1538, add capability to generate multiple tables #1549
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.
Adds a "install_custom.cmake" hook that can be put into a CPU-specific subdirectory under the "defs" directory, that can perform extra installation steps as required for the project/mission.
Tweaks the "add_cfe_tables" function such that it can also be called from the install_custom.cmake script to generate additional/alternative table binary files for that CPU.
The main update is that it uses the "APP_NAME" parameter to associate the table files with the app library, so the same set of include files can be used. This relies on the target-scope properties being used. Historically that string wasn't verified, it could have been any unique string, but now it should match the app if this is to work as expected.
Describe the contribution
Fixes #1538
Testing performed
Add multiple/alternative table definitions for sample_app in a local 2-cpu configuration. Confirm that all table files are built and installed to the staging area correctly, and that sample_app can be tweaked to load one of the alternatives, just by changing the filename it loads.
Expected behavior changes
Because the "APP_NAME" (1st parameter) of
add_cfe_tables
was never validated historically, it just had to be unique, this still allows any string for backward compatibility. It will generate a new "Note" message to the user if it does not match an application name, but it is still accepted.If the multiple table feature is used, it actually needs to match the application name, or else the include paths may be incomplete.
System(s) tested on
Ubuntu
Additional context
See also nasa/sample_app#148
Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.