Skip to content

Commit c75013f

Browse files
authored
Merge pull request #309 from bcmi-labs/nicla_vision
Add support for NICLA VISION
2 parents cc3b617 + fbad3a3 commit c75013f

File tree

7 files changed

+28
-12
lines changed

7 files changed

+28
-12
lines changed

Diff for: .github/workflows/compile-examples.yml

+11
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ jobs:
6060
type: esp32
6161
- fqbn: arduino:mbed_nano:nanorp2040connect
6262
type: nina
63+
- fqbn: arduino:mbed_nicla:nicla_vision
64+
type: mbed_nicla
6365

6466
# make board type-specific customizations to the matrix jobs
6567
include:
@@ -141,6 +143,15 @@ jobs:
141143
- name: Arduino_Portenta_OTA
142144
sketch-paths: |
143145
- examples/utility/Provisioning
146+
- board:
147+
type: mbed_nicla
148+
platforms: |
149+
# Install Arduino mbed-Enabled Boards via Boards Manager for the toolchain
150+
- name: arduino:mbed_nicla
151+
libraries: |
152+
- name: Arduino_Portenta_OTA
153+
sketch-paths: |
154+
- examples/utility/Provisioning
144155
# ESP8266 boards
145156
- board:
146157
type: esp8266

Diff for: library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ sentence=This library allows to connect to the Arduino IoT Cloud service.
66
paragraph=It provides a ConnectionManager to handle connection/disconnection, property-change updates and events callbacks. The supported boards are MKRGSM, MKR1000 and WiFi101.
77
category=Communication
88
url=https://github.com/arduino-libraries/ArduinoIoTCloud
9-
architectures=mbed,samd,esp8266,mbed_nano,mbed_portenta
9+
architectures=mbed,samd,esp8266,mbed_nano,mbed_portenta,mbed_nicla
1010
includes=ArduinoIoTCloud.h
1111
depends=Arduino_ConnectionHandler,Arduino_DebugUtils,ArduinoMqttClient,ArduinoECCX08,RTCZero,Adafruit SleepyDog Library

Diff for: src/AIoTC_Config.h

+6-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
#define OTA_STORAGE_SSU (0)
103103
#endif
104104

105-
#if defined(ARDUINO_PORTENTA_H7_M7)
105+
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION)
106106
#define OTA_STORAGE_PORTENTA_QSPI (1)
107107
#else
108108
#define OTA_STORAGE_PORTENTA_QSPI (0)
@@ -121,6 +121,11 @@
121121
#define HAS_TCP
122122
#endif
123123

124+
#if defined(ARDUINO_NICLA_VISION)
125+
#define BOARD_HAS_SE050
126+
#define HAS_TCP
127+
#endif
128+
124129
#if defined(ARDUINO_AVR_UNO_WIFI_REV2) || \
125130
defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT)
126131
#define BOARD_HAS_OFFLOADED_ECCX08

Diff for: src/ArduinoIoTCloudTCP.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#include "tls/utility/CryptoUtil.h"
3939
#endif
4040

41-
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
41+
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_NICLA_VISION)
4242
# include "tls/utility/SHA256.h"
4343
# include <stm32h7xx_hal_rtc_ex.h>
4444
# include <WiFi.h>
@@ -56,7 +56,7 @@
5656
* EXTERN
5757
******************************************************************************/
5858

59-
#if defined(ARDUINO_PORTENTA_H7_M7)
59+
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION)
6060
extern RTC_HandleTypeDef RTCHandle;
6161
#endif
6262

@@ -151,7 +151,7 @@ int ArduinoIoTCloudTCP::begin(bool const enable_watchdog, String brokerAddress,
151151
#endif /* AVR */
152152

153153
#if OTA_ENABLED && !defined(__AVR__)
154-
#if defined(ARDUINO_PORTENTA_H7_M7)
154+
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION)
155155
/* The length of the application can be retrieved the same way it was
156156
* communicated to the bootloader, that is by writing to the non-volatile
157157
* storage registers of the RTC.
@@ -288,7 +288,7 @@ int ArduinoIoTCloudTCP::begin(bool const enable_watchdog, String brokerAddress,
288288
}
289289
#endif /* OTA_STORAGE_SNU */
290290

291-
#if defined(ARDUINO_NANO_RP2040_CONNECT)
291+
#if defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_NICLA_VISION)
292292
_ota_cap = true;
293293
#endif
294294

@@ -826,7 +826,7 @@ void ArduinoIoTCloudTCP::onOTARequest()
826826
_ota_error = rp2040_connect_onOTARequest(_ota_url.c_str());
827827
#endif
828828

829-
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
829+
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_NICLA_VISION)
830830
_ota_error = portenta_h7_onOTARequest(_ota_url.c_str());
831831
#endif
832832
}

Diff for: src/utility/ota/OTA-portenta-h7.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
a commercial license, send an email to [email protected].
1616
*/
1717

18-
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
18+
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_NICLA_VISION)
1919

2020
/******************************************************************************
2121
* INCLUDE
@@ -87,4 +87,4 @@ int portenta_h7_onOTARequest(char const * ota_url)
8787
NVIC_SystemReset();
8888
}
8989

90-
#endif /* defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) */
90+
#endif /* defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_NICLA_VISION) */

Diff for: src/utility/ota/OTA.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ int samd_onOTARequest(char const * ota_url);
6262
int rp2040_connect_onOTARequest(char const * ota_url);
6363
#endif
6464

65-
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
65+
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_NICLA_VISION)
6666
int portenta_h7_onOTARequest(char const * ota_url);
6767
#endif
6868

Diff for: src/utility/watchdog/Watchdog.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void mkr_nb_feed_watchdog()
9090
static void mbed_watchdog_enable()
9191
{
9292
watchdog_config_t cfg;
93-
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
93+
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_NICLA_VISION)
9494
cfg.timeout_ms = PORTENTA_H7_WATCHDOG_MAX_TIMEOUT_ms;
9595
#elif defined(ARDUINO_NANO_RP2040_CONNECT)
9696
cfg.timeout_ms = NANO_RP2040_WATCHDOG_MAX_TIMEOUT_ms;
@@ -116,7 +116,7 @@ static void mbed_watchdog_reset()
116116
void mbed_watchdog_trigger_reset()
117117
{
118118
watchdog_config_t cfg;
119-
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
119+
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_NICLA_VISION)
120120
cfg.timeout_ms = 1;
121121
#elif defined(ARDUINO_NANO_RP2040_CONNECT)
122122
cfg.timeout_ms = 1;

0 commit comments

Comments
 (0)