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 #1361 background imageLoading...
Page #1361 background image
Chapter 4. API Guides
encrypted separately before writing.
This command will write to flash memory unencrypted images: the firmware bootloader, the partition
table and applications. Once the flashing is complete, ESP32-S2 will reset. On the next boot, the
firmware bootloader encrypts: the firmware bootloader, application partitions and partitions marked as
encrypted then resets. Encrypting in-place can take time, up to a minute for large partitions. After
that, the application is decrypted at runtime and executed.
If using Development Mode, then the easiest way to update and re-flash binaries is Re-flashing Updated Partitions.
If using Release Mode, then it is possible to pre-encrypt the binaries on the host and then flash them as ciphertext.
See Manually Encrypting Files.
Re-flashing Updated Partitions If you update your application code (done in plaintext) and want to re-flash it,
you will need to encrypt it before flashing. To encrypt the application and flash it in one step, run:
idf.py encrypted-app-flash monitor
If all partitions needs to be updated in encrypted format, run:
idf.py encrypted-flash monitor
Release Mode
In Release mode, UART bootloader cannot perform flash encryption operations. New plaintext images can ONLY
be downloaded using the over-the-air (OTA) scheme which will encrypt the plaintext image before writing to flash.
To use this mode, take the following steps:
1. Ensure that you have an ESP32-S2 device with default flash encryption eFuse settings as shown in Relevant
eFuses.
See how to check ESP32-S2 Flash Encryption Status.
2. In Project Configuration Menu, do the following:
Enable flash encryption on boot
Select Release mode (Note that once Release mode is selected, the
EFUSE_DIS_DOWNLOAD_MANUAL_ENCRYPT eFuse bit will be burned to disable flash
encryption hardware in ROM Download Mode.)
Select UART ROM download mode (Permanently switch to Secure mode (recommended)). This is
the default option, and is recommended. It is also possible to change this configuration setting to
permanently disable UART ROM download mode, if this mode is not needed.
Select the appropriate bootloader log verbosity
Save the configuration and exit.
Enabling flash encryption will increase the size of bootloader, which might require updating partition table offset.
See Bootloader Size.
3. Run the command given below to build and flash the complete images.
idf.py flash monitor
Note: This command does not include any user files which should be written to the partitions on the
flash memory. Please write them manually before running this command otherwise the files should be
encrypted separately before writing.
This command will write to flash memory unencrypted images: the firmware bootloader, the partition
table and applications. Once the flashing is complete, ESP32-S2 will reset. On the next boot, the
Espressif Systems 1350
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