Skip to content

Commit c3545ef

Browse files
committed
build env update for -S3 without serial-to-USB chip
small -S3 like Adafruit "QT Py ESP32-C3" seems to need USBCDC.
1 parent 4308a7c commit c3545ef

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

platformio.ini

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# ------------------------------------------------------------------------------
1111

1212
# Release / CI binaries
13-
default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, esp32dev, esp32_eth, esp32s2_saola, esp32c3
13+
default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, esp32dev, esp32_eth, esp32s2_saola, esp32c3, esp32s3dev_8MB
1414

1515
# Build everything
1616
; default_envs = esp32dev, esp8285_4CH_MagicHome, codm-controller-0.6-rev2, codm-controller-0.6, esp32s2_saola, d1_mini_5CH_Shojo_PCB, d1_mini, sp501e, nodemcuv2, esp32_eth, anavi_miracle_controller, esp07, esp01_1m_full, m5atom, h803wf, d1_mini_ota, heltec_wifi_kit_8, esp8285_H801, d1_mini_debug, wemos_shield_esp32, elekstube_ips
@@ -395,13 +395,18 @@ lib_deps = ${esp32c3.lib_deps}
395395
board = esp32-s3-devkitc-1
396396
397397
platform_packages =
398-
upload_speed = 921600
398+
upload_speed = 921600 ; or 460800
399399
build_unflags = ${common.build_unflags}
400-
build_flags = ${common.build_flags} ${esp32s3.build_flags} -D CONFIG_LITTLEFS_FOR_IDF_3_2 -D WLED_WATCHDOG_TIMEOUT=0 -D ARDUINO_USB_MODE=1 -D ARDUINO_USB_CDC_ON_BOOT=0 -D ARDUINO_USB_MSC_ON_BOOT=0
400+
build_flags = ${common.build_flags} ${esp32s3.build_flags}
401+
-D CONFIG_LITTLEFS_FOR_IDF_3_2 -D WLED_WATCHDOG_TIMEOUT=0
402+
-D ARDUINO_USB_CDC_ON_BOOT=0 -D ARDUINO_USB_MSC_ON_BOOT=0 -D ARDUINO_DFU_ON_BOOT=0 -D ARDUINO_USB_MODE=1 ;; for boards with serial-to-USB chip
403+
;-D ARDUINO_USB_CDC_ON_BOOT=1 -D ARDUINO_USB_MSC_ON_BOOT=0 -D ARDUINO_DFU_ON_BOOT=0 ; -D ARDUINO_USB_MODE=0 ;; for boards with USB-OTG connector only (USBCDC or "TinyUSB")
404+
-D WLED_DEBUG
401405
lib_deps = ${esp32s3.lib_deps}
402406
board_build.partitions = tools/WLED_ESP32_8MB.csv
403407
board_build.f_flash = 80000000L
404408
board_build.flash_mode = qio
409+
; board_build.flash_mode = dio ;; try this if you have problems at startup
405410
monitor_filters = esp32_exception_decoder
406411

407412
[env:esp32s3dev_8MB_PSRAM]
@@ -414,8 +419,8 @@ platform_packages =
414419
upload_speed = 921600
415420
build_unflags = ${common.build_unflags}
416421
build_flags = ${common.build_flags} ${esp32s3.build_flags}
417-
-D CONFIG_LITTLEFS_FOR_IDF_3_2 -D WLED_WATCHDOG_TIMEOUT=0 -D ARDUINO_USB_MODE=1 -D ARDUINO_USB_MSC_ON_BOOT=0
418-
; -D ARDUINO_USB_CDC_ON_BOOT=0
422+
-D CONFIG_LITTLEFS_FOR_IDF_3_2 -D WLED_WATCHDOG_TIMEOUT=0
423+
-D ARDUINO_USB_MODE=1 -D ARDUINO_USB_MSC_ON_BOOT=0 ; -D ARDUINO_USB_CDC_ON_BOOT=0
419424
; -D WLED_RELEASE_NAME=ESP32-S3_PSRAM
420425
-D WLED_USE_PSRAM -DBOARD_HAS_PSRAM ; tells WLED that PSRAM shall be used
421426
lib_deps = ${esp32s3.lib_deps}

wled00/wled.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ void WLED::setup()
269269

270270
Serial.begin(115200);
271271
Serial.setTimeout(50);
272-
#if defined(WLED_DEBUG) && (defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3))
272+
#if defined(WLED_DEBUG) && defined(ARDUINO_ARCH_ESP32) && (defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3) || ARDUINO_USB_CDC_ON_BOOT)
273273
delay(2500); // allow CDC USB serial to initialise
274274
#endif
275275
DEBUG_PRINTLN();

0 commit comments

Comments
 (0)