Skip to content

Commit d41fc2d

Browse files
restyled-commitsshubhamdp
authored andcommitted
Restyled by prettier-markdown
1 parent 17e1196 commit d41fc2d

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

docs/platforms/esp32/ota.md

+17-13
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ image can be encrypted/decrypted using an RSA-3072 key pair.
9292
9393
Please follow the steps below to generate an application image for OTA upgrades:
9494
95-
1. Generate a new RSA-3072 key pair or use an existing one.
95+
1. Generate a new RSA-3072 key pair or use an existing one.
9696
9797
- To generate a key pair, use the following command:
9898
@@ -105,31 +105,35 @@ Please follow the steps below to generate an application image for OTA upgrades:
105105
openssl rsa -in esp_image_encryption_key.pem -pubout -out esp_image_encryption_public_key.pem
106106
```
107107
108-
2. Encrypt the application binary using the
109-
[esp_enc_img_gen.py](https://github.com/espressif/idf-extra-components/blob/master/esp_encrypted_img/tools/esp_enc_img_gen.py)
110-
script.
108+
2. Encrypt the application binary using the
109+
[esp_enc_img_gen.py](https://github.com/espressif/idf-extra-components/blob/master/esp_encrypted_img/tools/esp_enc_img_gen.py)
110+
script.
111111
112112
- Use the following command to encrypt the OTA image with the public key:
113113
114114
```
115115
python3 esp_enc_img_gen.py encrypt lighting-app.bin esp_image_encryption_public_key.pem lighting-app-encrypted.bin
116116
```
117117
118-
Optionally, you can use the cmake function `create_esp_enc_img()` to encrypt the OTA image during the build process. Please find the usage below. This is also demonstrated in the `examples/lighting-app/esp32/main/CMakeLists.txt` file.
118+
Optionally, you can use the cmake function `create_esp_enc_img()` to encrypt
119+
the OTA image during the build process. Please find the usage below. This is
120+
also demonstrated in the `examples/lighting-app/esp32/main/CMakeLists.txt`
121+
file.
119122
120-
```
121-
create_esp_enc_img(${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.bin
122-
${project_dir}/esp_image_encryption_public_key.pem
123-
${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-encrypted.bin
124-
app)
125-
```
123+
```
124+
create_esp_enc_img(${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.bin
125+
${project_dir}/esp_image_encryption_public_key.pem
126+
${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-encrypted.bin
127+
app)
128+
```
129+
130+
3. Append the Matter OTA header
126131
127-
3. Append the Matter OTA header
128132
```
129133
src/app/ota_image_tool.py create --vendor-id 0xFFF1 --product-id 0x8000 --version 2 --version-str "v2.0" -da sha256 lighting-app-encrypted.bin lighting-app-encrypted-ota.bin
130134
```
131135
132-
4. Use the `lighting-app-encrypted-ota.bin` file with the OTA Provider app.
136+
4. Use the `lighting-app-encrypted-ota.bin` file with the OTA Provider app.
133137
134138
## Delta OTA
135139

0 commit comments

Comments
 (0)