obsidian-notes/代码/RT-thread/CmBacktrace.md
CSSC-WORK\murmur 3e6078442b init version
2024-04-15 11:19:57 +08:00

13 lines
473 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 启用ulog , CmBacktrace,出现错误时,不断重复打印 ps 内容,和 `[rt_sem_take]: scheduler is not available`
# 原因
ulog 有个 `ulog_output_lock_enabled` API ,用于开关 ulog 的日志锁,该功能就是专为异常日志设计的
可以在 `rt_cm_backtrace_exception_hook` 中使用该 API 关掉日志锁试试
# 解决措施
```c
void rt_cm_backtrace_exception_hook(void *context)
{
//添加此函数
ulog_output_lock_enabled(0);
//
```