Skip to content

Commit dc26ac9

Browse files
facchinmsebromero
authored andcommitted
Portenta: update bootloader to v22
1 parent 35d9a5c commit dc26ac9

File tree

8 files changed

+9655
-9675
lines changed

8 files changed

+9655
-9675
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

libraries/Portenta_System/examples/PortentaH7_updateBootloader/bootloader.h

+9,643-9,673
Large diffs are not rendered by default.

libraries/WiFi/examples/PortentaWiFiFirmwareUpdater/PortentaWiFiFirmwareUpdater.ino

+12-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010

1111
QSPIFBlockDevice root(PD_11, PD_12, PF_7, PD_13, PF_10, PG_6, QSPIF_POLARITY_MODE_1, 40000000);
1212
mbed::MBRBlockDevice wifi_data(&root, 1);
13+
mbed::MBRBlockDevice ota_data(&root, 2);
1314
mbed::FATFileSystem wifi_data_fs("wlan");
14-
mbed::FATFileSystem other_data_fs("fs");
15+
mbed::FATFileSystem ota_data_fs("fs");
1516

1617
long getFileSize(FILE *fp) {
1718
fseek(fp, 0, SEEK_END);
@@ -27,6 +28,7 @@ void setup() {
2728
while (!Serial);
2829

2930
mbed::MBRBlockDevice::partition(&root, 1, 0x0B, 0, 1024 * 1024);
31+
mbed::MBRBlockDevice::partition(&root, 2, 0x0B, 1024 * 1024, 14 * 1024 * 1024);
3032
// use space from 15.5MB to 16 MB for another fw, memory mapped
3133

3234
int err = wifi_data_fs.mount(&wifi_data);
@@ -40,6 +42,14 @@ void setup() {
4042
err = wifi_data_fs.reformat(&wifi_data);
4143
}
4244

45+
err = ota_data_fs.mount(&ota_data);
46+
if (err) {
47+
// Reformat if we can't mount the filesystem
48+
// this should only happen on the first boot
49+
Serial.println("No filesystem for OTA firmware was found, creating");
50+
err = ota_data_fs.reformat(&ota_data);
51+
}
52+
4353
DIR *dir;
4454
struct dirent *ent;
4555

@@ -95,4 +105,4 @@ void setup() {
95105

96106
void loop() {
97107

98-
}
108+
}

0 commit comments

Comments
 (0)