Skip to content
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

Merged

Conversation

@michalpasztamobica
Copy link
Contributor

commented Aug 5, 2019

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

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@AriParkkila
@teetak01
@davidsaada
@bulislaw
@SeppoTakalo

@michalpasztamobica michalpasztamobica force-pushed the michalpasztamobica:spif_driver_conditional_debug branch from dbd47b6 to e96d782 Aug 5, 2019

@michalpasztamobica

This comment has been minimized.

Copy link
Contributor Author

commented Aug 5, 2019

Astyle fixes added.

@ciarmcom ciarmcom requested review from AriParkkila, bulislaw, davidsaada, SeppoTakalo, teetak01 and ARMmbed/mbed-os-maintainers Aug 5, 2019

@ciarmcom

This comment has been minimized.

@VeijoPesonen
Copy link
Contributor

left a comment

Looks good to me.

*/
#ifndef MBED_CONF_SPIF_BLOCK_DEBUG
#define MBED_CONF_SPIF_BLOCK_DEBUG false
#endif

This comment has been minimized.

Copy link
@SeppoTakalo

SeppoTakalo Aug 5, 2019

Contributor

Why is this needed? Is the debug_if() macro sensitive of macros being not defined?

This comment has been minimized.

Copy link
@michalpasztamobica

michalpasztamobica Aug 5, 2019

Author Contributor

Yes, debug_if is a function. Code won't compile if MBED_CONF_SPIF_BLOCK_DEBUG is not defined.

This comment has been minimized.

Copy link
@teetak01

teetak01 Aug 6, 2019

Contributor

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.

This comment has been minimized.

Copy link
@michalpasztamobica

michalpasztamobica Aug 6, 2019

Author Contributor

Thanks, @teetak01 , you are right. I amended the code.

@mbed-ci

This comment has been minimized.

Copy link

commented Aug 5, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

@michalpasztamobica michalpasztamobica force-pushed the michalpasztamobica:spif_driver_conditional_debug branch from e96d782 to a5bbf2d Aug 6, 2019

Bring back SPIF module-specific debug logs
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 #10501

@michalpasztamobica michalpasztamobica force-pushed the michalpasztamobica:spif_driver_conditional_debug branch from a5bbf2d to 1fe59b7 Aug 6, 2019

@mbed-ci

This comment has been minimized.

Copy link

commented Aug 6, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 2
Build artifacts

@SeppoTakalo SeppoTakalo merged commit 431c4c1 into ARMmbed:master Aug 6, 2019

26 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(+0 bytes) RAM(+0 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARM Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Success!
Details
travis-ci/docs Success!
Details
travis-ci/doxy-spellcheck Success!
Details
travis-ci/events Success! Runtime is 8638 cycles.
Details
travis-ci/gitattributestest Success!
Details
travis-ci/include_check Success!
Details
travis-ci/licence_check Success!
Details
travis-ci/littlefs Success! Code size is 8448B.
Details
travis-ci/psa-autogen Success!
Details
travis-ci/tools-py2.7 Success!
Details
travis-ci/tools-py3.5 Success!
Details
travis-ci/tools-py3.6 Success!
Details
travis-ci/tools-py3.7 Success!
Details

@michalpasztamobica michalpasztamobica deleted the michalpasztamobica:spif_driver_conditional_debug branch Aug 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.