完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
我一直在使用 ESP RTOS SDK,但最近改用 Arduino SDK。RTOS SDK 最棒的地方之一就是它的崩溃日志记录。它有一个叫做 IDF Monitor 的东西,它是一个充当串行控制台的工具,但是当它发现设备崩溃时会有一些特殊的行为。原始崩溃日志如下所示:
代码:全选Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled. Core 0 register dump: PC : 0x402234de PS : 0x00000033 A0 : 0x402234db A1 : 0x3ffef640 A2 : 0x00000001 A3 : 0x3ffea65c A4 : 0xffffffff A5 : 0x00000000 A6 : 0x3fff4838 A7 : 0x3fff4830 A8 : 0xbfff4880 A9 : 0x0000012c A10 : 0x00000006 A11 : 0x00000002 A12 : 0x00000000 A13 : 0x00000000 A14 : 0x00000000 A15 : 0x3ffef680 SAR : 0x0000001f EXCCAUSE: 0x0000001c Backtrace: 0x402234de:0x3ffef640 0x40225e88:0x3ffef680 0x40226389:0x3ffef6a0 0x4025e978:0x3ffef6c0 0x4025ef89:0x3ffef6e0 0x40260454:0x3ffef700 0x40260514:0x3ffef760 0x402600bb:0x3ffef770 但 IDF Monitor 对其进行了装饰,使其看起来像这样: 代码:全选Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled. Core 0 register dump: PC : 0x402234de PS : 0x00000033 A0 : 0x402234db A1 : 0x3ffef640 0x402234de: xQueueGenericSend at /Users/cmarrin/esp/ESP8266_RTOS_SDK/components/freertos/freertos/queue.c:2332 0x402234db: xQueueGenericSend at /Users/cmarrin/esp/ESP8266_RTOS_SDK/components/freertos/freertos/queue.c:2332 A2 : 0x00000001 A3 : 0x3ffea65c A4 : 0xffffffff A5 : 0x00000000 A6 : 0x3fff4838 A7 : 0x3fff4830 A8 : 0xbfff4880 A9 : 0x0000012c A10 : 0x00000006 A11 : 0x00000002 A12 : 0x00000000 A13 : 0x00000000 A14 : 0x00000000 A15 : 0x3ffef680 SAR : 0x0000001f EXCCAUSE: 0x0000001c Backtrace: 0x402234de:0x3ffef640 0x40225e88:0x3ffef680 0x40226389:0x3ffef6a0 0x4025e978:0x3ffef6c0 0x4025ef89:0x3ffef6e0 0x40260454:0x3ffef700 0x40260514:0x3ffef760 0x402600bb:0x3ffef770 0x402234de: xQueueGenericSend at /Users/cmarrin/esp/ESP8266_RTOS_SDK/components/freertos/freertos/queue.c:2332 0x40225e88: sys_mbox_post at /Users/cmarrin/esp/ESP8266_RTOS_SDK/components/lwip/port/esp8266/freertos/sys_arch.c:408 0x40226389: tcpip_api_call at /Users/cmarrin/esp/ESP8266_RTOS_SDK/components/lwip/lwip/src/api/tcpip.c:408 0x4025e978: tcpip_adapter_start_dhcp at /Users/cmarrin/esp/ESP8266_RTOS_SDK/components/tcpip_adapter/tcpip_adapter_lwip.c:1220 0x4025ef89: tcpip_adapter_dhcpc_start at /Users/cmarrin/esp/ESP8266_RTOS_SDK/components/tcpip_adapter/tcpip_adapter_lwip.c:1220 0x40260454: system_event_sta_connected_handle_default at /Users/cmarrin/esp/ESP8266_RTOS_SDK/components/esp8266/source/event_default_handlers.c:126 0x40260514: esp_event_process_default at /Users/cmarrin/esp/ESP8266_RTOS_SDK/components/esp8266/source/event_default_handlers.c:308 0x402600bb: esp_event_loop_task at /Users/cmarrin/esp/ESP8266_RTOS_SDK/components/esp8266/source/event_loop.c:92 所有这些代码指针都使用 ASCII 颜色,因此它们更显眼。 您为 IDFMonitor 提供一个指向 elf 文件的指针,它使用 addr2line 查找代码空间中的任何十六进制值,并在源文件中打印该行。它使查看崩溃发生的位置变得非常容易,或者至少在崩溃的位置附近。 您可以使用 IDF Monitor 作为 Arduino 的控制台,但它几乎没有提供有用的信息。它可能会为您提供当前 PC 的代码行,但这通常是对某事的中止或断言。问题是 Arduino 生成的崩溃转储没有将它的十六进制数字格式化为开头为 0x 并且它似乎没有转储整个堆栈跟踪。 是否有类似的机制可以使 Arduino 上的崩溃调试更容易,或者是否有更有用的替代崩溃转储输出? |
|
相关推荐
|
|
只有小组成员才能发言,加入小组>>
944 浏览 0 评论
1671 浏览 0 评论
请问一下我想用ESP8685直接替换ESP8266而不用写程序,可以让ESP8685直接通过之前ESP8266的外挂的flash运行程序吗
1330 浏览 1 评论
1233 浏览 1 评论
5015 浏览 2 评论
为blufi_device设置自定义名称,但是无法修改,为什么?
1252浏览 4评论
请问ESP32-S2-WROOM怎么获得ESP32-S2外接FLASH的唯一序列号?
927浏览 3评论
2334浏览 3评论
ESP-IDF的VScode插件的build按钮点击会报错的原因?
2526浏览 3评论
ESP-Jumpstart例程中第5个工程:5_cloud连接报错是哪里的问题?
1051浏览 2评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 01:27 , Processed in 0.629895 second(s), Total 38, Slave 31 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
1494
