Chapter 4. API Guides
• The timeout period can be adjusted by setting
bootloader.
• The app's behaviour can be adjusted so the RTC Watchdog remains enabled after app startup. The Watch-
dog would need to be explicitly reset (i.e., fed) by the app to avoid a reset. To do this, set the
FIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE
pile the app.
• The
RTC
Watchdog
FIG_BOOTLOADER_WDT_ENABLE
4.3.7 Bootloader Size
When enabling additional bootloader functions, including
a high
CONFIG_BOOTLOADER_LOG_LEVEL
When using the default
CONFIG_PARTITION_TABLE_OFFSET
If the bootloader binary is too large, then the bootloader build will fail with an error "Bootloader binary size [..] is
too large for partition table offset". If the bootloader binary is flashed anyhow then the ESP32-S2 will fail to boot -
errors will be logged about either invalid partition table or invalid bootloader checksum.
Note: The bootloader size check only happens in the CMake Build System, when using the legacy GNU Make Build
System the size is not checked but the ESP32-S2 will fail to boot if bootloader is too large.
Options to work around this are:
• Set
bootloader compiler optimization
• Reduce
bootloader log
size (but may make it harder to debug).
• Set
CONFIG_PARTITION_TABLE_OFFSET
in the flash. This increases the space available for the bootloader. If the
tains explicit partition offsets, they will need changing so no partition has an offset lower than CON-
FIG_PARTITION_TABLE_OFFSET + 0x1000. (This includes the default partition CSV files supplied
with ESP-IDF.)
When Secure Boot V2 is enabled, there is also an absolute binary size limit of 64KB (0x10000 bytes) (excluding the
4 KB signature), because the bootloader is first loaded into a fixed size buffer for verification.
4.3.8 Fast boot from Deep Sleep
The bootloader has the
CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP
wake-up time from deep sleep to be reduced (useful for reducing power consumption). This option is available when
CONFIG_SECURE_BOOT
During the first boot, the bootloader stores the address of the application being launched in the RTC FAST memory.
And during the awakening, this address is used for booting without any checks, thus fast loading is achieved.
4.3.9 Custom bootloader
The current bootloader implementation allows a project to extend it or modify it. There are two ways of doing it: by
implementing hooks or by overriding it. Both ways are presented in
• bootloader_hooks which presents how to connect some hooks to the bootloader initialization
• bootloader_override which presents how to override the bootloader implementation
In the bootloader space, you cannot use the drivers and functions from other components. If necessary, then the
required functionality should be placed in the project' s bootloader_components directory (note that this will increase
its size).
Espressif Systems
CONFIG_BOOTLOADER_WDT_TIME_MS
can
be
disabled
setting and recompiling the bootloader. This is not recommended.
level, then it is important to monitor the bootloader .bin file's size.
back to "Size"if it has been changed from this default value.
level. Setting log level to Warning, Error or None all significantly reduce the final binary
to a higher value than 0x8000, to place the partition table later
option is disabled. Reduction of time is achieved due to the lack of image verification.
Submit Document Feedback
option, modify the app as needed, and then recom-
in
the
bootloader
Flash Encryption
or Secure Boot, and especially if setting
value 0x8000, the size limit is 0x7000 (28672) bytes.
custom_bootloader
1268
and recompiling the
CON-
by
disabling
the
CON-
partition table
CSV file con-
option which allows the
folder in ESP-IDF examples:
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?
Questions and answers