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

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

Open
banshanju opened this issue Jun 30, 2022 · 3 comments
Open

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

banshanju opened this issue Jun 30, 2022 · 3 comments

Comments

@banshanju
Copy link

banshanju commented Jun 30, 2022

如下所示:

>  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

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

@mysterywolf
Copy link
Contributor

@cubex108
Copy link

cubex108 commented Jun 5, 2023

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

@jadqin
Copy link

jadqin commented Dec 18, 2023

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants