Skip to content

panic'ed from Illegal instruction for esp32c6 #17

@youchan

Description

@youchan

https://qiita.com/Y_uuu/items/2f9910284b7dfb57d55d
I traced this procedure.

commands:

rake setup_esp32c6
rake build
rake flush
rake monitor

I got an error on boot as following.

ESP-ROM:esp32c6-20220919
Build:Sep 19 2022
rst:0xc (SW_CPU),boot:0x6e (SPI_FAST_FLASH_BOOT)
Saved PC:0x4001975a
--- 0x4001975a: software_reset_cpu in ROM

SPIWP:0xee
mode:DIO, clock div:2
load:0x40875720,len:0x16b8
load:0x4086c110,len:0xe90
load:0x4086e610,len:0x3054
entry 0x4086c11a
I (22) boot: ESP-IDF v5.4.1-674-gfe75355314 2nd stage bootloader
I (23) boot: compile time May 26 2025 16:33:20
I (24) boot: chip revision: v0.1
I (24) boot: efuse block revision: v0.3
I (27) boot.esp32c6: SPI Speed      : 80MHz
I (31) boot.esp32c6: SPI Mode       : DIO
I (34) boot.esp32c6: SPI Flash Size : 4MB
I (38) boot: Enabling RNG early entropy source...
I (43) boot: Partition Table:
I (45) boot: ## Label            Usage          Type ST Offset   Length
I (52) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (58) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (65) boot:  2 factory          factory app      00 00 00010000 00100000
I (71) boot:  3 storage          Unknown data     01 81 00110000 00100000
I (78) boot: End of partition table
I (81) esp_image: segment 0: paddr=00010020 vaddr=42070020 size=42720h (272160) map
I (188) esp_image: segment 1: paddr=00052748 vaddr=40800000 size=0d8d0h ( 55504) load
I (212) esp_image: segment 2: paddr=00060020 vaddr=42000020 size=686a0h (427680) map
I (369) esp_image: segment 3: paddr=000c86c8 vaddr=4080d8d0 size=02e8ch ( 11916) load
I (375) esp_image: segment 4: paddr=000cb55c vaddr=40810760 size=027e8h ( 10216) load
I (381) esp_image: segment 5: paddr=000cdd4c vaddr=50000000 size=00050h (    80) load
I (383) esp_image: segment 6: paddr=000cdda4 vaddr=50000050 size=00020h (    32) load
I (396) boot: Loaded app from partition at offset 0x10000
I (397) boot: Disabling RNG early entropy source...
I (411) cpu_start: Unicore app
I (420) cpu_start: Pro cpu start user code
I (420) cpu_start: cpu freq: 160000000 Hz
I (420) app_init: Application information:
I (421) app_init: Project name:     R2P2-ESP32
I (424) app_init: App version:      3ca590a
I (428) app_init: Compile time:     May 26 2025 16:33:12
I (433) app_init: ELF file SHA256:  19b4d2c4b...
I (437) app_init: ESP-IDF:          v5.4.1-674-gfe75355314
I (443) efuse_init: Min chip rev:     v0.0
I (446) efuse_init: Max chip rev:     v0.99
I (450) efuse_init: Chip rev:         v0.1
I (454) heap_init: Initializing. RAM available for dynamic allocation:
I (461) heap_init: At 40837010 len 00045600 (277 KiB): RAM
I (466) heap_init: At 4087C610 len 00002F54 (11 KiB): RAM
I (471) heap_init: At 50000070 len 00003F78 (15 KiB): RTCRAM
I (477) spi_flash: detected chip: generic
I (480) spi_flash: flash io: dio
I (483) sleep_gpio: Configure to isolate all GPIO pins in sleep state
I (489) sleep_gpio: Enable automatic switching of GPIO sleep configuration
I (496) coexist: coex firmware version: 88dafd1
I (500) coexist: coexist rom version 5b8dcfa
I (504) main_task: Started on CPU0
I (504) main_task: Calling app_main()
E (504) esp_timer: Task is already initialized
Initializing FLASH disk as the root volume...
Checking: /bin/cat ... OK (313 bytes)
Checking: /bin/date ... OK (105 bytes)
Checking: /bin/free ... OK (279 bytes)
Checking: /bin/hello ... OK (92 bytes)
Checking: /bin/install ... OK (662 bytes)
Checking: /bin/irb ... OK (105 bytes)
Checking: /bin/ls ... OK (1255 bytes)
Checking: /bin/mkdir ... OK (98 bytes)
Checking: /bin/mv ... OK (188 bytes)
Checking: /bin/nmble ... OK (4900 bytes)
Checking: /bin/nmcli ... OK (1525 bytes)
Checking: /etc/init.d/r2p2 ... OK (508 bytes)
Checking: /bin/rm ... OK (231 bytes)
Checking: /bin/setup_rtc ... OK (527 bytes)
Checking: /bin/setup_sdcard ... OK (617 bytes)
Checking: /bin/taskstat ... OK (197 bytes)
Checking: /bin/touch ... OK (197 bytes)
Checking: /bin/vim ... OK (132 bytes)
Checking: /bin/wifi_connect ... OK (2435 bytes)
Checking: /etc/machine-id ... OK (12 bytes)
Failed to load config file: /etc/config.yml
  No such file @ flash:/etc/config.yml (RuntimeError)
