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
[spinel] add support for logging crash dumps #10061
[spinel] add support for logging crash dumps #10061
Conversation
d39169f
to
0924abe
Compare
Size Report of OpenThread
|
0924abe
to
c58511f
Compare
@zhanglongxia @abtink Could you please review this when you get a chance? Thanks! |
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 @lmnotran. Some suggestions below. Thank you.
40d6610
to
7ddfc12
Compare
This API will trigger a platform to log a crash dump if one available.
7d33e83
to
eb39342
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.
Looks great. Thanks. 👍
One small suggestion below.
… prop during RCP init if capable
eb39342
to
788a4a1
Compare
Thanks for reviewing, @abtink ! |
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.
LGTM
@jwhui Could you review this soon please? This is blocking a release issue for us. Thanks! |
Supersedes #9829
Closes #10048
This PR adds a new feature that allows platforms to log crash logs.
Additions
void otPlatLogCrashDump(void)
- API that logs a crash dump using OpenThread Logging APIsSPINEL_PROP_RCP_LOG_CRASH_DUMP
- spinel prop that callsotPlatLogCrashDump()
whenSet
SPINEL_CAP_RCP_LOG_CRASH_DUMP
- spinel capability denoting that a RCP supports logging crash dumpsUsage
ot-cli-ftd|mtd
,otPlatLogCrashDump()
is called at the end of app initialization, before the main loop. See [main.c]SPINEL_CAP_RCP_LOG_CRASH_DUMP
capability, the Host willSet
theSPINEL_PROP_RCP_LOG_CRASH_DUMP
property, triggering the RCP to callotPlatLogCrashDump()
.Example logs
ot-cli-syslog_ot-rcp-fault-triggered-by-diag-command.md
ot-cli-syslog_ot-rcp-autofaulting-every-2-seconds.md