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

Fix #632, Infer OSAL_SYSTEM_BSPTYPE from CFE_SYSTEM_PSP_NAME #634

Merged

Conversation

jphickey
Copy link
Contributor

Describe the contribution
Normally the CFE PSP uses/links with an OSAL BSP of the same name. This removes the need to explicitly specify OSAL_SYSTEM_BSPTYPE in the toolchain file, as it can be reliably inferred.

Fixes #632

This is also another alternative way to fix #629

Testing performed
Build with defaults (as in README, e.g. a simple make prep), as well as SIMULATION=native, and for i686-rtems4.11 platform. Confirm successful build.

Also "forced" a mismatch by hacking the i686-rtems4.11 toolchain to request bad combinations, and confirm that the build system warns of the mismatch now:

If OSAL_SYSTEM_BSPTYPE is set to pc-linux, the following warning happens in make prep

CMake Warning at cmake/arch_build.cmake:334 (message):
  Mismatched PSP/BSP: pc-rtems implies pc-rtems, but pc-linux is configured
Call Stack (most recent call first):
  CMakeLists.txt:119 (process_arch)

Likewise if the OSAL_SYSTEM_OSTYPE is set to posix, the follow is seen (from OSAL):

CMake Warning at /home/joe/code/cfecfs/github/osal/CMakeLists.txt:138 (message):
  Mismatched BSP/OS: pc-rtems implies rtems, but posix is configured

Finally removed settings of OSAL_SYSTEM_OSTYPE and OSAL_SYSTEM_BSPTYPE from the toolchain and confirmed that code correctly builds without issue, using the pc-rtems BSP and rtems OS layers, as expected for this toolchain.

Expected behavior changes

  • Mismatches between PSP/BSP/OS are now detected and warned about during make prep
  • Only the CFE_SYSTEM_PSPNAME is actually required to be specified for a CFE build now. Others can be omitted.

System(s) tested on
Ubuntu 18.04 LTS 64 bit, with i686-rtems4.11 cross target

Additional context
The related change to infer OSAL_SYSTEM_OSTYPE from OSAL_SYSTEM_BSPTYPE is in nasa/osal#432 and pull request nasa/osal#427. If it is desired to merge separately this can still be merged but it will have to continue setting OSAL_SYSTEM_OSTYPE.

Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.

astrogeco and others added 2 commits April 20, 2020 12:32
Normally the CFE PSP uses/links with an OSAL BSP of the same name.
This removes the need to explicitly specify OSAL_SYSTEM_BSPTYPE
in the toolchain file, as it can be reliably inferred.
@skliper skliper added bug CCB:Ready Ready for discussion at the Configuration Control Board (CCB) labels Apr 21, 2020
@skliper skliper added this to the 6.8.0 milestone Apr 21, 2020
@astrogeco
Copy link
Contributor

CCB 20200422 - Merge together with osal side. APPROVED - FAST TRACK

@skliper skliper added CCB:Approved Indicates code review and approval by community CCB and removed CCB:Ready Ready for discussion at the Configuration Control Board (CCB) labels Apr 22, 2020
@astrogeco astrogeco changed the base branch from master to integration-candidate April 23, 2020 19:02
@astrogeco astrogeco merged commit 89308e4 into nasa:integration-candidate Apr 24, 2020
@jphickey jphickey deleted the fix-632-implied-osal-bsptype branch May 1, 2020 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug CCB:Approved Indicates code review and approval by community CCB CCB:FastTrack enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update build scripts so only CFE_SYSTEM_PSPNAME needs to be specified make prep broken out of the box
3 participants