EasyManuals Logo

Espressif ESP32-S2 User Manual

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #1445 background imageLoading...
Page #1445 background image
Chapter 4. API Guides
4.22 Partition Tables
4.22.1 Overview
A single ESP32-S2s flash can contain multiple apps, as well as many different kinds of data (calibration data,
filesystems, parameter storage, etc). For this reason a partition table is flashed to (default oset) 0x8000 in the flash.
Partition table length is 0xC00 bytes (maximum 95 partition table entries). An MD5 checksum, which is used for
checking the integrity of the partition table, is appended after the table data.
Each entry in the partition table has a name (label), type (app, data, or something else), subtype and the offset in flash
where the partition is loaded.
The simplest way to use the partition table is to open the project configuration menu (idf.py menuconfig) and
choose one of the simple predefined partition tables under CONFIG_PARTITION_TABLE_TYPE:
Single factory app, no OTA
Factory app, two OTA definitions
In both cases the factory app is flashed at offset 0x10000. If you execute idf.py partition-table then it will print a
summary of the partition table.
4.22.2 Built-in Partition Tables
Here is the summary printed for the Single factory app, no OTAconfiguration:
# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x6000,
phy_init, data, phy, 0xf000, 0x1000,
factory, app, factory, 0x10000, 1M,
At a 0x10000 (64 KB) offset in the flash is the app labelled factory. The bootloader will run this app by
default.
There are also two data regions defined in the partition table for storing NVS library partition and PHY init
data.
Here is the summary printed for the Factory app, two OTA definitionsconfiguration:
# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x4000,
otadata, data, ota, 0xd000, 0x2000,
phy_init, data, phy, 0xf000, 0x1000,
factory, app, factory, 0x10000, 1M,
ota_0, app, ota_0, 0x110000, 1M,
ota_1, app, ota_1, 0x210000, 1M,
There are now three app partition definitions. The type of the factory app (at 0x10000) and the next two
OTAapps are all set to app, but their subtypes are different.
There is also a new otadataslot, which holds the data for OTA updates. The bootloader consults this data
in order to know which app to execute. If ota datais empty, it will execute the factory app.
4.22.3 Creating Custom Tables
If you choose Custom partition table CSVin menuconfig then you can also enter the name of a CSV file (in the
project directory) to use for your partition table. The CSV file can describe any number of definitions for the table
you need.
The CSV format is the same format as printed in the summaries shown above. However, not all elds are required in
the CSV. For example, here is the inputCSV for the OTA partition table:
Espressif Systems 1434
Submit Document Feedback
Release v4.4

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Espressif ESP32-S2 and is the answer not in the manual?

Espressif ESP32-S2 Specifications

General IconGeneral
BrandEspressif
ModelESP32-S2
CategorySingle board computers
LanguageEnglish