Fix #2240, improve 64-bit memory address handling in CMD/TLM #2256
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist (Please check before submitting)
Describe the contribution
The "CFE_ES_MemAddress_t" and "CFE_ES_MemOffset_t" types were intended to provide a path for easily upgrading the CMD/TLM structs from 32-bit to 64-bit memory addresses. However, this type was a bit overused and in some of those use-cases (e.g. in TBL header) it assumed that the type was 32-bits during the byte swap ops. As a result, the type could not be changed to 64 bits as intended.
This reverts those cases in TBL back to uint32 (meaning that tables will still be limited to 32 bit sizes, even on 64 bit CPUs) but otherwise the addresses and sizes in ES/SB telemetry can grow to 64 bits as intended.
For unit tests, correct operation depends on the availablily of an updated test macro that can compare integers as "size_t" type. (as opposed to uint32).
Fixes #2240
Testing performed
Build and run all tests
Expected behavior changes
Changing the definition of "CFE_ES_MemAddress_t" and "CFE_ES_MemOffset_t" should now work as intended, provided that the conversion macros are also updated to match the definition.
System(s) tested on
Debian
Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.