File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
libraries/STM32H747_System/examples/STM32H747_manageBootloader Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,6 @@ void setup() {
153153
154154 if (writeLoader) {
155155 if (availableBootloaderIdentifier.equals (" MCUboot Arduino" )) {
156- setupMCUBootOTAData ();
157156
158157 Serial.println (" \n The bootloader comes with a set of default keys to evaluate signing and encryption process" );
159158 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() {
163162 Serial.println (" \n Please notice that loading the keys will enable MCUboot Sketch swap. This will increase the sketch update time after the upload." );
164163 Serial.println (" A violet LED will blink until the sketch is ready to run." );
165164 Serial.println (" Do you want to proceed loading the default keys? Y/[n]" );
165+ writeKeys = waitResponse ();
166+ } else {
167+ writeKeys = false ;
166168 }
167- writeKeys = waitResponse ();
168169 }
169170 applyUpdate (BOOTLOADER_ADDR);
170171 } else {
@@ -333,6 +334,7 @@ void applyUpdate(uint32_t address) {
333334
334335#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_OPTA)
335336 if (writeKeys) {
337+ setupMCUBootOTAData ();
336338 flash.program (&enc_priv_key, ENCRYPT_KEY_ADDR, ENCRYPT_KEY_SIZE);
337339 flash.program (&ecdsa_pub_key, SIGNING_KEY_ADDR, SIGNING_KEY_SIZE);
338340 }
You can’t perform that action at this time.
0 commit comments