CCSDSTime.h problems with sscanf() #48

Closed
opened 2020-04-21 16:35:37 +02:00 by muellerr · 0 comments
Owner

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).

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).
muellerr added the
bug
feature
labels 2020-04-22 19:09:53 +02:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: fsfw/fsfw#48
No description provided.