-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shell/cmds: GNRC: replace puts() with printf() #19327
Conversation
dad7625
to
42e042e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we can rely on the compiler to emit calls to puts("Foo");
when it sees printf("Foo\n");
, this should not impact non-AVR platforms. And it still is idiomatic C code.
bors merge |
19321: examples/gnrc_border_router: add BLE as downlink option r=benpicco a=benpicco 19325: esptools/install.sh: Fix shellcheck issues r=benpicco a=bergzand ### Contribution description Quote all the things! ### Testing procedure The script should still work as before ### Issues/PRs references None 19327: shell/cmds: GNRC: replace puts() with printf() r=benpicco a=benpicco 19328: pkg/u8g2: bump version r=benpicco a=benpicco Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com> Co-authored-by: Koen Zandberg <koen@bergzand.net> Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
Build failed (retrying...): |
42e042e
to
b1e327d
Compare
Canceled. |
bors cancel |
Build succeeded: |
Why do strings in a |
We don't enforce the There is a case for outputting non- |
Thanks for the explanation. I still wonder if or how we could check for any regressions in this direction. |
On ATmega and Xtensa For For |
I suppose we could to #define puts_literal(s) flash_puts(TO_FLASH(s)) but that might be a bit controversial |
Contribution description
Strings output with
printf()
will automatically be placed in the.text
section on AVR now.This is not true for strings output with
puts()
.Replace
puts()
withputs()
by runningTesting procedure
Observe the reduced
.data
RAM usage on AVR:master
this PR
Issues/PRs references