-
Notifications
You must be signed in to change notification settings - Fork 3k
Use mbed_error_printf instead of debug for ISR friendly prints #9260
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
@ARMmbed/mbed-os-maintainers Enabling |
d7cc0ab
to
8fbe020
Compare
@deepikabhavnani, thank you for your changes. |
Internally in sleep tracing `debug` was used for trace prints, but all sleep API's are ISR safe and used in interrupts. This resulted in hardfaults / errors. Solution is to use `mbed_error_printf` instead for printing on UART
8fbe020
to
7e5e536
Compare
PR is split and review comments addressed. Please review again
CI started |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
@deepikabhavnani @ARMmbed/mbed-os-maintainers Is there a better solution for this? Having to build for the debug profile (which disallows sleep) seems counter-intuitive when using the sleep tracer to diagnose sleep issues. I just hit the breaking change in the developer profile (#9260 (comment)) when trying to validate #9685. |
After uncovering a problem with PR #9685 - I think my comment above can be ignored... I thought one now had to use the debug profile to see LOCK/UNLOCK messages from the sleep tracer but I see that's not the case. @deepikabhavnani could you confirm? |
@TacoGrandeTX - Yes, the goal here was not to move to debug profile, rather enable prints in debug and develop profile from ISR context (sleep/deepsleep) |
Description
Resolves: #9216
All the
debug
calls in sleep manager for sleep tracing should be changed tombed_error_printf
since most sleep API's and calls are interrupt and thread safe. Fixed here.Issue was seen only with
debug
profile and was not captured indevelop
profile becauseMBED_TRAP_ERRORS_ENABLED
flag was not set indevelop
profile. PR #9277Pull request type
Reviewers
@kjbracey-arm