-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Bring back SPIF module-specific debug logs #11163
Bring back SPIF module-specific debug logs #11163
Conversation
dbd47b6
to
e96d782
Compare
Astyle fixes added. |
@michalpasztamobica, thank you for your changes. |
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.
Looks good to me.
*/ | ||
#ifndef MBED_CONF_SPIF_BLOCK_DEBUG | ||
#define MBED_CONF_SPIF_BLOCK_DEBUG false | ||
#endif |
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.
Why is this needed? Is the debug_if()
macro sensitive of macros being not defined?
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.
Yes, debug_if
is a function. Code won't compile if MBED_CONF_SPIF_BLOCK_DEBUG is not defined.
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.
I think this should not be neccessary?
Just change the mbed_lib.json to only accept values 1 and 0.
For. ex. "options": [0, 1].
Just to clarify for general information:
Setting value 0
in mbed_lib.json defines the MACRO with value of 0
.
Setting value null
in mbed_lib.json does not define any MACRO.
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.
Thanks, @teetak01 , you are right. I amended the code.
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
e96d782
to
a5bbf2d
Compare
The logs are switched off by default and can be enabled with a module-specific compile switch in mbed_app.json. Logs brought back from PR ARMmbed#10501
a5bbf2d
to
1fe59b7
Compare
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Description
The logs are switched off by default and can be enabled with a module-specific compile switch in mbed_app.json. This way, setting the
debug
level will not imply that SPIF-specific logs flood the output. Instead, when SPIF developers want to debug their module, they can enable them easily.Brought back from PR #10501
As @teetak01 suggested, I followed the example of ESP8266 and its ATParser.
Pull request type
Reviewers
@AriParkkila
@teetak01
@davidsaada
@bulislaw
@SeppoTakalo