Available

Guru Meditation Error: Core  0 panic'ed (Illegal instruction). Exception was unhandled.

--- Stack dump detected
Core  0 register dump:
MEPC    : 0x4203ec48  RA      : 0x4203ec48  SP      : 0x4083b080  GP      : 0x40810f64
--- 0x4203ec48: mrbc_irep_pool_value at ??:?
--- 0x4203ec48: mrbc_irep_pool_value at ??:?

TP      : 0x4083b1e0  T0      : 0xffffff7f  T1      : 0x00000378  T2      : 0xffffffff
S0/FP   : 0x4083b0c0  S1      : 0x40813c10  A0      : 0x4083b098  A1      : 0x4208d305
A2      : 0x00000008  A3      : 0x0000003f  A4      : 0x4083b0a0  A5      : 0x4083b0a0
A6      : 0x00000010  A7      : 0x00000018  S2      : 0x4208d2fc  S3      : 0x42086000
S4      : 0x0000000f  S5      : 0x0000000d  S6      : 0x00000002  S7      : 0x000001af
S8      : 0x00000002  S9      : 0x00000005  S10     : 0x00000000  S11     : 0x00000000
T3      : 0x42086000  T4      : 0x00000000  T5      : 0x000002d1  T6      : 0x00000000
MSTATUS : 0x00001881  MTVEC   : 0x40800001  MCAUSE  : 0x00000002  MTVAL   : 0x000027e2
--- 0x40800001: _vector_table at /Users/yo.osaki/esp/esp-idf/components/riscv/vectors_intc.S:54

MHARTID : 0x00000000


--- Backtrace:


0x4203ec48 in mrbc_irep_pool_value ()
#0  0x4203ec48 in mrbc_irep_pool_value ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

4083b120: 0x40833a4c 0x00000004 0x00000003 0x40834000 0x00000002 0x40813c10 0x40813be8 0x4200d78a
--- 0x4200d78a: mrbc_run at ??:?

4083b140: 0x00000001 0x00000000 0x408152b8 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4083b160: 0x00000000 0x00000000 0x40813be8 0x4200ce5a 0x00000000 0x4083bb54 0x42072000 0x4200ce18
--- 0x4200ce5a: picoruby_esp32 at /Users/yo.osaki/esp/R2P2-ESP32/components/picoruby-esp32/picoruby-esp32.c:24
--- 0x4200ce18: app_main at /Users/yo.osaki/esp/R2P2-ESP32/main/main.c:6

4083b180: 0x42071dd4 0x000001f8 0xfe7fffff 0x42067f1a 0x00000000 0x00001388 0x00000001 0x00000000
--- 0x42067f1a: main_task at /Users/yo.osaki/esp/esp-idf/components/freertos/app_startup.c:209 (discriminator 13)

4083b1a0: 0x00000000 0x00000000 0x00000000 0x4080ac02 0x00000000 0x00000000 0x00000000 0x00000000
--- 0x4080ac02: vPortTaskWrapper at /Users/yo.osaki/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/riscv/port.c:258

4083b1c0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
4083b1e0: 0xa5a5a5a5 0x00000150 0x4083afd0 0x00000fba 0x40813188 0x40813188 0x4083b1e8 0x40813180
4083b200: 0x00000018 0x00000000 0x00000000 0x4083b1e8 0x00000000 0x00000001 0x40838fe4 0x6e69616d
4083b220: 0x00000000 0x00000000 0x00000000 0x4083b1e0 0x00000001 0x00000000 0x00000000 0x00000000
4083b240: 0x0000000b 0x40837960 0x408379c8 0x40837a30 0x00000000 0x00000000 0x00000001 0x00000000
4083b260: 0x00000000 0x00000000 0x4002849c 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
--- 0x4002849c: _cleanup_r in ROM

4083b280: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4083b2a0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4083b2c0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4083b2e0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4083b300: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4083b320: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000600 0xa5a5a5a5
4083b340: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
4083b360: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
4083b380: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
4083b3a0: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
4083b3c0: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
4083b3e0: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
4083b400: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
4083b420: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
4083b440: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
4083b460: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5



ELF file SHA256: 19b4d2c4b

Rebooting...

Device

Waveshare ESP32-C6 with 1.47 inch display

https://ja.aliexpress.com/item/1005008207509770.html

Environment

Apple M3 Pro
Sonoma 14.6

$ ruby -v
ruby 3.3.4 (2024-07-09 revision be1089c8ec) [arm64-darwin23]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions