File tree 15 files changed +156
-818
lines changed
15 files changed +156
-818
lines changed Original file line number Diff line number Diff line change
1
+ #if defined(ARDUINO_ARCH_ESP32) && OTA_ENABLED
2
+
3
+ #endif // defined(ARDUINO_ARCH_ESP32) && OTA_ENABLED
Original file line number Diff line number Diff line change
1
+ #pragma once
2
+
3
+ #include " src/ota/interface/OTAInterface.h"
4
+
5
+ class ESP32OTACloudProcess : public OTACloudProcessInterface {
6
+ public:
7
+ STM32H7OTACloudProcess ();
8
+ protected:
9
+ // we start the download and decompress process
10
+ virtual State fetch (Message* msg=nullptr );
11
+
12
+ // when the download is completed we verify for integrity and correctness of the downloaded binary
13
+ // virtual State verifyOTA(Message* msg=nullptr); // TODO this may be performed inside download
14
+
15
+ // whene the download is correctly finished we set the mcu to use the newly downloaded binary
16
+ virtual State flashOTA (Message* msg=nullptr );
17
+
18
+ // we reboot the device
19
+ virtual State reboot (Message* msg=nullptr );
20
+ };
Original file line number Diff line number Diff line change
1
+ #if defined(ARDUINO_NANO_RP2040_CONNECT) && OTA_ENABLED
2
+ #include " OTANanoRP2040.h"
3
+
4
+ #endif // defined(ARDUINO_NANO_RP2040_CONNECT) && OTA_ENABLED
Original file line number Diff line number Diff line change
1
+ #pragma once
2
+
3
+ #include " src/ota/interface/OTAInterface.h"
4
+
5
+ #include " FATFileSystem.h"
6
+ #include " FlashIAPBlockDevice.h"
7
+
8
+ class NANO_RP2040OTACloudProcess : public OTACloudProcessInterface {
9
+ public:
10
+ STM32H7OTACloudProcess ();
11
+ protected:
12
+ // we start the download and decompress process
13
+ virtual State fetch (Message* msg=nullptr );
14
+
15
+ // when the download is completed we verify for integrity and correctness of the downloaded binary
16
+ // virtual State verifyOTA(Message* msg=nullptr); // TODO this may be performed inside download
17
+
18
+ // whene the download is correctly finished we set the mcu to use the newly downloaded binary
19
+ virtual State flashOTA (Message* msg=nullptr );
20
+
21
+ // we reboot the device
22
+ virtual State reboot (Message* msg=nullptr );
23
+ };
Original file line number Diff line number Diff line change
1
+ #pragma once
2
+
3
+ #include " src/ota/interface/OTAInterface.h"
4
+
5
+ class STM32H7OTACloudProcess : public OTACloudProcessInterface {
6
+ public:
7
+ STM32H7OTACloudProcess ();
8
+ void update ();
9
+
10
+ // retrocompatibility functions used in old ota prtotocol based on properties
11
+ int otaRequest (char const * ota_url, NetworkAdapter iface);
12
+ String getOTAImageSHA256 ();
13
+ bool isOTACapable ();
14
+ protected:
15
+ // we start the download and decompress process
16
+ virtual State fetch (Message* msg=nullptr );
17
+
18
+ // whene the download is correctly finished we set the mcu to use the newly downloaded binary
19
+ virtual State flashOTA (Message* msg=nullptr );
20
+
21
+ // we reboot the device
22
+ virtual State reboot (Message* msg=nullptr );
23
+ };
Original file line number Diff line number Diff line change
1
+ #if defined(BOARD_STM32H7) && OTA_ENABLED
2
+ #include " OTAPortentaH7.h"
3
+
4
+ STM32H7OTACloudProcess::STM32H7OTACloudProcess () {}
5
+
6
+ void STM32H7OTACloudProcess::update () {
7
+ OTACloudProcessInterface::update ();
8
+ watchdog_reset ();
9
+ }
10
+
11
+ State STM32H7OTACloudProcess::fetch (Message *msg) {
12
+
13
+ }
14
+
15
+ State STM32H7OTACloudProcess::flashOTA (Message *msg) {
16
+ /* Schedule the firmware update. */
17
+ if ((ota_portenta_err = ota_portenta_qspi.update ()) != Arduino_Portenta_OTA::Error::None) {
18
+ DEBUG_ERROR (" Arduino_Portenta_OTA_QSPI::update() failed with %d" , static_cast <int >(ota_portenta_err));
19
+ return static_cast <int >(ota_portenta_err);
20
+ }
21
+ }
22
+
23
+ State STM32H7OTACloudProcess::reboot (Message *msg) {
24
+ // TODO save information about the progress reached in the ota
25
+
26
+ // This command reboots the mcu
27
+ NVIC_SystemReset ();
28
+
29
+ return Resume; // This won't ever be reached
30
+ }
31
+
32
+ #endif // defined(BOARD_STM32H7) && OTA_ENABLED
Original file line number Diff line number Diff line change
1
+ #if defined(ARDUINO_ARCH_SAMD) && OTA_ENABLED
2
+ #include " OTASamd.h"
3
+
4
+ #endif // defined(ARDUINO_ARCH_SAMD) && OTA_ENABLED
Original file line number Diff line number Diff line change
1
+ #pragma once
2
+
3
+ #include " src/ota/interface/OTAInterface.h"
4
+ #include < Arduino_DebugUtils.h>
5
+
6
+ class SAMDOTACloudProcess : public OTACloudProcessInterface {
7
+ public:
8
+ STM32H7OTACloudProcess ();
9
+ protected:
10
+ // we start the download and decompress process
11
+ virtual State fetch (Message* msg=nullptr );
12
+
13
+ // when the download is completed we verify for integrity and correctness of the downloaded binary
14
+ // virtual State verifyOTA(Message* msg=nullptr); // TODO this may be performed inside download
15
+
16
+ // whene the download is correctly finished we set the mcu to use the newly downloaded binary
17
+ virtual State flashOTA (Message* msg=nullptr );
18
+
19
+ // we reboot the device
20
+ virtual State reboot (Message* msg=nullptr );
21
+ };
Original file line number Diff line number Diff line change
1
+ #if defined(ARDUINO_UNOR4_WIFI) && OTA_ENABLED
2
+ #include " OTAUnoR4.h"
3
+
4
+ #endif // defined(ARDUINO_UNOR4_WIFI) && OTA_ENABLED
Original file line number Diff line number Diff line change
1
+ #pragma once
2
+
3
+ #include " src/ota/interface/OTAInterface.h"
4
+ #include " OTAUpdate.h"
5
+ #include " r_flash_lp.h"
6
+
7
+ class UNOR4OTACloudProcess : public OTACloudProcessInterface {
8
+ public:
9
+ STM32H7OTACloudProcess ();
10
+ protected:
11
+ // we start the download and decompress process
12
+ virtual State fetch (Message* msg=nullptr );
13
+
14
+ // when the download is completed we verify for integrity and correctness of the downloaded binary
15
+ // virtual State verifyOTA(Message* msg=nullptr); // TODO this may be performed inside download
16
+
17
+ // whene the download is correctly finished we set the mcu to use the newly downloaded binary
18
+ virtual State flashOTA (Message* msg=nullptr );
19
+
20
+ // we reboot the device
21
+ virtual State reboot (Message* msg=nullptr );
22
+ };
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments