feat(partition_table): Improves documentation for partition table

This commit is contained in:
Konstantin Kondrashov
2025-05-22 13:51:21 +03:00
parent fbfa32c372
commit 909fd09ffa
2 changed files with 16 additions and 9 deletions

View File

@ -154,15 +154,20 @@ menu "Partition Table"
hex "Offset of partition table"
default 0x8000
help
The address of partition table (by default 0x8000).
Allows you to move the partition table, it gives more space for the bootloader.
Note that the bootloader and app will both need to be compiled with the same PARTITION_TABLE_OFFSET value.
The offset address of the partition table is, by default, 0x8000, and it starts right after
the bootloader. This offset can be changed if more space is required for the bootloader.
If you change this offset, both the bootloader and the app must be compiled with the same
PARTITION_TABLE_OFFSET value.
This number should be a multiple of 0x1000.
This value must be a multiple of 0x1000.
Note that partition offsets in the partition table CSV file may need to be changed if this value is set to
a higher value. To have each partition offset adapt to the configured partition table offset, leave all
partition offsets blank in the CSV file.
If you change the partition table offset, make sure to update the partition offsets in
the partition table CSV file. To let the build system automatically adjust partition offsets based on
the configured partition table offset, leave the offset fields blank in the CSV file.
Note: If you specify fixed offsets in the partition table CSV (i.e., the offset column is not blank),
the first partition must start at PARTITION_TABLE_OFFSET + 0x1000, since the partition table occupies
0x1000 bytes of flash space.
config PARTITION_TABLE_MD5
bool "Generate an MD5 checksum for the partition table"

View File

@ -71,7 +71,7 @@ The CSV format is the same format as printed in the summaries shown above. Howev
* Whitespace between fields is ignored, and so is any line starting with # (comments).
* Each non-comment line in the CSV file is a partition definition.
* The ``Offset`` field for each partition is empty. The ``gen_esp32part.py`` tool fills in each blank offset, starting after the partition table and making sure each partition is aligned correctly.
* If you change the value of :ref:`CONFIG_PARTITION_TABLE_OFFSET`, you should update any fixed ``Offset`` in your CSV file to avoid overlaps with the new partition table location. Alternatively, leaving the ``Offset`` field blank allows the ``gen_esp32part.py`` tool to automatically calculate the correct offset based on the current partition table offset and alignment requirements.
Here is an example of a CSV partition table that includes bootloader and partition table partitions:
@ -224,7 +224,9 @@ Offset & Size
- Sizes and offsets can be specified as decimal numbers, hex numbers with the prefix 0x, or size multipliers K or M (1024 and 1024*1024 bytes).
- For ``bootloader`` and ``partition_table`` types, specifying ``N/A`` for size and offset in the CSV file means that these values are automatically determined by the tool and cannot be manually defined. This requires setting the ``--offset`` and ``--primary-partition-offset`` arguments of ``gen_esp32part.py``.
If you want the partitions in the partition table to work relative to any placement (:ref:`CONFIG_PARTITION_TABLE_OFFSET`) of the table itself, leave the offset field (in CSV file) for all partitions blank. Similarly, if changing the partition table offset then be aware that all blank partition offsets may change to match, and that any fixed offsets may now collide with the partition table (causing an error).
.. note::
If you want the partitions in the partition table to work relative to any placement (:ref:`CONFIG_PARTITION_TABLE_OFFSET`) of the table itself, leave the offset field (in CSV file) for all partitions blank. Similarly, if changing the partition table offset then be aware that all blank partition offsets may change to match, and that any fixed offsets may now collide with the partition table (causing an error).
Flags
~~~~~