OMEGAWARE · GTi · ESP32-P4

The C6 Self-Update Path

‹ Back to the flasher

How the P4 brings its WiFi co-processor up to date — from its own flash, with an SD override.

The ESP32-P4 has no radio of its own — WiFi runs on a companion ESP32-C6 co-processor. To load disks over the air, that C6 has to be on firmware 2.12.13. Rather than make you build ESP-IDF or fumble with a second flasher, the GTi patches the C6 itself, from inside the GTi. Here's the whole path:

yes
no
SD .bin present (override)
else, baked in
neither present
25s, no tap
tap
P4 boots
C6 already at 2.12.13 or newer?
Normal boot - nothing to do
Pick the image
Use SD image
Use c6fw partition
Update screen - TAP to update, 25s to skip
Stream to C6 - esp_hosted OTA, inactive slot
Activate + reboot the P4
C6 on 2.12.13 - WiFi alive

The version gate

On boot the P4 reads the C6's version. 2.12.13 or newer → it does nothing. Anything older → it offers the update. A true three-field compare, so a 2.12.0 is correctly seen as behind.

Embedded by default

The ~1.2 MB C6 image is baked into a dedicated c6fw flash partition. The board self-updates from its own flash — no file to copy, no SD needed.

SD override

Drop a c6_network_adapter_*.bin on the SD root and it wins over the embedded copy — the escape hatch for a future C6 bump without re-flashing the whole board.

Can't brick it

The update writes the C6's inactive OTA slot, then activates it. Pull the power mid-flash and the old C6 still boots — you're simply offered the update again next time.

Where c6fw lives — the P4's 16 MB flash

nvs
app0 · 3M
app1 · 3M
ffat · 8.6M
c6fw · 1.25M
c6fw is carved from the unused ffat region at 0xEB0000 — no user data touched.

Two ways a board gets provisioned

Web-flash (full image). Flashing the whole firmware over USB — from the web flasher or esptool — writes the partition table and the C6 image into c6fw. This is the board that self-updates the C6 from its own flash, with nothing on the SD card.

SD update (.bin to the card). The in-firmware FW-UPDATE path refreshes the app only — it doesn't rewrite the partition table, so those boards have no c6fw and simply fall back to the SD-override file. Both routes end up in the same place; they just source the image differently.

Under the hood

The image streams to the C6 over the esp-hosted SDIO link in 1400-byte chunks (esp_hosted_slave_ota_begin / write / end / activate) with a progress bar on the panel, then the P4 reboots so the host re-links to the freshly-updated radio. The whole chain — SDIO link → C6 → WiFi stack — comes up live: it scans, joins, and opens a TCP socket to a dongle. Lives in Gotek_P4.ino → c6SelfUpdate(); the c6fw partition is baked into the published firmware by bake_c6.py.

Manual C6 update — download

Most boards never need this: a web-flashed P4 already carries the C6 image in its own flash and offers the update at first boot. Use this only if the C6 is stale — WiFi crashes, or SCAN never finds a dongle — and the update screen isn't appearing on its own.

  1. Download: c6_network_adapter_2.12.13.bin (~1.2 MB).
  2. Copy it to the root of the SD card, exactly as named.
  3. Insert the card and power the P4. If the C6 is behind, the amber “WiFi CO-PROCESSOR UPDATE — TAP to update” screen appears (25 s to skip).
  4. Tap the screen. Let the progress bar reach 100 % — do not power off. It activates and reboots.
  5. Done. The radio should now scan and fling. An interrupted flash just boots the old C6 — no brick.