Skip to content

Commit

Permalink
Merge pull request #310 from pennam/portenta_m4_no_ota
Browse files Browse the repository at this point in the history
PORTENTA_H7_M4: Remove M4 core from supported build options
  • Loading branch information
pennam authored Mar 31, 2022
2 parents 45d5672 + c31c2da commit 451d57d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 10 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/compile-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ jobs:
type: gsm
- fqbn: arduino:samd:mkrnb1500
type: nb
- fqbn: arduino:mbed:envie_m4
type: mbed
- fqbn: arduino:mbed:envie_m7
type: mbed
- fqbn: esp8266:esp8266:huzzah
Expand Down
2 changes: 1 addition & 1 deletion src/AIoTC_Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@

#if defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKR1000) || \
defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_PORTENTA_H7_M7) || \
defined(ARDUINO_PORTENTA_H7_M4) || defined (ARDUINO_NANO_RP2040_CONNECT)
defined (ARDUINO_NANO_RP2040_CONNECT)
#define BOARD_HAS_ECCX08
#define HAS_TCP
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/ArduinoIoTCloudTCP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include "tls/utility/CryptoUtil.h"
#endif

#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_NICLA_VISION)
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION)
# include "tls/utility/SHA256.h"
# include <stm32h7xx_hal_rtc_ex.h>
# include <WiFi.h>
Expand Down Expand Up @@ -826,7 +826,7 @@ void ArduinoIoTCloudTCP::onOTARequest()
_ota_error = rp2040_connect_onOTARequest(_ota_url.c_str());
#endif

#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_NICLA_VISION)
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION)
_ota_error = portenta_h7_onOTARequest(_ota_url.c_str());
#endif
}
Expand Down
4 changes: 2 additions & 2 deletions src/utility/ota/OTA-portenta-h7.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
a commercial license, send an email to [email protected].
*/

#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_NICLA_VISION)
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION)

/******************************************************************************
* INCLUDE
Expand Down Expand Up @@ -87,4 +87,4 @@ int portenta_h7_onOTARequest(char const * ota_url)
NVIC_SystemReset();
}

#endif /* defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_NICLA_VISION) */
#endif /* defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION) */
2 changes: 1 addition & 1 deletion src/utility/ota/OTA.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ int samd_onOTARequest(char const * ota_url);
int rp2040_connect_onOTARequest(char const * ota_url);
#endif

#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_NICLA_VISION)
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION)
int portenta_h7_onOTARequest(char const * ota_url);
#endif

Expand Down
4 changes: 2 additions & 2 deletions src/utility/watchdog/Watchdog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void mkr_nb_feed_watchdog()
static void mbed_watchdog_enable()
{
watchdog_config_t cfg;
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_NICLA_VISION)
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION)
cfg.timeout_ms = PORTENTA_H7_WATCHDOG_MAX_TIMEOUT_ms;
#elif defined(ARDUINO_NANO_RP2040_CONNECT)
cfg.timeout_ms = NANO_RP2040_WATCHDOG_MAX_TIMEOUT_ms;
Expand All @@ -116,7 +116,7 @@ static void mbed_watchdog_reset()
void mbed_watchdog_trigger_reset()
{
watchdog_config_t cfg;
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_NICLA_VISION)
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION)
cfg.timeout_ms = 1;
#elif defined(ARDUINO_NANO_RP2040_CONNECT)
cfg.timeout_ms = 1;
Expand Down

0 comments on commit 451d57d

Please sign in to comment.