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

User/beginner friendly permissive mode implementation #358

Closed
skliper opened this issue Sep 30, 2019 · 6 comments · Fixed by #505 or #544
Closed

User/beginner friendly permissive mode implementation #358

skliper opened this issue Sep 30, 2019 · 6 comments · Fixed by #505 or #544
Milestone

Comments

@skliper
Copy link
Contributor

skliper commented Sep 30, 2019

Failure when running as a normal user due to not setting the permissive mode should be user friendly. Both for message queues and priorities failures.

Also requesting a command line option, or default to permissive mode for the bundle (should just work out of the box on a linux system for a new user, the bundle is not a flight distribution). Maybe relate it to SIMULATION=native setting? Note current way it's set up (as an #undef in default_osconfig.h precludes passing it in as an option).

Worth discussing since currently the bundle defaults to debug mode with no optimization anyways. Perhaps permissive mode is also appropriate? Distribution guide (or whatever documentation is available) could cover transition to more flight-like configuration.

@skliper skliper added this to the 6.7.1 milestone Sep 30, 2019
@skliper skliper self-assigned this Sep 30, 2019
@skliper
Copy link
Contributor Author

skliper commented Sep 30, 2019

Imported from trac issue 327. Created by jhageman on 2019-08-27T10:10:53, last modified: 2019-08-27T10:10:53

@skliper skliper removed their assignment Sep 30, 2019
@skliper skliper modified the milestones: 6.7.1, 6.7.0, 6.8.0 Sep 30, 2019
@skliper
Copy link
Contributor Author

skliper commented Nov 1, 2019

@jphickey @acudmore what's your preferred solution? Right now the #undef requires a file edit to make it work which is undesirable from a CI point of view. How about just change to a commented out #define, and add a prep flag like ENABLE_PERMISSIVE (and mention the prep flag in the default_osconfig.h)?

@jphickey
Copy link
Contributor

jphickey commented Nov 1, 2019

In the future we had discussed moving all "code selection" options in osconfig.h to a build system config rather than putting these in a C header file. If/When we do that then the ENABLE_PERMISSIVE build option would logically be part of that.

In the meantime, I think we might be able to buy time by changing the #undef to be:

#ifdef SIMULATION
#define OSAL_DEBUG_PERMISSIVE_MODE
#endif

This assumes that new users build with SIMULATION=native though. Should make sure that this is in the user guide. By default I think the users guide has one do a "cross" build (non-sim) but using the host compiler so the output is for the same architecture in the end.

skliper added a commit that referenced this issue Nov 4, 2019
@skliper
Copy link
Contributor Author

skliper commented Nov 4, 2019

I'm actually not a fan of mixing SIMULATION and the PERMISSIVE mode (contrary to my original comments on this ticket) since they really are unique as you have highlighed. How about just take the setting out of osconfig.h, and do it in the build system instead of adding an intermediate step? It can still just be a -D flag passed in, but get's me the easier configuration capability now.

If this approach is accepted, should also remove setting from:
osal/src/bsp/pc-linux/config/osconfig.h

See c19536c

@skliper
Copy link
Contributor Author

skliper commented Nov 6, 2019

CCB - suggest just commenting out a #define, then allows environment variable to set

General discussion on what goes in *.h file vs build system configuration

  • suggest evaluating on how often something changes
  • Suggest code selection is in build system
    • Things like network code, etc
  • Suggest build options in build system (like buildtype, simulation, permissive, enable_werror, etc)
    • permissive mode fits under this option, suggestion to keep it unique from the other flags (simulation/buildtype/etc)

@skliper
Copy link
Contributor Author

skliper commented Jan 21, 2020

CCB 20200115 - Discussed just adding native_osconfig.h and override the permissive mode setting, that way whenever running as SIMULATION=native the permissive mode is set.

skliper added a commit to skliper/cFE that referenced this issue Jan 31, 2020
This adds the native_osconfig.h which is included after
the default_osconfig.h if SIMULATION=native is set.
skliper added a commit to skliper/cFE that referenced this issue Jan 31, 2020
This adds the native_osconfig.h which is included after
the default_osconfig.h if SIMULATION=native is set.
astrogeco added a commit that referenced this issue Mar 2, 2020
Fix #358, Add native permissive mode configuration
@astrogeco astrogeco mentioned this issue Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants