CmBacktrace icon indicating copy to clipboard operation
CmBacktrace copied to clipboard

打印hardfault信息时提示栈溢出,无法完全打印

Open banshanju opened this issue 2 years ago • 3 comments

如下所示:

>  msh />thread   pri  status      sp     stack size max used left tick  error
> -------- ---  ------- ---------- ----------  ------  ---------- ---
> sys_moni  30  running 0x00000048 0x00000800    04%   0x00000005 000
> tshell    20  suspend 0x00000094 0x00001000    03%   0x00000009 000
> tcp_clie   5  suspend 0x00000160 0x00000800    17%   0x00000000 000
> phy       30  suspend 0x00000094 0x00000400    14%   0x00000002 000
> tcpip     10  suspend 0x000000c8 0x00000400    20%   0x00000014 000
> etx       12  suspend 0x00000098 0x00000400    14%   0x00000010 000
> erx       12  suspend 0x00000098 0x00000400    14%   0x00000010 000
> sys work  23  suspend 0x00000060 0x00000800    04%   0x0000000a 000
> tidle0    31  ready   0x00000054 0x00000400    09%   0x0000000a 000
> main      10  suspend 0x0000009c 0x00000800    33%   0x00000007 000
> 
> Firmware name: CmBacktrace, hardware version: V1.0.0, software version: V0.1.0
> Fault on thread sys_moni 
> Error: Thread stack(20000d00) was overflow
> ===== Thread stack information =====
> ====================================
> Usage fault is caused by Indicates a divide by zero has taken place (can be set only if DIV_0_TRP is set)
> Dump call stack has an error

这是由于哪个线程的栈溢出导致的?

banshanju avatar Jun 30 '22 08:06 banshanju

https://club.rt-thread.org/ask/article/7132ac238001cb56.html

mysterywolf avatar Jul 05 '22 04:07 mysterywolf

我在启用优化选项(-Os .etc)的时候也遇到这个问题 >_<

cubex108 avatar Jun 05 '23 15:06 cubex108

我在启用优化选项(-Os .etc)的时候也遇到这个问题 >_<

是的,开启-Os后,saved_regs_addr需要声明为__IO或__volatile__

jadqin avatar Dec 18 '23 08:12 jadqin