Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crowpanel Advanced — ESP32-P4 C6 SDIO OTA

Upgrades the ESP32-C6 co-processor firmware on a CrowPanel ESP32-P4 board using SDIO OTA via esp_hosted.

Quick Start

# Optional but recommended: verify local toolchain first
bin/check-env.sh

# Option 1: auto-detect target
# First run: reads MAC, asks which display model (5"/7"/9"/10.1"), stores answer in .board-target-map
# Subsequent runs: recognises the MAC automatically — no prompt needed
bin/upgrade-c6.sh --auto

# Option 2: specify target explicitly
bin/upgrade-c6.sh crowpanel-p4-50
# or
bin/upgrade-c6.sh crowpanel-p4-70-90-101

Manual installation steps

# Pick one target name:
#   crowpanel-p4-50
#   crowpanel-p4-70-90-101
TARGET=crowpanel-p4-50

# 1. Download the latest C6 firmware into data/
bin/download_c6_fw.sh

# 2. Build the app firmware
bin/build.sh "$TARGET"

# 3. Build the LittleFS image from data/
bin/buildfs.sh "$TARGET"

# 4. Flash LittleFS storage partition FIRST
bin/upload_fs.sh "$TARGET"

# 5. Flash the app firmware
bin/flash.sh "$TARGET"

Project Layout

bin/
  check-env.sh        verify Python + PlatformIO + esptool, with install guidance
  upgrade-c6.sh       one-shot download + build + uploadfs + flash
  detect_target.sh    optional target auto-detection helper
  download_c6_fw.sh   auto-download latest C6 firmware into data/
  mklittlefs.sh       compatibility wrapper around buildfs.sh
  buildfs.sh          package data/ → LittleFS image
  upload_fs.sh        flash LittleFS storage partition
  build.sh            build app firmware
  flash.sh            flash app firmware
boards/
  crowpanel-p4.json   elecrow advanced p4 board definition 
data/
  network_adapter_esp32c6.bin   (generated by download_c6_fw.sh)
partitions.csv        custom partition table (ota_0/ota_1/storage/slave_fw)
platformio.ini        PlatformIO config
fix_p4_linker.py      pre-build script: linker patch + Kconfig patch
src/
  main.cpp            P4 host app (OTA phases + esp_hosted init)
  ota_littlefs.c/h    LittleFS OTA implementation

Partition Table

Name Type SubType Offset Size
nvs data nvs 0x9000 16K
otadata data ota 0xd000 8K
phy_init data phy 0xf000 4K
ota_0 app ota_0 0x10000 2M
ota_1 app ota_1 0x210000 2M
storage data littlefs 0x410000 1920K
slave_fw data 0x40 0x5f0000 2M

ESP32-C6 Co-Processor Firmware

Downloaded from esphome/esp-hosted-firmware GitHub Pages. bin/download_c6_fw.sh automatically picks the latest release tag via the GitHub API.

To download manually (replace version as needed):

curl -L -o data/network_adapter.bin \
    https://esphome.github.io/esp-hosted-firmware/v2.12.3/network_adapter_esp32c6.bin

Build Requirements (Linux)

  • PlatformIO (pioarduino fork) (VS Code extension or CLI)
  • Platform: pioarduino 55.03.38-1
  • Framework: Arduino + ESP-IDF (mixed)
  • Python 3 (for fix_p4_linker.py pre-build script)

About

Crowpanel Advanced — ESP32-P4 C6 SDIO OTA

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages