-
Notifications
You must be signed in to change notification settings - Fork 452
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
移植到ESP8266后无限重启 #166
Comments
改一下任务栈大小看看 |
把主任务栈大小改成9999后依然重启
|
有没有重启前的打印,我记得发生异常,重启前会打印出异常原因和调用栈的 |
这是完整的打印
|
最后有把栈和寄存器信息打印出来,用 idf_monitor 或者 addr2line 分析下调用栈,看看是在哪里挂掉的 |
任务栈Task stack [uiT] stack from [0x3ffee718] to [0x3fff0e24], total [10000] size 0 4 8 c 10 14 18 1c 20 24 28 2c 30 34 38 3c 3fff0d80 0x3ffee498 0x00000000 0x40213b10 0x4022f538 0x00000119 0x00780a0a 0x3fff1c40 0x00000000 0x00000000 0x3ffee504 0x3ffee498 0x4023076a 0x00000000 0x3fff0dd0 0x00000000 0x00000000 3fff0dc0 0x00000000 0x3ffee498 0x00000000 0x402284c1 0x00012480 0x00000003 0x00000000 0x00000001 0x00000000 0x00000000 0x3ffe86bc 0x4022a724 0x00000000 0x00000000 0x3ffe86bc 0x4022850a 3fff0e00 0x00000000 0x00000000 0x3ffe86bc 0x402166d7 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 寄存器PC: 0x4000bdcb PS: 0x00000030 A0: 0x40230648 A1: 0x3fff0d80 A2: 0x40213b10 A3: 0x00000000 A4: 0x00000008 A5: 0x00000030 A6: 0x00000008 A7: 0x00000023 A8: 0x0000006c A9: 0x0000c8d8 A10: 0x00000003 A11: 0x40211728 A12: 0x00000000 A13: 0x3ffee708 A14: 0x3ffee708 A15: 0x0000ffff SAR: 0x00000019 EXCCAUSE: 0x0000001c 根据官方文档:https://blog.csdn.net/espressif/article/details/102658110, PC寄存器的值为0x4000bdcb,【PC 寄存器值若为野指针, 例如 0x80001210, 可能是内存踩踏. 一旦踩踏到栈底的 PC, 形如 retw.n 就会弹出野指针.】 猜测可能是调用letter-shell初始化函数的时候的时候出现了指针调用的问题。 |
初始化时野指针,可能是命令表没有被编译进去,现在里面 esp idf 的例程不确定是不是适合 8266 最好看看 map 文件,确认下命令表是不是都编译到一块连续空间了 |
错误说明
将letter shell移植到ESP8266后,可以正常编译和烧录,但程序运行到
shellInit(&shell, shellBuffer, 512);
后会无限重启ESP8266运行时输出的日志信息:
版本说明
详细代码
main.c
letter-shell-shell3.1/CMakeLists.txt
letter-shell-shell3.1/component.mk
letter-shell-shell3.1/shell.lf
The text was updated successfully, but these errors were encountered: