Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple/alternative table definitions #1538

Closed
jphickey opened this issue May 17, 2021 · 0 comments · Fixed by #1549 or #1568
Closed

Support multiple/alternative table definitions #1538

jphickey opened this issue May 17, 2021 · 0 comments · Fixed by #1549 or #1568
Assignees
Milestone

Comments

@jphickey
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Some users have requested the ability to generate multiple different table files/configurations as part of the build, to represent different hardware configurations. This way, they can choose the active configuration at install time (by choosing which file gets copied to the target) or at run time, by loading a different table file.

Describe the solution you'd like
Currently the "add_cfe_tables" does not directly support this, but with a little work it should be able to. This requires adding an "install" hook so the user has a proper place to call this function to generate customized table files.

Describe alternatives you've considered
While this is possible to some degree with the current build system, all decisions are made at build time. For instance the C preprocessor can be used (via e.g. add_definitions) to select different table values based on build-time configurations. Alternatively, the user can write their own script to compile a C file and call elf2cfetbl on it, but it can be difficult to determine the proper include paths and compile definitions.

Requester Info
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey self-assigned this May 17, 2021
jphickey added a commit to jphickey/cFE that referenced this issue May 18, 2021
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.
astrogeco added a commit that referenced this issue May 24, 2021
Fix #1538, add capability to generate multiple tables
@skliper skliper added this to the 7.0.0 milestone Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants