@@ -47,11 +47,13 @@ void setup() {
4747 Serial.println (" Available partition schemes:" );
4848 Serial.println (" \n Partition scheme 1" );
4949 Serial.println (" Partition 1: WiFi firmware and certificates 1MB" );
50- Serial.println (" Partition 2: OTA and user data 13MB" );
50+ Serial.println (" Partition 2: OTA and user data 12MB" );
51+ Serial.println (" Partition 4: Provisioning KVStore 1MB" );
5152 Serial.println (" \n Partition scheme 2" );
5253 Serial.println (" Partition 1: WiFi firmware and certificates 1MB" );
5354 Serial.println (" Partition 2: OTA 5MB" );
54- Serial.println (" Partition 3: User data 8MB" ),
55+ Serial.println (" Partition 3: User data 7MB" ),
56+ Serial.println (" Partition 4: Provisioning KVStore 1MB" );
5557 Serial.println (" \n Do you want to use partition scheme 1? Y/[n]" );
5658 Serial.println (" If No, partition scheme 2 will be used." );
5759 bool default_scheme = waitResponse ();
@@ -68,12 +70,14 @@ void setup() {
6870
6971 mbed::MBRBlockDevice::partition (&root, 1 , 0x0B , 0 , 1024 * 1024 );
7072 if (default_scheme) {
71- mbed::MBRBlockDevice::partition (&root, 3 , 0x0B , 14 * 1024 * 1024 , 14 * 1024 * 1024 );
72- mbed::MBRBlockDevice::partition (&root, 2 , 0x0B , 1024 * 1024 , 14 * 1024 * 1024 );
73+ mbed::MBRBlockDevice::partition (&root, 4 , 0x0B , 13 * 1024 * 1024 , 14 * 1024 * 1024 );
74+ mbed::MBRBlockDevice::partition (&root, 3 , 0x0B , 13 * 1024 * 1024 , 13 * 1024 * 1024 );
75+ mbed::MBRBlockDevice::partition (&root, 2 , 0x0B , 1024 * 1024 , 13 * 1024 * 1024 );
7376 // use space from 15.5MB to 16 MB for another fw, memory mapped
7477 } else {
75- mbed::MBRBlockDevice::partition (&root, 2 , 0x0B , 1024 * 1024 , 6 * 1024 * 1024 );
76- mbed::MBRBlockDevice::partition (&root, 3 , 0x0B , 6 * 1024 * 1024 , 14 * 1024 * 1024 );
78+ mbed::MBRBlockDevice::partition (&root, 4 , 0x0B , 1024 * 1024 , 6 * 1024 * 1024 );
79+ mbed::MBRBlockDevice::partition (&root, 3 , 0x0B , 6 * 1024 * 1024 , 13 * 1024 * 1024 );
80+ mbed::MBRBlockDevice::partition (&root, 2 , 0x0B , 13 * 1024 * 1024 , 14 * 1024 * 1024 );
7781 // use space from 15.5MB to 16 MB for another fw, memory mapped
7882 }
7983
@@ -82,7 +86,7 @@ void setup() {
8286 Serial.println (" Error formatting WiFi partition" );
8387 return ;
8488 }
85-
89+
8690 err = ota_data_fs.reformat (&ota_data);
8791 if (err) {
8892 Serial.println (" Error formatting OTA partition" );
0 commit comments