概述
ESP32C3使用Arduino开发报Guru Meditation Error: Core 0 panic'ed (Load access fault). Exception was unhand错误,度娘搜索半天,帖子都只有报错定位分析方法,只是说指针可能有问题,并没有实际案例和解决方案。仔细根据出错过程并查程序发现问题所在,特分享一下。
具体错误:
Rebooting...
13:33:45.662 -> ESP-ROM:esp32c3-api1-20210207
13:33:45.662 -> Build:Feb 7 2021
13:33:45.662 -> rst:0x3 (RTC_SW_SYS_RST),boot:0xc (SPI_FAST_FLASH_BOOT)
13:33:45.662 -> Saved PC:0x40381b64
13:33:45.662 -> SPIWP:0xee
13:33:45.662 -> mode:DIO, clock div:1
13:33:45.662 -> load:0x3fcd6100,len:0x38c
13:33:45.662 -> load:0x403ce000,len:0x6a8
13:33:45.696 -> load:0x403d0000,len:0x236c
13:33:45.696 -> SHA-256 comparison failed:
13:33:45.696 -> Calculated: 86b6856493d23fe741a1623c3d149a38bdf91ca0101173d85f25c3fdb6d605ee
13:33:45.696 -> Expected: e7bbd322b12b609ed444a0547cebdc54bbcf46aefed1e04449d9827791f3e8ab
13:33:45.696 -> Attempting to boot anyway...
13:33:45.696 -> entry 0x403ce000
13:33:46.239 -> Nano Ready!
13:33:48.205 -> Guru Meditation Error: Core 0 panic'ed (Load access fault). Exception was unhandled.
13:33:48.239 ->
13:33:48.239 -> Core 0 register dump:
13:33:48.239 -> MEPC : 0x42003b46 RA : 0x42000132 SP : 0x3fc93550 GP : 0x3fc8b400
13:33:48.239 -> TP : 0x3fc8a1b0 T0 : 0xff7f7fff T1 : 0x7f7f7f7f T2 : 0xffffffff
13:33:48.239 -> S0/FP : 0x3fc8c0f0 S1 : 0x3fc8c000 A0 : 0x3fc8c0f0 A1 : 0x3fc8c0e0
13:33:48.239 -> A2 : 0x00000019 A3 : 0x000000a0 A4 : 0x0000001c A5 : 0x3a333120
13:33:48.273 -> A6 : 0xa0000000 A7 : 0x0000000a S2 : 0x3fc8c000 S3 : 0x00000000
13:33:48.273 -> S4 : 0x00000000 S5 : 0x00000000 S6 : 0x00000000 S7 : 0x00000000
13:33:48.273 -> S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
13:33:48.307 -> T3 : 0x00000000 T4 : 0x3fc93438 T5 : 0x00000001 T6 : 0x00000800
13:33:48.307 -> MSTATUS : 0x00001881 MTVEC : 0x40380001 MCAUSE : 0x00000005 MTVAL : 0x3a33312c
13:33:48.307 -> MHARTID : 0x00000000
13:33:48.307 ->
13:33:48.307 -> Stack memory:
13:33:48.307 -> 3fc93550: 0x00000000 0x00000000 0x000007e6 0x3fc8c0e0 0x00000014 0x0000000d 0x3fc8c0f0 0x42000132
13:33:48.307 -> 3fc93570: 0x00000000 0x00000001 0x3fc8ada0 0x420043c0 0x30322020 0x302d3232 0x30322d37 0x20200a0a
13:33:48.340 -> 3fc93590: 0x3a333120 0x343a3333 0x42000038 0x420002d4 0x00000000 0x3fc8d000 0x420038d4 0x42004046
13:33:48.340 -> 3fc935b0: 0x00000000 0x00000000 0x00000000 0x40386fe6 0x00000000 0x00000000 0x00000000 0x00000000
13:33:48.374 -> 3fc935d0: 0x00000000 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0x27146414 0x01010107 0x00000001 0x00000000
13:33:48.374 -> 3fc935f0: 0xffffffff 0x7fefffff 0x00000000 0x3fc00000 0x00000000 0x40300000 0x00000000 0x3fe00000
13:33:48.374 -> 3fc93610: 0x00000000 0x3ff80000 0x636f4361 0x3fd287a7 0x8b60c8b3 0x3fc68a28 0x509f79fb 0x3fd34413
13:33:48.374 -> 3fc93630: 0x00000000 0x3ff00000 0x00000000 0x40240000 0x00000000 0x401c0000 0x00000000 0x40140000
13:33:48.407 -> 3fc93650: 0x00000000 0x43500000 0x00000010 0x00000000 0xa5a5a5a5 0xa5a5a5a5 0x00000154 0x3fc93300
13:33:48.407 -> 3fc93670: 0x00000d87 0x3fc8ce9c 0x3fc8ce9c 0x3fc9366c 0x3fc8ce94 0x00000018 0x3fc8f82c 0x3fc8f82c
13:33:48.407 -> 3fc93690: 0x3fc9366c 0x00000000 0x00000001 0x3fc91668 0x706f6f6c 0x6b736154 0x81006200 0x00800914
13:33:48.441 -> 3fc936b0: 0x00000000 0x3fc93660 0x00000001 0x00000000 0x00000000 0x00000000 0x00000000 0x3fc8df0c
13:33:48.441 -> 3fc936d0: 0x3fc8df74 0x3fc8dfdc 0x00000000 0x00000000 0x00000001 0x00000000 0x00000000 0x00000000
13:33:48.441 -> 3fc936f0: 0x42014036 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
13:33:48.441 -> 3fc93710: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
13:33:48.475 -> 3fc93730: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
13:33:48.475 -> 3fc93750: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
13:33:48.475 -> 3fc93770: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
13:33:48.509 -> 3fc93790: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
13:33:48.509 -> 3fc937b0: 0x00000000 0x00000000 0x00000000 0x3fc90000 0x000000b8 0x00000000 0x00000000 0x00000000
13:33:48.509 -> 3fc937d0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
13:33:48.543 -> 3fc937f0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x420026c0
13:33:48.543 -> 3fc93810: 0x3fc8c480 0x00000000 0x00000000 0x00000000 0x00000000 0x420026c0 0x3fc8c4a4 0x420026c0
13:33:48.543 -> 3fc93830: 0x3fc8c4b0 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
13:33:48.577 -> 3fc93850: 0x00000000 0x420026c0 0x3fc8c4ec 0x420026c0 0x3fc8c4f8 0x00000000 0x00000000 0x00000000
13:33:48.577 -> 3fc93870: 0x00000000 0x00000000 0x00000000 0x0000000c 0x04120008 0x00000000 0x3fc93ed4 0x00000054
13:33:48.577 -> 3fc93890: 0x00000000 0x3fc93890 0x00000000 0x00000000 0x00000000 0x3fc938a8 0xffffffff 0x3fc938a8
13:33:48.577 -> 3fc938b0: 0x3fc938a8 0x00000000 0x3fc938bc 0xffffffff 0x3fc938bc 0x3fc938bc 0x00000001 0x00000001
13:33:48.610 -> 3fc938d0: 0x00000000 0xfc00ffff 0x00000000 0xb33fffff 0x00000000 0x00000100 0x00000000 0x00000000
13:33:48.610 -> 3fc938f0: 0x3fc93ec4 0x00000001 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
13:33:48.610 -> 3fc93910: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
13:33:48.644 -> 3fc93930: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
13:33:48.644 ->
13:33:48.644 ->
13:33:48.644 ->
13:33:48.644 -> ELF file SHA256: 0000000000000000
错误根本看不懂!!
无法分析,因此从出错的过程现象来分析:
上面这段程序修改增加年月日等字符串后,程序下载后发生重启并报错.
因此出错应该是和增加的字符串有关,怀疑增加字符串后液晶显示需要换行,会不会液晶驱动重新初始化了导致,分析程序应该没有关系。
参考网上回答,怀疑是不是数据溢出,分析该段代码,检查MaxString变量,
突然茅塞顿开,增加了字符串长度,这里最大长度定义没有修改。发生了数据溢出。
修改为32后,下载测试问题解决。
新手刚入门,水平有限,不吝惕教!
最后
以上就是冷静草丛为你收集整理的ESP32C3使用Arduino开发报Guru Meditation Error: Core 0 panic‘ed (Load access fault). Exception was unhand的全部内容,希望文章能够帮你解决ESP32C3使用Arduino开发报Guru Meditation Error: Core 0 panic‘ed (Load access fault). Exception was unhand所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复