CCSDSTime.h problems with sscanf() #48
Labels
No Label
API Change
Breaking API Change
bug
build
cosmetics
Documentation
duplicate
feature
help wanted
hotfix
invalid
question
Refactor
Tests
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: fsfw/fsfw#48
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I had several problems with the CCSDSTime convertFromCcsds() function
when using ASCII strings.
We're using a special library called newlib-nano. The nano version
does not implement C99 sscanf parsing with uint8_t datatypes but has a smaller binary.
I compared both binary sizes:
Mission build with Nano: 507156 bytes
Mission build wo Nano: 665788 bytes
Debug build with Nano: 833344
Debug build wo Nano: 991984
So there is either the option to implement a custom version of the sscanf functions which only uses uint16 and is dependant on an extern define (not really ideal..) or we use the regular newlib, but the binary size will be larger.
When using the regular newlib, I also had another issue.
There were specific data formats that could not be parsed. This was solved by changing the format specifiers
%hi
or%hii
(regular int) to$hu
or$hhu
(unsigned).