diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index c13ec6432..79fd6afad 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -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< 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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/src/Wippersnapper.cpp b/src/Wippersnapper.cpp index 5a189241c..72f77fa04 100644 --- a/src/Wippersnapper.cpp +++ b/src/Wippersnapper.cpp @@ -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); diff --git a/src/Wippersnapper_Boards.h b/src/Wippersnapper_Boards.h index 0c9363b7f..a456c2fc0 100644 --- a/src/Wippersnapper_Boards.h +++ b/src/Wippersnapper_Boards.h @@ -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 diff --git a/src/network_interfaces/Wippersnapper_ESP32.h b/src/network_interfaces/Wippersnapper_ESP32.h index dc251fe3c..ad6557ad7 100644 --- a/src/network_interfaces/Wippersnapper_ESP32.h +++ b/src/network_interfaces/Wippersnapper_ESP32.h @@ -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); + } } } diff --git a/src/provisioning/littlefs/WipperSnapper_LittleFS.cpp b/src/provisioning/littlefs/WipperSnapper_LittleFS.cpp index f07b46f38..5c58b8b22 100644 --- a/src/provisioning/littlefs/WipperSnapper_LittleFS.cpp +++ b/src/provisioning/littlefs/WipperSnapper_LittleFS.cpp @@ -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" /**************************************************************************/