// frequently asked

ESP32 FAQ: Questions, Answered.

103 questions across every ESP32 topic. Pick one on the left — the answer loads right here.

FAQ › Flashing & Firmware › ESP32 Partitions: Layout, OTA, Custom
// partitions · ota · faq

ESP32 Partitions: Layout, OTA, Custom

Filed under: ESP32 · Partitions · Updated August 2026

How to read esp32 partition table, pull data from flash in C, and keep OTA from bricking the device.

How to Read ESP32 Partition Table?

Two steps: dump, then decode. esptool.py read_flash 0x8000 0xC00 part.bin, then esptool.py image_info part.bin prints every region, offset, size. Faster: parttool.py get_partition_info ships with ESP-IDF.

What is a partition table, exactly?

A map of the flash at offset 0x8000 telling the bootloader what lives where: nvs, otadata, two app slots for dual-OTA, and a filesystem region. Each entry is offset plus size; nothing overlaps, and the total must fit flash. The stock 4 MB table gives each app slot ~1.3 MB.

How to Read from ESP32 Flash Partition in C?

Use the esp_partition API and let it handle offsets: esp_partition_find_first() locates the partition, then esp_partition_read(partition, 0, buf, len). The Arduino core links the real IDF, so the same calls work there. Blind read_flash works too, but you need addresses — the API exists so you don't.

How to Clear Core Dump Partition in ESP32?

One command: esptool.py erase_region with the core-dump partition's offset and size from the table above. From code, esp_partition_erase_range() does the same. Crashes write a dump there, and repeated crashes fill it until old and new are indistinguishable — clear it first and backtraces stay readable. Decoding them is in our debugging FAQ.

How to Prevent an OTA Device from Bricking Itself?

How to prevent an ota device from bricking itself esp32 comes down to one architecture: dual-slot OTA. app0 and app1 plus otadata let the bootloader roll back to the last good image if the new one fails. The chip marks the new app pending, boots it, and you confirm with esp_ota_mark_app_valid_cancel_rollback(), or it reverts on crash. I killed a kitchen display that way once; recovery meant a serial cable and a full reflash.

Does Tasmota Work with ESP32?

Yes — Tasmota32 runs on ESP32, the fastest route to a web-driven device. It replaces the partition table on first flash; 4 MB is the minimum, some features want 16 MB. Does tasmota work with esp32 the same as on ESP8266? Close enough — same console, same rules — with different GPIO naming.

How do I create a custom partition table?

Write a CSV and flash it. In Arduino IDE: Tools → Partition Scheme → Custom, then partitions.csv next to your sketch. Each line is name, type, subtype, offset, size — e.g. nvs, data, nvs, 0x9000, 0x6000. ESP-IDF uses CONFIG_PARTITION_TABLE_CUSTOM_FILENAME. The partition tool validates the CSV before flashing and catches most layout mistakes. Working examples: our knowledge base.

Why does OTA fail at 99%?

Almost always size or signature. The new image must fit its app partition, and at 99% of a full slot there's no room for the final bookkeeping, so it aborts. Check the image with esptool.py image_info against the partition size; app signature verification is the other culprit.

How to Flash Bin File to ESP32 with a Custom Layout?

esptool.py write_flash with explicit offsets: write_flash 0x1000 bootloader.bin 0x8000 partitions.bin 0x10000 app.bin. Order matters — bootloader first, then partitions, then the app at its real offset. Forgetting partitions.bin is the classic mistake: the app flashes fine, the table stays stale, the device never boots. The full procedure is in the flashing FAQ.

What happens if the partition table corrupts?

The chip loops: it reads a table it can't parse and resets endlessly. Recovery is mechanical — erase_flash and reflash bootloader, partitions, and app. That's why flashing the table is the riskiest step: get it wrong and the device won't even try to boot.

Still stuck? A real engineer answers — usually within a day.

Email support →