-
Notifications
You must be signed in to change notification settings - Fork 3k
MTS targets: Don't use any printf() calls when NDEBUG is defined #5013
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
Conversation
…vents linking out printf() and friends in release build
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.
It make sense to remove prints in release
, but why do you add new macro in one place and just remove the printf in another?
@bulislaw Because in 2 files there's only one I'm open to suggestions though on how to make this more clean. |
Fair enough. I guess we should introduce some sort of mbed wide debug print wrappers (that don't require external lib) sooner rather than later. |
/morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
Why didn't this use the debug statement? https://github.com/ARMmbed/mbed-os/blob/master/platform/mbed_debug.h |
Instead of using #if NDEBUG, we can directly invoke debug() function. Fixes ARMmbed#5013
Instead of using #if NDEBUG, we can directly invoke debug() function. Fixes #5013
The current behavior prevents linking out
printf()
and friends in release builds. This patch makes blinky on xDot use 15K(!!!!) less flash when compiling release build with GCC_ARM./cc @chrissnow This pushes my bootloader for xDot to 22K on GCC, 21K on ARMCC.
@reissjason @sg-