Skip to content

Commit

Permalink
Portenta: update bootloader to v22
Browse files Browse the repository at this point in the history
  • Loading branch information
facchinm committed Dec 21, 2020
1 parent 9ecd46f commit bb53fdd
Show file tree
Hide file tree
Showing 8 changed files with 9,655 additions and 9,675 deletions.
Binary file modified bootloaders/PORTENTA_H7/portentah7_bootloader_mbed_fs.bin
Binary file not shown.
Binary file modified bootloaders/PORTENTA_H7/portentah7_bootloader_mbed_fs.elf
Binary file not shown.
Binary file modified bootloaders/PORTENTA_H7/portentah7_bootloader_mbed_hs.bin
Binary file not shown.
Binary file modified bootloaders/PORTENTA_H7/portentah7_bootloader_mbed_hs.elf
Binary file not shown.
Binary file modified bootloaders/PORTENTA_H7/portentah7_bootloader_mbed_hs_v2.bin
Binary file not shown.
Binary file modified bootloaders/PORTENTA_H7/portentah7_bootloader_mbed_hs_v2.elf
Binary file not shown.
19,316 changes: 9,643 additions & 9,673 deletions libraries/Portenta_System/examples/PortentaH7_updateBootloader/bootloader.h

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@

QSPIFBlockDevice root(PD_11, PD_12, PF_7, PD_13, PF_10, PG_6, QSPIF_POLARITY_MODE_1, 40000000);
mbed::MBRBlockDevice wifi_data(&root, 1);
mbed::MBRBlockDevice ota_data(&root, 2);
mbed::FATFileSystem wifi_data_fs("wlan");
mbed::FATFileSystem other_data_fs("fs");
mbed::FATFileSystem ota_data_fs("fs");

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

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

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

err = ota_data_fs.mount(&ota_data);
if (err) {
// Reformat if we can't mount the filesystem
// this should only happen on the first boot
Serial.println("No filesystem for OTA firmware was found, creating");
err = ota_data_fs.reformat(&ota_data);
}

DIR *dir;
struct dirent *ent;

Expand Down Expand Up @@ -95,4 +105,4 @@ void setup() {

void loop() {

}
}

0 comments on commit bb53fdd

Please sign in to comment.