Repository navigation
Add from-partitions to draw ESP-IDF partition tables - #10
Merged
Merged
Conversation
`memmap from-partitions TABLE` writes a config from an ESP-IDF partition table, the CSV or the partition-table.bin the build writes, then checks it. It places partitions as ESP-IDF's gen_esp32part.py does, and draws one flash column with the bootloader, the partition table, each partition and the free space. --sdkconfig gives the flash size and the partition table and bootloader offsets; --flash-size, --table-offset and --bootloader-offset stand in for it. A CSV that breaks a rule of ESP-IDF's table check gets the new W113. Tests run on five real ESP-IDF builds, whose partition-table.bin is the ground truth for placing their CSV, and five tables from ESP-IDF, Arduino-ESP32 and MicroPython. docs/from-partitions.md describes the command and its limits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
memmap from-partitions TABLEwrites a config from an ESP-IDF partition table, then checks it likememmap check. TABLE is the project's CSV or thepartition-table.binthe build writes.gen_esp32part.py. A blank offset follows the previous partition, aligned to 64K for apps and 4K otherwise, starting after the partition table. Negative sizes,bootloader/partition_tableentries, flags and custom types are handled.Reservedblock below the bootloader on chips whose bootloader doesn't start at 0;Freeblocks for the gaps.--sdkconfiggives the flash size and the partition table and bootloader offsets.--flash-size,--table-offsetand--bootloader-offsetstand in without one. The config's header comments say where each value came from.otadatasize, duplicate names or an unknown subtype.quote,item_linesandusage_titleinmemmap/from_elf/writer.pyare now public, so the new writer can reuse them.Testing
sdkconfigand thepartition-table.binthe build wrote. memmap placed the CSV exactly as the binary in 117. Two differed only because older ESP-IDF read a blank subtype as 0. The other two had a binary built from a different table (stale builds)..bin) and 5 tables, each covering a case the others don't. Every fixture has a golden config, and two have golden SVGs.uv run pytest(747 passed),uv run mypyanduv run ruff checkare clean.Docs:
docs/from-partitions.md(new), README and AGENTS.md (the new task section and W113).🤖 Generated with Claude Code