You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/hardware/07.opta/opta-family/opta/tutorials/08.memory-partitioning/content.md
+19-14Lines changed: 19 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -318,35 +318,42 @@ void loop() {
318
318
}
319
319
```
320
320
321
-
***If you encounter an error while in the compilation process, __please remember to have both script and certificate files in the same folder__. The certificate file is crucial for the memory partitioning process. The complete sketch and the certificate files can be downloaded [__here__](assets/memory_partitioning.zip).***
322
-
323
321
The sketch shown above performs four main tasks:
324
322
325
323
1.**Initialize and erase the QSPI Flash memory**: The sketch initializes the QSPI Flash memory of the Opta™ and erases its content to prepare the memory for new firmware and data. One of the built-in LEDs of the device is used to indicate the progress of the memory-erasing process.
326
324
327
325
2.**Create partitions and format them in the QSPI Flash memory**: The sketch creates four partitions in the QSPI Flash memory:
328
-
- Partition 1: WiFi firmware and certificates (1MB)
329
-
- Partition 2: OTA (5MB)
326
+
- Partition 1: Wi-Fi firmware and certificates (1MB)
327
+
- Partition 2: OTA (Over-The-Air) (5MB)
330
328
- Partition 3: Provisioning KVStore (1MB)
331
329
- Partition 4: User data / OPTA PLC runtime (7MB)
332
330
333
331
3.**Write Wi-Fi firmware and certificate data**: The sketch writes the Wi-Fi firmware and certificate data to the appropriate partitions in the QSPI Flash memory and flashes the memory-mapped Wi-Fi firmware and certificates.
334
332
335
-
4.**Format the user data partition:** The sketch prompts you to choose between **LittleFS** or **FatFS** for formatting the user data partition. When planning to use the Opta™ with the PLC IDE, you should select **"n" (No)** when prompted with user data partition format to use. This will use *FatFS* instead, which is required for proper compatibility with the PLC runtime.
333
+
4.**Format the user data partition:** The sketch prompts you to choose between **LittleFS** or **FatFS** for formatting the user data partition. When using the Opta™ with the PLC IDE, you should select **`n` (No)** when prompted to choose user data partition format. This will use **FatFS** instead, which is required for proper compatibility with the PLC runtime.
336
334
337
335
***As indicated in the sketch output, __LittleFS__ is not supported by the OPTA PLC runtime.***
338
336
339
-
4.**Display progress in the Arduino IDE Serial Monitor**: The sketch provides a visual indication of the progress of the flashing process using one of the built-in LEDs of the Opta™ and displays messages through the Arduino IDE Serial Monitor to inform the user about the current status of the flashing process.
337
+
5.**Display progress in the Arduino IDE Serial Monitor**: The sketch provides a visual indication of the progress of the flashing process using one of the built-in LEDs of the Opta™ and displays messages through the Arduino IDE Serial Monitor to inform the user about the current status of the flashing process.
340
338
341
339
To upload the code, click the **Verify** button to compile the sketch and check for errors. Then, click the **Upload** button to program the device with the sketch. If two COM ports are available, which might happen after using the PLC IDE to program the device, select the COM port with the lower number.
342
340
343
341

344
342
345
-
After a while, you should see information on the progress of the flashing process in the Serial Monitor, as shown in the image below.
343
+
When you run the **QSPIFormat** sketch on your Opta™ device, follow the prompts displayed in the Arduino IDE's Serial Monitor:
344
+
345
+
1. You'll first see a warning that all content of the QSPI flash will be erased, as well as information about the partitions that will be created.
346
+
2. The Serial Monitor will ask, `Do you want to proceed? Y/[n]`, type **`Y`** and press *Enter* to continue.
347
+
3. Next, it will ask, `Do you want to perform a full erase of the QSPI flash before proceeding? Y/[n]`. Please answer according to your needs.
348
+
4. The system will then erase the flash memory and show progress indicators for the Wi-Fi firmware, certificates and memory mapped Wi-Fi firmware.
349
+
350
+
At the end of the memory partitioning process, you'll be prompted if you want to use **LittleFS** to format user data partition.
346
351
347
352

348
353
349
-
If everything went as intended, you should see a brief success message in the Serial Monitor. Now, we are ready to start using the full capabilities of the Opta™ with the Arduino IDE. The following clip shows briefly what to expect of complete memory partitioning process:
354
+
When planning to use the Opta™ with the PLC IDE, you must enter **`n`** to format the user data partition with **FatFS**. This is required for proper compatibility with the PLC runtime. If you need to use **LittleFS** to format the user data partition, please enter **`Y`**.
355
+
356
+
You should see a brief success message in the Serial Monitor if everything went as intended. Your Opta™ device should now be properly partitioned and formatted, making it ready for use. The process typically takes a few minutes to complete, with progress indicators keeping you informed. The following clip shows the complete memory partitioning process from start to finish:
350
357
351
358

352
359
@@ -603,15 +610,13 @@ void loop() {
603
610
}
604
611
```
605
612
606
-
***If you encounter an error during the compilation process, __please ensure both the script and certificate files are in the same folder__. The certificate file is crucial for the memory partitioning process. The complete sketch and the certificate files can be downloaded [here](assets/memory_partitioning.zip).***
607
-
608
-
Once the memory partition code is uploaded, wait for the process to finish. The upload target for the Portenta Machine Control is `Arduino Portenta H7`, which will be automatically detected by the Arduino IDE.
613
+
Once the memory partition code is uploaded, follow the instructions and wait for the process to finish. The upload target for the Portenta Machine Control is `Arduino Portenta H7`, which will be automatically detected by the Arduino IDE.
609
614
610
-
The Arduino IDE's Serial Monitor should display memory partition results similar to those of the Opta™.
615
+
The Arduino IDE's Serial Monitor should display memory partition process and results similar to those of the Opta™.
611
616
612
-

617
+

613
618
614
-
After this, you will be ready to use the full functionalities of the Portenta Machine Control with the Arduino IDE.
619
+
After this, you will be ready to use the full functionalities of the Portenta Machine Control.
0 commit comments