SpaceTeam / STS1_COBC_SW

Software for the communication and onboard computer (COBC) of SpaceTeamSat1 (STS1)
MIT License
10 stars 2 forks source link

Add central memory layout for FRAM #304

Closed wassr closed 5 months ago

wassr commented 5 months ago

Fixes #293

wassr commented 5 months ago

The defined constants still need to be put into some files which define these constants themselves. This will probably lead to a chicken-and-egg problem in files which are needed by FramLayout for size information but need FramLayout themselves for address and capacity information (e.g. Edu/ProgramStatusHistory.hpp).

codecov-commenter commented 5 months ago

Codecov Report

Attention: Patch coverage is 68.00000% with 8 lines in your changes missing coverage. Please review.

Project coverage is 87.58%. Comparing base (2e2fd75) to head (ef4d890).

Files Patch % Lines
Sts1CobcSw/Periphery/Section.ipp 0.00% 6 Missing :warning:
Sts1CobcSw/Edu/ProgramQueue.cpp 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #304 +/- ## ========================================== - Coverage 88.34% 87.58% -0.76% ========================================== Files 27 28 +1 Lines 695 701 +6 Branches 8 8 ========================================== Hits 614 614 - Misses 81 87 +6 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

PatrickKa commented 5 months ago

The chicken-and-egg problem will be solved by defining the sections sizes independent of the things they hold. That means that ProgramQueue.hpp and ProgramStatusHistory.hpp depend on the FRAM layout, but not vice versa. Of course, we can, and do, statically assert that the queue and the status history fit in their respective sections. I think this is a simple, easy, and sound solution.