Skip to content

Commit 67e6208

Browse files
committed
Check for OTA compatible bootloader in example and inform the user via an upgrade path.
1 parent 2e7aa0d commit 67e6208

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

examples/OTA_Qspi_Flash/OTA_Qspi_Flash.ino

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,14 @@ void setup()
6666
Arduino_Portenta_OTA_QSPI ota(QSPI_FLASH_FATFS_MBR, 2);
6767
Arduino_Portenta_OTA::Error ota_err = Arduino_Portenta_OTA::Error::None;
6868

69+
if (!ota.isOtaCapable())
70+
{
71+
Serial.println("Higher version bootloader required to perform OTA.");
72+
Serial.println("Please update the bootloader.");
73+
Serial.println("File -> Examples -> Portenta_System -> PortentaH7_updateBootloader");
74+
return;
75+
}
76+
6977
Serial.println("Initializing OTA storage");
7078
if ((ota_err = ota.begin()) != Arduino_Portenta_OTA::Error::None)
7179
{

0 commit comments

Comments
 (0)