File tree 1 file changed +4
-2
lines changed
libraries/STM32H747_System/examples/STM32H747_manageBootloader
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,6 @@ void setup() {
153
153
154
154
if (writeLoader) {
155
155
if (availableBootloaderIdentifier.equals (" MCUboot Arduino" )) {
156
- setupMCUBootOTAData ();
157
156
158
157
Serial.println (" \n The bootloader comes with a set of default keys to evaluate signing and encryption process" );
159
158
Serial.println (" If you load the keys, you will need to upload the future sketches with Security Settings -> Signing + Encryption." );
@@ -163,8 +162,10 @@ void setup() {
163
162
Serial.println (" \n Please notice that loading the keys will enable MCUboot Sketch swap. This will increase the sketch update time after the upload." );
164
163
Serial.println (" A violet LED will blink until the sketch is ready to run." );
165
164
Serial.println (" Do you want to proceed loading the default keys? Y/[n]" );
165
+ writeKeys = waitResponse ();
166
+ } else {
167
+ writeKeys = false ;
166
168
}
167
- writeKeys = waitResponse ();
168
169
}
169
170
applyUpdate (BOOTLOADER_ADDR);
170
171
} else {
@@ -333,6 +334,7 @@ void applyUpdate(uint32_t address) {
333
334
334
335
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_OPTA)
335
336
if (writeKeys) {
337
+ setupMCUBootOTAData ();
336
338
flash.program (&enc_priv_key, ENCRYPT_KEY_ADDR, ENCRYPT_KEY_SIZE);
337
339
flash.program (&ecdsa_pub_key, SIGNING_KEY_ADDR, SIGNING_KEY_SIZE);
338
340
}
You can’t perform that action at this time.
0 commit comments