Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
1bd7427
Add ESP32-C5 DevKitC-1
tyeth May 24, 2025
8813764
tweaks
tyeth Jun 20, 2025
3e921e7
ignore wifi nina fork
tyeth Nov 6, 2025
7cefcf3
Add ESP32-C5, bump ESP32 to 3.3.3
tyeth Nov 6, 2025
cdcd90b
Add ESP32-C5 build target
tyeth Nov 6, 2025
1969fcb
Add debug target for ESP32-C5
tyeth Nov 6, 2025
f3ecc12
Add ESP32-C5 to supported boards list
tyeth Nov 6, 2025
94130b1
Correct BOARD_ID for ESP32-C5 DevKitC-1 N8R4
tyeth Nov 6, 2025
04d0642
Correct board target name to match CI-Arduino
tyeth Nov 6, 2025
564a014
Strip "espressif_" prefix from board json target names
tyeth Nov 6, 2025
325d63b
WIP: Swap to WIP boards branch
tyeth Nov 6, 2025
08990f6
Use latest esptool for C5
tyeth Nov 6, 2025
70b0023
clang format
tyeth Nov 6, 2025
2c2755a
Correct bootloader offset for C5
tyeth Nov 6, 2025
da343ff
Update CI job for C5 (dump merged bin)
tyeth Nov 6, 2025
37e8f30
clang
tyeth Nov 6, 2025
48c5acb
Drop boot0 from non-tinyusb targets, use "keep" for flash args
tyeth Nov 6, 2025
a70e176
CI tidy
tyeth Nov 6, 2025
dd8a7e0
Bump CI to ESP core 3.3.3
tyeth Nov 6, 2025
ed67e3e
Use modern esptool command
tyeth Nov 7, 2025
d85a868
Bump Arduino-ESP32 to 3.3.3 in platformIO.ini
tyeth Nov 7, 2025
31cc92e
Mention URL+Port if non-standard. Fix local SSL/TLS MQTT testing
tyeth Nov 10, 2025
2b5de43
clang format
tyeth Nov 11, 2025
8d7510a
Explain bin files from arduino-cli
tyeth Nov 12, 2025
d959251
Switch back to main CI branch
tyeth Nov 12, 2025
2d13933
Switch back to main boards branch
tyeth Nov 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 22 additions & 12 deletions .github/workflows/build-clang-doxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ jobs:
board_name=${board_name%_noota}
# Remove 'wippersnapper_' prefix if present
board_name=${board_name#wippersnapper_}
# Remove 'espressif_' prefix if present
board_name=${board_name#espressif_}
content=$(cat ws-boards/boards/${board_name//_/-}/definition.json)
{
echo 'boardJson<<EOF'
Expand Down Expand Up @@ -367,6 +369,7 @@ jobs:
"itsybitsy_esp32",
"dfrobot_beetle_esp32c3",
"wippersnapper_qtpy_esp32c3",
"espressif_esp32c5_devkitc_1_n8r4",
"wippersnapper_feather_esp32c6"
]
include:
Expand All @@ -375,6 +378,8 @@ jobs:
arduino-platform: "dfrobot_beetle_esp32c3"
- offset: "0x0"
arduino-platform: "wippersnapper_qtpy_esp32c3"
- offset: "0x2000"
arduino-platform: "espressif_esp32c5_devkitc_1_n8r4"
- offset: "0x0"
arduino-platform: "wippersnapper_feather_esp32c6"
steps:
Expand Down Expand Up @@ -450,7 +455,7 @@ jobs:
mv nanopb/pb.h src/nanopb/nanopb.pb.h
- name: Install Dependencies
run: |
pip install esptool==4.6
pip install esptool
- name: build ESP32 platforms
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000
- name: Check artifacts
Expand All @@ -459,6 +464,8 @@ jobs:
- name: Rename build artifacts to reflect the platform name
run: |
mv examples/Wippersnapper_demo/build/*/Wippersnapper_demo.ino.bin wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.bin
## We manually merge our own binary instead of relying on the arduino-cli auto-merged one. Uncomment to diagnose differences.
# mv examples/Wippersnapper_demo/build/*/Wippersnapper_demo.ino.merged.bin wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.auto-merge.bin
mv examples/Wippersnapper_demo/build/*/Wippersnapper_demo.ino.elf wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.elf
mv examples/Wippersnapper_demo/build/*/Wippersnapper_demo.ino.map wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.map
mv examples/Wippersnapper_demo/build/*/Wippersnapper_demo.ino.bootloader.bin wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.bootloader.bin
Expand All @@ -482,6 +489,8 @@ jobs:
board_name=${board_name%_noota}
# Remove 'wippersnapper_' prefix if present
board_name=${board_name#wippersnapper_}
# Remove 'espressif_' prefix if present
board_name=${board_name#espressif_}
content=$(cat ws-boards/boards/${board_name//_/-}/definition.json)
{
echo 'boardJson<<EOF'
Expand All @@ -492,14 +501,11 @@ jobs:
run: |
echo ${{ steps.get_board_json.outputs.boardJson }}
echo ${{ fromJson(steps.get_board_json.outputs.boardJson) }}
python3 -m esptool --chip ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.chip}} merge_bin \
--flash_mode ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashMode}} \
--flash_freq ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashFreq}} \
--flash_size ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashSize}} \
python3 -m esptool --chip ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.chip}} merge-bin \
--flash-mode keep --flash-freq keep --flash-size keep \
-o wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.combined.bin \
${{ matrix.offset }} wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.bootloader.bin \
0x8000 wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.partitions.bin \
0xe000 wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.boot_app0.bin \
0x10000 wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.bin
- name: Zip build artifacts
run: |
Expand Down Expand Up @@ -905,11 +911,15 @@ jobs:
arduino-platform:
[
"wippersnapper_feather_esp32c6_debug",
"espressif_esp32c5_devkitc_1_n8r4_debug",
]
include:
- offset: "0x1000"
- offset: "0x0"
arduino-platform: "wippersnapper_feather_esp32c6_debug"
- offset: "0x2000"
arduino-platform: "espressif_esp32c5_devkitc_1_n8r4_debug"

steps:
- name: "skip if unwanted"
continue-on-error: true
Expand Down Expand Up @@ -983,7 +993,7 @@ jobs:
mv nanopb/pb.h src/nanopb/nanopb.pb.h
- name: Install Dependencies
run: |
pip3 install esptool==4.6
pip3 install esptool
- name: build ESP32 platforms
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000
- name: Check artifacts
Expand All @@ -992,6 +1002,7 @@ jobs:
- name: Rename build artifacts to reflect the platform name
run: |
mv examples/wippersnapper_debug/build/*/wippersnapper_debug.ino.bin wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.bin
mv examples/wippersnapper_debug/build/*/wippersnapper_debug.ino.merged.bin wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.auto-merge.bin
mv examples/wippersnapper_debug/build/*/wippersnapper_debug.ino.elf wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.elf
mv examples/wippersnapper_debug/build/*/wippersnapper_debug.ino.map wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.map
mv examples/wippersnapper_debug/build/*/wippersnapper_debug.ino.bootloader.bin wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.bootloader.bin
Expand All @@ -1017,6 +1028,8 @@ jobs:
board_name=${board_name%_debug}
# Remove 'wippersnapper_' prefix if present
board_name=${board_name#wippersnapper_}
# Remove 'espressif_' prefix if present
board_name=${board_name#espressif_}
content=$(cat ws-boards/boards/${board_name//_/-}/definition.json)
{
echo 'boardJson<<EOF'
Expand All @@ -1027,14 +1040,11 @@ jobs:
run: |
echo ${{ steps.get_board_json.outputs.boardJson }}
echo ${{ fromJson(steps.get_board_json.outputs.boardJson) }}
python3 -m esptool --chip ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.chip}} merge_bin \
--flash_mode ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashMode}} \
--flash_freq ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashFreq}} \
--flash_size ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashSize}} \
python3 -m esptool --chip ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.chip}} merge-bin \
--flash-mode keep --flash-freq keep --flash-size keep \
-o wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.combined.bin \
${{ matrix.offset }} wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.bootloader.bin \
0x8000 wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.partitions.bin \
0xe000 wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.boot_app0.bin \
0x10000 wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.bin
- name: Zip build artifacts
run: |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ You will need a **free** [Adafruit IO](https://io.adafruit.com) account to use W

|Platform| MCU(s) |
|--|--|
|[ESP32-x](https://github.com/espressif/arduino-esp32)| ESP32, ESP32-Sx, ESP32-C3, ESP32-C6 |
|[ESP32-x](https://github.com/espressif/arduino-esp32)| ESP32, ESP32-Sx, ESP32-C3, ESP32-C5, ESP32-C6 |
|[ESP8266](https://github.com/esp8266/Arduino)| ESP8266 |
|[RP2040](https://github.com/earlephilhower/arduino-pico)| RP2040 MCU w/WiFi (i.e: Pico W) |
|[RP2350](https://github.com/earlephilhower/arduino-pico)| RP2350 MCU w/WiFi (i.e: Pico 2W) |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

78 changes: 65 additions & 13 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,16 @@ lib_deps =

; Common build environment for ESP32 platform
[common:esp32]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/53.03.13/platform-espressif32.zip
;;Funhouse uses 3.0.7 of arduino-esp32 for now:
; platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.07/platform-espressif32.zip
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.33/platform-espressif32.zip
; This is needed for occasional new features and bug fixes
; platform = https://github.com/pioarduino/platform-espressif32#develop
lib_ignore = WiFiNINA, WiFi101, OneWire
lib_ignore = WiFiNINA, WiFiNINA_-_Adafruit_Fork, WiFi101, OneWire
monitor_filters = esp32_exception_decoder, time

; Common build environment for ESP8266 platform
[common:esp8266]
platform = espressif8266
lib_ignore = WiFiNINA, WiFi101, Adafruit TinyUSB Library, OneWire
lib_ignore = WiFiNINA, WiFiNINA_-_Adafruit_Fork, WiFi101, Adafruit TinyUSB Library, OneWire

; Common build environment for Atmel/Microchip SAMDx platform
[common:atsamd]
Expand All @@ -132,8 +130,10 @@ platform_packages = framework-arduinopico@https://github.com/earlephilhower/ardu
framework = arduino
board_build.core = earlephilhower
board_build.filesystem_size = 0.5m
lib_ignore = WiFiNINA, WiFi101, Adafruit Zero DMA Library, OneWire
lib_compat_mode = soft ; can be stricter once pio detects SleepyDog on RP2040
build_flags = -DUSE_TINYUSB
; Once https://github.com/platformio/platformio-core > 6.1.11 these can be removed
lib_ignore = WiFiNINA, WiFiNINA_-_Adafruit_Fork, WiFi101, Adafruit Zero DMA Library, OneWire
lib_compat_mode = soft ; can be strict once pio detects SleepyDog on RP2040


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Individual Board Definitions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand All @@ -148,7 +148,6 @@ build_flags = -DARDUINO_FEATHER_ESP32
board_build.filesystem = littlefs
board_build.partitions = min_spiffs.csv


; Adafruit ESP32 Feather V2
[env:featheresp32v2]
extends = common:esp32
Expand All @@ -175,6 +174,33 @@ build_flags =
board_build.filesystem = littlefs
board_build.partitions = min_spiffs.csv

; Espressif ESP32-C5 8MB FLASH 2MB PSRAM ESP32-C5-DevKitC-1
[env:espressif_esp32-c5-devkitc-1-n8r4]
extends = common:esp32
board = esp32-c5-devkitc1-n8r4
build_type = debug
; debug_tool = esp-builtin
; upload_protocol = esp-builtin
; debug_init_break = tbreak setup
board_build.f_flash = 80000000L
board_build.flash_size = 8MB
board_build.flash_mode = qio
board_build.boot_mode = dio
board_build.f_cpu = 240000000L
build_flags =
-DWS_ESPRESSIF_ESP32C5_DEVKITC_1_N8R4
-DARDUINO_ESP32C5_DEV
-DDEBUG=1
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1
-DESP_LOG_LEVEL=5
-DARDUINO_LOG_LEVEL=5
-DCORE_DEBUG_LEVEL=5
-DBOARD_HAS_PSRAM
; -DMQTT_DEBUG=1
board_build.filesystem = littlefs
board_build.partitions = min_spiffs.csv

; Espressif ESP32-C6 4MB NO PSRAM esp32-c6-devkitm-1
[env:espressif_esp32-c6-devkitm-1]
extends = common:esp32
Expand All @@ -183,7 +209,6 @@ build_type = debug
build_flags =
-DARDUINO_ESPRESSIF_ESP32C6_DEVKITM_1
-DARDUINO_ADAFRUIT_FEATHER_ESP32C6
-DNDEBUG=1
-DDEBUG=1
-DESP_LOG_LEVEL=5
-DARDUINO_CORE_DEBUG_LEVEL=5
Expand All @@ -194,6 +219,8 @@ build_flags =
board_build.filesystem = littlefs
board_build.partitions = min_spiffs.csv



; Adafruit Feather ESP32-S2
[env:featheresp32s2]
extends = common:esp32
Expand Down Expand Up @@ -297,6 +324,35 @@ build_flags = -DARDUINO_FUNHOUSE -DBOARD_HAS_PSRAM
board_build.partitions = tinyuf2-partitions-4MB-noota.csv
extra_scripts = pre:rename_usb_config.py

; Adafruit Funhouse ESP32-S2
[env:adafruit_funhouse_esp32s2_debug]
extends = common:esp32
board = adafruit_funhouse_esp32s2
;lib_extra_dirs =
build_type = debug
build_flags =
-DARDUINO_FUNHOUSE
-DBOARD_HAS_PSRAM
-DCFG_TUSB_DEBUG=1
-DDEBUG=1
-DESP_LOG_LEVEL=ESP_LOG_VERBOSE
-DARDUINO_CORE_DEBUG_LEVEL=5
-DCORE_DEBUG_LEVEL=5
-DARDUHAL_LOG_LEVEL=5
; USB Configuration
; Uncomment if USB CDC on boot is needed
; -DARDUINO_USB_CDC_ON_BOOT=1
; -DARDUINO_USB_MODE=0 ; 0 for CDC + TinyUSB, 1 for Hardware CDC + JTAG
; LVGL Debugging
-DLV_USE_DEBUG=1
-DLV_USE_LOG=1
-DLV_LOG_PRINTF=1
-DLV_LOG_COLOR=1
-DLV_LOG_LEVEL=LV_LOG_LEVEL_TRACE
;set partition to tinyuf2-partitions-4MB.csv as of idf 5.1
board_build.partitions = tinyuf2-partitions-4MB-noota.csv
extra_scripts = pre:rename_usb_config.py

; Adafruit QT Py ESP32 Pico
[env:adafruit_qtpy_esp32]
extends = common:esp32
Expand Down Expand Up @@ -374,7 +430,6 @@ build_flags =
-DARDUINO_ADAFRUIT_QTPY_ESP32S3_N4R2
-DBOARD_HAS_PSRAM
-DCFG_TUSB_DEBUG=1
-DNDEBUG=1
-DDEBUG=1
-DESP_LOG_LEVEL=5
-DARDUINO_CORE_DEBUG_LEVEL=5
Expand Down Expand Up @@ -495,7 +550,6 @@ build_flags = -DUSE_TINYUSB
-DARDUINO_USB_CDC_ON_BOOT=1
-DCFG_TUSB_DEBUG=1
-DDEBUG=1
-DNDEBUG=1
-DUSE_AIRLIFT=1
-g
; -DUSBCON
Expand Down Expand Up @@ -563,7 +617,6 @@ build_flags =
-DDEBUG_RP2040_SPI
-DDEBUG_RP2040_CORE
-DDEBUG_RP2040_WIFI
-DNDEBUG
-DLWIP_DEBUG=1
-DDEBUG_RP2040_PORT=Serial1
-DDEBUG_RP2040_UART_1
Expand Down Expand Up @@ -619,7 +672,6 @@ build_flags =
; -DDEBUG_RP2040_SPI
; -DDEBUG_RP2040_CORE
; -DDEBUG_RP2040_WIFI
; -DNDEBUG
; -DLWIP_DEBUG
; -DDEBUG_RP2040_PORT=Serial1
; -DDEBUG_RP2040_UART_1
Expand Down
6 changes: 6 additions & 0 deletions src/Wippersnapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2757,6 +2757,12 @@ void printDeviceInfo() {
WS_DEBUG_PRINTLN(BOARD_ID);
WS_DEBUG_PRINT("Adafruit.io User: ");
WS_DEBUG_PRINTLN(WS._config.aio_user);
if (strncmp(WS._config.aio_url, "io.adafruit.com", 16) != 0) {
WS_DEBUG_PRINT("Adafruit.io URL: ");
WS_DEBUG_PRINTLN(WS._config.aio_url);
WS_DEBUG_PRINT("Adafruit.io Port: ");
WS_DEBUG_PRINTLN(WS._config.io_port);
}
WS_DEBUG_PRINT("WiFi Network: ");
WS_DEBUG_PRINTLN(WS._config.network.ssid);

Expand Down
10 changes: 10 additions & 0 deletions src/Wippersnapper_Boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,16 @@
#define USE_STATUS_NEOPIXEL
#define STATUS_NEOPIXEL_PIN PIN_NEOPIXEL
#define STATUS_NEOPIXEL_NUM 1
#elif defined(ARDUINO_ESP32C5_DEV)
#define BOARD_ID "esp32c5-devkitc-1-n8r4"
#define USE_LITTLEFS
#define USE_STATUS_NEOPIXEL
#define STATUS_NEOPIXEL_PIN PIN_RGB_LED
// PIN_RGB_LED = 27, or GPIO_NUM+27 if using RGBwrite()
#define STATUS_NEOPIXEL_NUM 1
#ifdef BOARD_HAS_PSRAM
#define USE_PSRAM ///< Board has PSRAM, use it for dynamic memory allocation
#endif
#elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32_V2)
#define BOARD_ID "feather-esp32-v2"
#define USE_LITTLEFS
Expand Down
20 changes: 14 additions & 6 deletions src/network_interfaces/Wippersnapper_ESP32.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,20 @@ class Wippersnapper_ESP32 : public Wippersnapper {
_mqtt_client_secure, WS._config.aio_url, WS._config.io_port, clientID,
WS._config.aio_user, WS._config.aio_key);
} else {
// Insecure connections require a NetworkClient object rather than a
// NetworkClientSecure object
_mqtt_client_insecure = new NetworkClient();
WS._mqtt = new Adafruit_MQTT_Client(
_mqtt_client_insecure, WS._config.aio_url, WS._config.io_port,
clientID, WS._config.aio_user, WS._config.aio_key);
if (WS._config.io_port == 8883) {
_mqtt_client_secure = new NetworkClientSecure();
_mqtt_client_secure->setInsecure();
WS._mqtt = new Adafruit_MQTT_Client(
_mqtt_client_secure, WS._config.aio_url, WS._config.io_port,
clientID, WS._config.aio_user, WS._config.aio_key);
} else {
// Insecure connections require a NetworkClient object rather than a
// NetworkClientSecure object
_mqtt_client_insecure = new NetworkClient();
WS._mqtt = new Adafruit_MQTT_Client(
_mqtt_client_insecure, WS._config.aio_url, WS._config.io_port,
clientID, WS._config.aio_user, WS._config.aio_key);
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/provisioning/littlefs/WipperSnapper_LittleFS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
defined(ARDUINO_SPARKLEMOTIONMINI_ESP32) || \
defined(ARDUINO_SPARKLEMOTIONSTICK_ESP32) || \
defined(ARDUINO_ADAFRUIT_QTPY_ESP32C3) || \
defined(ARDUINO_ADAFRUIT_FEATHER_ESP32C6)
defined(ARDUINO_ADAFRUIT_FEATHER_ESP32C6) || defined(ARDUINO_ESP32C5_DEV)
#include "WipperSnapper_LittleFS.h"

/**************************************************************************/
Expand Down
Loading