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

Dev/abcouwer/cmake baremetal fixes #821

Merged
merged 2 commits into from
Jul 14, 2021

Conversation

nabcouwer
Copy link
Contributor

Originating Project/Creator JPL COLDArm / Neil Abcouwer
Affected Component Various, ComLogger, FileDownlink, BlockDriver
Affected Architectures(s) Baremetal
Related Issue(s) n/a
Has Unit Tests (y/n) n/a
Builds Without Errors (y/n) y (Ref and our own baremetal build)
Unit Tests Pass (y/n) n/a
Documentation Included (y/n) n

Change Description

  • Added MIN and MAX size #defs for integers in Basic types.
  • Use U32_MAX from basic types in FileDownlink, instead of UINT32_MAX, which was missing in our limits.h.
  • Change "interrupt" to "interrupt_val" in BlockDriver (prevented build, "interrupt" must be a special name).
  • Guard on system type and don't include Ip socket-using components in baremetal build
  • Guard on system type and don't include LinuxTime in baremetal build.
  • Add Baremetal/Mutex.cpp to Os/CMakeLists.txt.
  • Switchup fatal handler files in CMakeLists based on system type.
  • Allow for undefined PATH_MAX in ComLogger.
  • Change all instances of FPRIME_USE_BAREMETAL_SCHEDULE to FPRIME_USE_BAREMETAL_SCHEDULER.

Rationale

We're making a baremetal, out of source build, and we were having to make some small tweaks, comment out some components in CMakeLists, to get FPrime components building when FPRIME_USE_BAREMETAL_SCHEDULER was set. These changes add some guards in CMakeLists files and make some very small component tweaks to allow building a baremetal build on a TI R5 processor.

Testing/Review Recommendations

Some of the ways that cmakes were guarded are subject to personal preference, Definitely up for making adjustments.

Future Work

None at this time.

… Add MIN and MAX size #defs for integers in Basic types. Use U32MAX from basic types in FileDownlink, instead of __UINT32_MAX__. Change interrupt to interrupt_val in BlockDriver (prevented build). Guard on system type and don't include Ip socket using components or LinuxTime in baremetal build. Add Baremetal/Mutex.cpp to Os/CMakeLists.txt. Switchup fatal handler files based on system type. Allow for missing PATH_MAX in ComLogger. Change all instances of FPRIME_USE_BAREMETAL_SCHEDULE to FPRIME_USE_BAREMETAL_SCHEDULER.
Copy link
Collaborator

@LeStarch LeStarch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. We may need to take an action to make the check for including Ip stuff less restrictive (e.g. other posix oses) but this is a fine solution for now.

@LeStarch LeStarch merged commit 2a96785 into nasa:devel Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants