-
Notifications
You must be signed in to change notification settings - Fork 206
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
Add cmake function to add cpus by function rather than assume consecutive cpu ids. #265
Comments
Imported from trac issue 234. Created by tbrain on 2018-03-30T13:08:24, last modified: 2019-07-03T12:58:32 |
Trac comment by sseeger on 2018-05-28 13:38:55: Thomas, Just to be clear are you wanting something in targets.cmake that looks like SET(TARGETS cpu1 cpu3 test123) Which will then tell cmake to build TGT_CPU1 TGT_CPU3 and TGT_TEST123? |
Trac comment by jhageman on 2019-03-04 18:03:43: Owner - please provide updates/responses. |
Trac comment by jhageman on 2019-07-03 12:58:32: Moved unfinished 6.7.0 tickets to next release |
Ping @excaliburtb - no action in a while, I'll tag as a mission priority. |
@jphickey thoughts? |
The actual requirement is to be able to specify multiple targets in targets.cmake set(TGT1_NAME) but if I have an environmental or variable-based conditional do: Last I looked, this was an impossible setup because read_targetconfig looks for sequential targets. Also, one might want to build just TGT3 for some reason. Right now, one has to rename the TGT3 configurations. Not impossible but definitely inconvenient. |
FWIW, the CMake build system was designed to view the build as a "system" - a set of services/apps that are deployed across one or more CPUs (maybe or maybe not discrete/separate) that collectively implement your spacecraft operation software. In that view it shouldn't be "different" depending on an environment variable. The thought was hardware differences should be abstracted by the PSP, allowing the same set of high level apps to run, with only perhaps different configuration files/tables as you moved to a different host system type. It wasn't anticipated that there might be a fully different CPU definition. Or if there was, that one of these two approaches could work:
As adding/changing CPUs has implications on the MSGID assignment/allocations, there is a mission config component to redefining a CPU - so not really something that should be done via environment variable IMO. What would be fairly trivial to do, however, would be to allow one to configure the CPU number that is returned by default from |
If we had the opportunity to re-think the That might be still worth considering, but it would have a major impact on backward compatibility. |
I'd say fair game for 7.0 if stakeholders are on board. |
Just to clarify a bit.. when i build a specific target, I keep all the configuration that goes along with it because we have already diverged from the As far as having multiple target_defs to piece up the build, that approach has two failings. 1.) It greatly increases the integration efforts to keep everything in sync. and 2.) it doesn't take into account the problems faced with heterogenous targets where not all tool chains are available to all users of missions or, even simply, tools like continuous integration. I consider target_defs to be an integration point between flight computers of a single vehicle and we almost always run into a situation where we need to build a single piece of the configuration, rather than the whole thing. My point being, users are already doing this but they are having to alter the cmake scripts to do it. So, yes, name-based lists would be much better than index-based. |
Remove requirement to define a sequential/numbered list of targets. Instead, user defines a list of target names, followed by a set of properties associated with each name. This makes it much simpler to consistently define CPUs but selectively add/remove them from the build based on other criteria.
Fix #265, implement cmake name based targets
Currently, the cmake rules require that cpus are built in order and will stop looking for cpu targets when a cpu idx is not found.
Propose that a cmake function can be executed from the targets.cmake file which explicitly adds the cpus to be built for the mission.
The text was updated successfully, but these errors were encountered: