Skip to content

Commit 21816d0

Browse files
committed
additional Arduino polish
1 parent d2302c8 commit 21816d0

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

IDE/ARDUINO/wolfssl-arduino.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,11 @@ if [ "$THIS_DIR" = "ARDUINO" ]; then
262262
# Copy examples
263263
mkdir -p ".${ROOT_SRC_DIR}"/examples
264264

265+
EXAMPLES_DIR_REAL_PATH=$(realpath ".${EXAMPLES_DIR}")
266+
echo "Source WOLFSSL_EXAMPLES_ROOT=$WOLFSSL_EXAMPLES_ROOT"
267+
echo "Destination EXAMPLES_DIR=.${EXAMPLES_DIR}"
268+
echo "EXAMPLES_DIR_REAL_PATH=${EXAMPLES_DIR_REAL_PATH}"
269+
265270
if [ -n "$WOLFSSL_EXAMPLES_ROOT" ]; then
266271
echo "Copy template example...."
267272
mkdir -p ".${EXAMPLES_DIR}"/template/wolfssl_library/src
@@ -294,6 +299,9 @@ if [ "$THIS_DIR" = "ARDUINO" ]; then
294299
else
295300
NO_ARDUINO_EXAMPLES=1
296301
fi
302+
echo "Examples copied to .${EXAMPLES_DIR}"
303+
echo "ls ${EXAMPLES_DIR_REAL_PATH}"
304+
ls "${EXAMPLES_DIR_REAL_PATH}"
297305
else
298306
echo "ERROR: You must be in the IDE/ARDUINO directory to run this script"
299307
exit 1

examples/configs/user_settings_arduino.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,13 @@
9292
#elif defined(WOLFSSL_SERVER_EXAMPLE)
9393
#define NO_WOLFSSL_CLIENT
9494
#elif defined(WOLFSSL_TEMPLATE_EXAMPLE)
95+
#define NO_TLS
96+
#define WOLFCRYPT_ONLY
9597
#define NO_WOLFSSL_SERVER
9698
#define NO_WOLFSSL_CLIENT
9799
#elif defined(WOLFSSL_AES_CTR_EXAMPLE)
100+
#define NO_TLS
101+
#define WOLFCRYPT_ONLY
98102
#define NO_WOLFSSL_SERVER
99103
#define NO_WOLFSSL_CLIENT
100104
#define WOLFSSL_AES

wolfssl/wolfcrypt/settings.h

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,24 @@
314314
#define WOLFSSL_USER_SETTINGS
315315
#endif /* WOLFSSL_USER_SETTINGS */
316316

317-
/* board-specific */
317+
/* Board-specific network capability check */
318+
#if defined(ARDUINO_SAMD_MKRWIFI1010) || \
319+
defined(ARDUINO_SAMD_NANO_33_IOT) || \
320+
defined(ARDUINO_NANO_RP2040_CONNECT) || \
321+
defined(ARDUINO_UNOWIFIR4) || \
322+
defined(ARDUINO_ESP32_DEV) || \
323+
defined(ARDUINO_ESP8266_ESP01) || \
324+
defined(ARDUINO_TEENSY40) || \
325+
defined(ARDUINO_TEENSY41) || \
326+
defined(ESP32) || defined(ESP8266)
327+
/* Known to have networking available. */
328+
#else
329+
#define NO_WOLFSSL_CLIENT
330+
#define NO_WOLFSSL_SERVER
331+
#define WOLFCRYPT_ONLY
332+
#define NO_TLS
333+
#endif
334+
318335
#if defined(__AVR__)
319336
#define WOLFSSL_USER_IO
320337
#define WOLFSSL_NO_SOCK

0 commit comments

Comments
 (0)