Skip to content

Crowpanel Advance ESP32-P4 HMI AI support#9526

Draft
mverch67 wants to merge 110 commits into
developfrom
crowpanel-p4
Draft

Crowpanel Advance ESP32-P4 HMI AI support#9526
mverch67 wants to merge 110 commits into
developfrom
crowpanel-p4

Conversation

@mverch67

@mverch67 mverch67 commented Feb 3, 2026

Copy link
Copy Markdown
Collaborator
image

https://www.elecrow.com/crowpanel-advanced-5inch-esp32-p4-hmi-ai-display-800x480-ips-touch-screen-with-wifi-6.html

  • Lora
  • EK79007 / RGB TFT Display
  • GT911 Touch controller
  • SD MMC card
  • STC8 mcu io-expander
    • brightness control
    • battery voltage
  • NS4168 audio/mic
  • esp32-c6 co-processor
    • wifi
    • bluetooth

🤝 Attestations

  • I have tested that my proposed changes behave as described.
  • I have tested that my proposed changes do not cause any obvious regressions on the following devices:
    • Heltec (Lora32) V3
    • LilyGo T-Deck
    • LilyGo T-Beam
    • RAK WisBlock 4631
    • Seeed Studio T-1000E tracker card
    • Other (please specify below)
      • Crowpanel Advanced P4 5.0"
      • Crowpanel Advanced P4 10.1"

@github-actions github-actions Bot added needs-review Needs human review hardware-support Hardware related: new devices or modules, problems specific to hardware labels Feb 3, 2026
@mverch67 mverch67 changed the title Crowpanel Advanced P4 support Crowpanel Advance ESP32-P4 HMI AI support Feb 4, 2026
@github-actions github-actions Bot added the Stale Issues that will be closed if not triaged. label Mar 26, 2026
@github-actions github-actions Bot closed this Apr 3, 2026
@thebentern thebentern reopened this Apr 3, 2026
mverch67 and others added 13 commits April 28, 2026 21:46
Resolve conflict in src/nimble/NimbleBluetooth.cpp by keeping
pioarduino's Arduino BLE API (onPassKeyNotify callback, passkey
set via pSecurity->setPassKey at setup time). Develop's changes
(variable rename + showSimpleBanner) target the old NimBLE-Arduino
API which pioarduino no longer uses.

Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
Not needed after USE_ETHERNET_DEFAULT
@moricef

moricef commented May 29, 2026

Copy link
Copy Markdown

Hey, we (F4MLV + Christian IW0EFI) spent the last few weeks getting the CrowPanel P4 5-inch variant to actually boot on real hardware. Here's what we found:

Board definition: crowpanel-p4 uses a pre-compiled bootloader linked at 0x4FFAC2C0 which crashes with Illegal Instruction on P4 eco2. Switching to board = esp32-p4-evboard uses a bootloader linked at 0x4FF29ED0 which works. The correct QIO bootloader lives in esp32p4_es/bin/bootloader_qio_80m.elf.

Device-UI dependency: must point to the elecrow-p4 branch, not master. Otherwise LGFX_ELECROW_P4_50.h is missing.

LVGL/LovyanGFX conflict: both define the same types. Workaround: a pre-build Python script that patches the device-ui LGFX header to include LVGL before LovyanGFX, and removes LovyanGFX's internal LVGL font files (v7/v8 format incompatible with LVGL v9).

Flash mode: must be QIO (not DIO). The bootloader header and firmware header both need flash_mode=QIO.

ROM data incompatibility: if bootloader and firmware use different IDF versions, rom_spiflash_legacy_data is placed at different addresses, causing null pointer dereferences in flash init. We added a rom_compat.c that stubs bootloader_flash_update_id()/bootloader_flash_update_size() and provides a fallback rom_spiflash_legacy_data symbol.

PlatformIO Core: must be >= 6.1.19 for ESP32-P4 support.

Flash addresses: bootloader at 0x2000 (not 0x0 — standard P4 offset).

The firmware now boots with working touchscreen, Bluetooth, and LoRa. Tested on CrowPanel Advanced 5" ESP32-P4 (eco2, GD25Q128 flash, ESP32-C6-MINI-1 co-processor).

Full changes at: https://github.com/moricef/meshtastic_crowpanel_p4/tree/crowpanel-p4

Hoping this helps get the PR ready for merge. Happy to provide more details if needed.

— Fabrice F4MLV

@mverch67

mverch67 commented May 29, 2026

Copy link
Copy Markdown
Collaborator Author

LVGL/LovyanGFX conflict: both define the same types. Workaround: a pre-build Python script that patches the device-ui LGFX header to include LVGL before LovyanGFX, and removes LovyanGFX's internal LVGL font files (v7/v8 format incompatible with LVGL v9).

This was an issue in lovyanGFX 1.2.20 and has been fixed in 1.2.21

PlatformIO Core: must be >= 6.1.19 for ESP32-P4 support.

We're using the pioarduino toolchain (which is a fork of platformio)

Board definition: crowpanel-p4 uses a pre-compiled bootloader linked at 0x4FFAC2C0 which crashes with Illegal Instruction on P4 eco2. Switching to board = esp32-p4-evboard uses a bootloader linked at 0x4FF29ED0 which works. The correct QIO bootloader lives in esp32p4_es/bin/bootloader_qio_80m.elf.

crowpanel-p4.json should work with pioarduino toolchain. There is also the qio definition. In future we want to switch to a 120MHz bootloader.

@mverch67 mverch67 changed the base branch from pioarduino to develop May 29, 2026 20:32
@mverch67

Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts in this pull request

Copilot AI commented May 29, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Resolved the merge conflicts and merged origin/develop into this branch in commit 94619389b.

@mverch67

mverch67 commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts in this pull request

# Conflicts:
#	src/nimble/NimbleBluetooth.cpp

Copilot AI commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Resolved and committed the merge conflicts by merging origin/develop into this branch in commit 30f9c8c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hardware-support Hardware related: new devices or modules, problems specific to hardware needs-review Needs human review Stale Issues that will be closed if not triaged. triaged Reviewed by the team, has enough information and ready to work on now.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants