[Bug] Deterministic 'Illegal instruction' panic on M5Stack Tab5 (P4 Rev 1.0) after touch/camera init (v2.5.0)

Author: JMNRACreated Sep 27, 2026Updated Sep 28, 2026

Before submitting

  • I have tested the latest applicable firmware and searched for an existing issue reporting the same problem.

Device or development board

M5Stack Tab5 (SKU C145), ESP32-P4 chip revision v1.0, ILI9881C display + GT911 touch (production unit built 2025-04-25, factory firmware m5stack_tab5 a9c6a13-dirty).

Firmware version

2.5.0

Firmware source or filename

GitHub release v2.5.0_m5stack-tab5.zip (merged-binary.bin, flashed at 0x0). Also reproduced with a self-built m5stack-tab5 target from the v2.5.0 tag (ESP-IDF 6.1, language es-ES).

Problem and reproduction steps

Steps:

  1. Flash the release v2.5.0_m5stack-tab5.zip merged image to a M5Stack Tab5 (P4 Rev 1.0) with esptool.
  2. Reset and watch the console.

Expected result: normal boot into the XiaoZhi UI (provisioning / idle state).

Actual result: deterministic panic right after touch + camera init: Guru Meditation Error: Core 0 panic'ed (Illegal instruction). Exception was unhandled. The device then boot-loops at the same PC every boot (MEPC 0x481a06bc, PSRAM XIP region). Last lines before the panic are GT911: TouchPad_Config_Version:0 and sc202cs: Detected Camera sensor PID=0xeb52. On the same hardware our own ESP-IDF firmware (BSP-based, no PSRAM XIP) reads GT911: TouchPad_Config_Version:80, so the GT911 seems to be queried differently in the Tab5 board bring-up.

Frequency: 100% (every boot), both official prebuilt v2.5.0 and self-built.

Modifications, if any:

  • Official prebuilt v2.5.0: none.
  • Self-built experiments (crash unchanged): CONFIG_SPIRAM_XIP_FROM_PSRAM, CONFIG_SPIRAM_FLASH_LOAD_TO_PSRAM and CONFIG_SPIRAM_RODATA disabled; flash clock changed 80 -> 40 MHz. The m5stack-tab5 (Rev < 3) build variant with CONFIG_ESP32P4_SELECTS_REV_LESS_V3/CONFIG_ESP32P4_REV_MIN_100 was used throughout.

Logs or other evidence

bash
I (416) app_init: App version:      2.5.0
I (424) sleep_gpio: Configure to isolate all GPIO pins in sleep state
I (431) button: IoT Button Version: 4.2.1
I (659) M5StackTab5Board: Reset LCD and touch via PI4IOE
I (659) M5StackTab5Board: ST712x not found at 0x55 (ret=0x105), using default ILI9881C+GT911
I (660) M5StackTab5Board: Install LCD driver of ili9881c
I (722) ili9881c: ID1: 0x98, ID2: 0x81, ID3: 0x5c
I (856) GT911: TouchPad_Config_Version:0
I (856) sc202cs: Detected Camera sensor PID=0xeb52
Guru Meditation Error: Core  0 panic'ed (Illegal instruction). Exception was unhandled.

Core  0 register dump:
MEPC    : 0x481a06bc  RA      : 0x481a0492  SP      : 0x4ff30950  GP      : 0x4ff15300
MCAUSE  : 0x00000002 (illegal instruction), fault at the same MEPC on every boot

No backtrace is emitted (unhandled exception, boot loop before the app finishes starting).

Additional context that may help:

  • The same unit runs an ESP-IDF + esp-bsp + LVGL firmware (MIPI-DSI, internal-RAM draw buffers) stably, including PSRAM heap usage.
  • The unit's GT911 reports touch config version 80 under that firmware vs 0 under the Tab5 bring-up.