Skip to content

QSPIFormat.ino: Fix partition scheme and partition 3 resizing #455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions libraries/STM32H747_System/examples/QSPIFormat/QSPIFormat.ino
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ void setup() {
Serial.println("Available partition schemes:");
Serial.println("\nPartition scheme 1");
Serial.println("Partition 1: WiFi firmware and certificates 1MB");
Serial.println("Partition 2: OTA and user data 14MB");
Serial.println("Partition 2: OTA and user data 13MB");
Serial.println("\nPartition scheme 2");
Serial.println("Partition 1: WiFi firmware and certificates 1MB");
Serial.println("Partition 2: OTA 5MB");
Serial.println("Partition 3: User data 9MB"),
Serial.println("Partition 3: User data 8MB"),
Serial.println("\nDo you want to use partition scheme 1? Y/[n]");
Serial.println("If No, partition scheme 2 will be used.");
bool default_scheme = waitResponse();
Expand All @@ -62,12 +62,12 @@ void setup() {
if (true == waitResponse()) {
mbed::MBRBlockDevice::partition(&root, 1, 0x0B, 0, 1024 * 1024);
if(default_scheme) {
mbed::MBRBlockDevice::partition(&root, 3, 0x0B, 6 * 1024 * 1024, 0);
mbed::MBRBlockDevice::partition(&root, 3, 0x0B, 14 * 1024 * 1024, 14 * 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
} else {
mbed::MBRBlockDevice::partition(&root, 2, 0x0B, 1024 * 1024, 5 * 1024 * 1024);
mbed::MBRBlockDevice::partition(&root, 3, 0x0B, 6 * 1024 * 1024, 9 * 1024 * 1024);
mbed::MBRBlockDevice::partition(&root, 2, 0x0B, 1024 * 1024, 6 * 1024 * 1024);
mbed::MBRBlockDevice::partition(&root, 3, 0x0B, 6 * 1024 * 1024, 14 * 1024 * 1024);
// use space from 15.5MB to 16 MB for another fw, memory mapped
}

Expand Down