Conversation
- Using fmt instead of printf reduces RAM requirements - fmt was already a dependency of phydat_str via fmt_s16_dfp, using fmt for all formatted output seems to be more consistent
- Using fmt reduces RAM requirements a bit compared to stdio/printf - Added fmt as explicit dependency of saul. (It was already an indirect dependency via phydat.)
|
I agree with the usage (and changes) of TL;DR: please split this in 2 PRs one for |
smlng
left a comment
There was a problem hiding this comment.
see comment above, I suggest to split this PR
Done, see #11394 for the stringification |
|
I cannot see the RAM improvement, though I see an increase in ROM size. I compared this PR against master with board |
|
With gcc-avr in version 8.3.0 I get for the Arduino-Mega2560. Basically, it depends on the application and toolchain if and how much memory is saved, as it will can only save RAM if Keeping in mind that e.g. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
|
I tested and can confirm that the output stays the same, the problem is I also see a size increase of > 200B for board Also the code is not that readable anymore, with all these separate calls to fmt print* functions. So I'd like to get comments from others on this: @kaspar030, @haukepetersen and @leandrolanzieri ? |
|
I think the issue is that with other RIOT internal modules using We could put the merging on a hold until everything has been converted to see how big the improvements will end up when it is completed. Some arguments for moving away from
|
|
#12305 might offer a more general solution. |
For those architectures using newlib this is definitely a nice thing. But not every architecture is using newlib. Also, the memory requirements of stdio (and the missing possibility of link time garbage collection for implementations of format specifiers) are not the only reason to get rid of it. |
|
I close this for now. A proper discussion on whether the move away from |
Contribution description
Testing procedure
examples/saulshould still work as expected on you favorite board.Issues/PRs references
None
Update: Changed description, as the third commit is split off into a separate PR