14
14
#define GET_OTP_BOARD_INFO
15
15
#elif defined(ARDUINO_NICLA_VISION)
16
16
#include " nicla_vision_bootloader.h"
17
+ #elif defined(ARDUINO_OPTA)
18
+ #include " opta_bootloader.h"
19
+ #include " mcuboot_opta.h"
20
+ #include " ecdsa-p256-encrypt-key.h"
21
+ #include " ecdsa-p256-signing-key.h"
17
22
#endif
18
23
19
24
#ifndef CORE_CM7
@@ -86,7 +91,7 @@ void setup() {
86
91
video_available = bootloader_data[8 ];
87
92
wifi_available = bootloader_data[5 ];
88
93
89
- #if defined(ARDUINO_PORTENTA_H7_M7)
94
+ #if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_OPTA)
90
95
Serial.println (" \n Do you want to install/update the default Arduino bootloader? Y/[n]" );
91
96
Serial.println (" Choosing \" No\" , will install/update the MCUboot bootloader." );
92
97
if (!waitResponse ()) {
@@ -102,6 +107,7 @@ void setup() {
102
107
if (!MCUboot) {
103
108
bootloader_ptr = &bootloader_mbed_bin[0 ];
104
109
bootloader_len = bootloader_mbed_bin_len;
110
+ #if defined(ARDUINO_PORTENTA_H7_M7)
105
111
if (!video_available) {
106
112
if (wifi_available) {
107
113
bootloader_ptr = &bootloader_mbed_lite_connected_bin[0 ];
@@ -111,6 +117,7 @@ void setup() {
111
117
bootloader_len = bootloader_mbed_lite_bin_len;
112
118
}
113
119
}
120
+ #endif
114
121
}
115
122
#endif
116
123
@@ -324,7 +331,7 @@ void applyUpdate(uint32_t address) {
324
331
}
325
332
}
326
333
327
- #if defined(ARDUINO_PORTENTA_H7_M7)
334
+ #if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_OPTA)
328
335
if (writeKeys) {
329
336
flash.program (&enc_priv_key, ENCRYPT_KEY_ADDR, ENCRYPT_KEY_SIZE);
330
337
flash.program (&ecdsa_pub_key, SIGNING_KEY_ADDR, SIGNING_KEY_SIZE);
0 commit comments