From cdf1f80a81b7f83fb20d903b1ba78cf16718c3f1 Mon Sep 17 00:00:00 2001 From: Will <71540407+Will-wastelander@users.noreply.github.com> Date: Fri, 29 May 2026 20:55:36 -0700 Subject: [PATCH 1/9] Add support for Waveshare S3 Matrix Driver board https://www.waveshare.com/esp32-s3-rgb-matrix.htm https://docs.waveshare.com/ESP32-S3-RGB-Matrix --- wled00/bus_manager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wled00/bus_manager.cpp b/wled00/bus_manager.cpp index 8b9825c4a5..af3f419c91 100644 --- a/wled00/bus_manager.cpp +++ b/wled00/bus_manager.cpp @@ -881,6 +881,12 @@ BusHub75Matrix::BusHub75Matrix(const BusConfig &bc) : Bus(bc.type, bc.start, bc. // HUB75_I2S_CFG::i2s_pins _pins={R1_PIN, G1_PIN, B1_PIN, R2_PIN, G2_PIN, B2_PIN, A_PIN, B_PIN, C_PIN, D_PIN, E_PIN, LAT_PIN, OE_PIN, CLK_PIN}; mxconfig.gpio = { 1, 5, 6, 7, 13, 9, 16, 48, 47, 21, 38, 8, 4, 18 }; +#elif defined(WAVESHARE_S3_PINOUT) + DEBUGBUS_PRINTLN("MatrixPanel_I2S_DMA - Waveshare S3 with PSRAM, Waveshare pinout"); + + // HUB75_I2S_CFG::i2s_pins _pins={R1_PIN, G1_PIN, B1_PIN, R2_PIN, G2_PIN, B2_PIN, A_PIN, B_PIN, C_PIN, D_PIN, E_PIN, LAT_PIN, OE_PIN, CLK_PIN}; + mxconfig.gpio = {4, 5, 6, 7, 15, 16, 18, 8, 3, 42, 9, 40, 2, 41}; + #else DEBUGBUS_PRINTLN("MatrixPanel_I2S_DMA - S3 with PSRAM"); // HUB75_I2S_CFG::i2s_pins _pins={R1_PIN, G1_PIN, B1_PIN, R2_PIN, G2_PIN, B2_PIN, A_PIN, B_PIN, C_PIN, D_PIN, E_PIN, LAT_PIN, OE_PIN, CLK_PIN}; From 73898ddf5dfeb4b1cf943f27eee602ebc9e3ba50 Mon Sep 17 00:00:00 2001 From: Will <71540407+Will-wastelander@users.noreply.github.com> Date: Fri, 29 May 2026 21:00:20 -0700 Subject: [PATCH 2/9] Add new environment for Waveshare ESP32-S3 hub75 https://www.waveshare.com/esp32-s3-rgb-matrix.htm https://docs.waveshare.com/ESP32-S3-RGB-Matrix --- platformio.ini | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/platformio.ini b/platformio.ini index f08e7c151f..86f10c18ae 100644 --- a/platformio.ini +++ b/platformio.ini @@ -649,6 +649,35 @@ board_build.partitions = tools/WLED_ESP32_32MB.csv board_upload.flash_size = 32MB board_upload.maximum_size = 33554432 +[env:waveshare_esp32s3_32MB_hub75] +extends = env:esp32S3_wroom2_32MB +board_build.partitions = ${esp32.extreme_partitions} +board_build.f_flash = 80000000L +board_upload.flash_size = 32MB +monitor_filters = esp32_exception_decoder +upload_speed = 115200 +upload_port = COM12 +build_unflags = ${common.build_unflags} +build_flags = ${common.build_flags} ${esp32s3.build_flags} -D WLED_RELEASE_NAME=\"ESP32-S3_Waveshave_Matrix\" + -D WLED_ENABLE_HUB75MATRIX + -D NO_GFX + -D NO_FAST_FUNCTIONS + -D NO_CIE1931 + -D S3_LCD_DIV_NUM=20 + -DARDUINO_USB_CDC_ON_BOOT=1 + -DBOARD_HAS_PSRAM + -DLOLIN_WIFI_FIX ; seems to work much better with this + -D WLED_WATCHDOG_TIMEOUT=0 + -D WAVESHARE_S3_PINOUT +; -D WLED_USE_SD_SPI +; -D SD_PRINT_HOME_DIR +; -D WLED_DEBUG + -D USERMOD_AUDIOREACTIVE + -D SR_DMTYPE=0 -D I2S_SDPIN=-1 -D I2S_CKPIN=-1 -D I2S_WSPIN=-1 -D MCLK_PIN=-1 ;; Disable to prevent pin clash +lib_deps = ${esp32s3.lib_deps} + ${esp32.AR_lib_deps} + ${hub75.lib_deps} + [env:esp32s3_4M_qspi] ;; ESP32-S3, with 4MB FLASH and <= 4MB PSRAM (memory_type: qio_qspi) extends = esp32s3 From bd8a16a6f39b0c725f27de2b0cc2737dafec89d9 Mon Sep 17 00:00:00 2001 From: Will <71540407+Will-wastelander@users.noreply.github.com> Date: Fri, 29 May 2026 21:14:18 -0700 Subject: [PATCH 3/9] Update upload port and build flags in platformio.ini --- platformio.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index 86f10c18ae..09443827cc 100644 --- a/platformio.ini +++ b/platformio.ini @@ -656,9 +656,9 @@ board_build.f_flash = 80000000L board_upload.flash_size = 32MB monitor_filters = esp32_exception_decoder upload_speed = 115200 -upload_port = COM12 +upload_port = COM1: build_unflags = ${common.build_unflags} -build_flags = ${common.build_flags} ${esp32s3.build_flags} -D WLED_RELEASE_NAME=\"ESP32-S3_Waveshave_Matrix\" +build_flags = ${common.build_flags} ${esp32s3.build_flags} -D WLED_RELEASE_NAME=\"ESP32-S3_Waveshare_Matrix\" -D WLED_ENABLE_HUB75MATRIX -D NO_GFX -D NO_FAST_FUNCTIONS From fd162cee4363ec8ee231ba91794403930b499409 Mon Sep 17 00:00:00 2001 From: Will <71540407+Will-wastelander@users.noreply.github.com> Date: Sat, 30 May 2026 08:28:34 -0700 Subject: [PATCH 4/9] Modify build flags in platformio.ini for ESP32-S3 Updated build flags for the waveshare_esp32s3_32MB_hub75 environment, removing some flags and adding new ones. --- platformio.ini | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/platformio.ini b/platformio.ini index 09443827cc..0fab35854b 100644 --- a/platformio.ini +++ b/platformio.ini @@ -651,31 +651,20 @@ board_upload.maximum_size = 33554432 [env:waveshare_esp32s3_32MB_hub75] extends = env:esp32S3_wroom2_32MB -board_build.partitions = ${esp32.extreme_partitions} board_build.f_flash = 80000000L -board_upload.flash_size = 32MB monitor_filters = esp32_exception_decoder upload_speed = 115200 upload_port = COM1: build_unflags = ${common.build_unflags} -build_flags = ${common.build_flags} ${esp32s3.build_flags} -D WLED_RELEASE_NAME=\"ESP32-S3_Waveshare_Matrix\" - -D WLED_ENABLE_HUB75MATRIX - -D NO_GFX +build_flags = ${common.build_flags} ${esp32s3.build_flags} ${hub75.build_flags} ${hub75.s3_build_flags} ${hub75.i2s_disable_flags} + -D WLED_RELEASE_NAME=\"ESP32-S3_Waveshare_Matrix\" -D NO_FAST_FUNCTIONS -D NO_CIE1931 - -D S3_LCD_DIV_NUM=20 - -DARDUINO_USB_CDC_ON_BOOT=1 - -DBOARD_HAS_PSRAM - -DLOLIN_WIFI_FIX ; seems to work much better with this - -D WLED_WATCHDOG_TIMEOUT=0 -D WAVESHARE_S3_PINOUT ; -D WLED_USE_SD_SPI ; -D SD_PRINT_HOME_DIR ; -D WLED_DEBUG - -D USERMOD_AUDIOREACTIVE - -D SR_DMTYPE=0 -D I2S_SDPIN=-1 -D I2S_CKPIN=-1 -D I2S_WSPIN=-1 -D MCLK_PIN=-1 ;; Disable to prevent pin clash lib_deps = ${esp32s3.lib_deps} - ${esp32.AR_lib_deps} ${hub75.lib_deps} [env:esp32s3_4M_qspi] From c399d712c96ee7f8715893d2d760b5b3e406986e Mon Sep 17 00:00:00 2001 From: Will <71540407+Will-wastelander@users.noreply.github.com> Date: Sat, 30 May 2026 12:19:10 -0700 Subject: [PATCH 5/9] Remove unused build flags from platformio.ini Removed flags for fast functions and CIE1931 from build configuration. --- platformio.ini | 2 -- 1 file changed, 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index 0fab35854b..5dbdf04e9c 100644 --- a/platformio.ini +++ b/platformio.ini @@ -658,8 +658,6 @@ upload_port = COM1: build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32s3.build_flags} ${hub75.build_flags} ${hub75.s3_build_flags} ${hub75.i2s_disable_flags} -D WLED_RELEASE_NAME=\"ESP32-S3_Waveshare_Matrix\" - -D NO_FAST_FUNCTIONS - -D NO_CIE1931 -D WAVESHARE_S3_PINOUT ; -D WLED_USE_SD_SPI ; -D SD_PRINT_HOME_DIR From d6482e99bb38b1ae70f04955a51e7c2a53733856 Mon Sep 17 00:00:00 2001 From: Will <71540407+Will-wastelander@users.noreply.github.com> Date: Sat, 30 May 2026 12:20:02 -0700 Subject: [PATCH 6/9] Remove upload settings from waveshare_esp32s3_32MB_hub75 Removed upload speed and port settings for the waveshare_esp32s3_32MB_hub75 environment. --- platformio.ini | 3 --- 1 file changed, 3 deletions(-) diff --git a/platformio.ini b/platformio.ini index 5dbdf04e9c..dcb420ae9e 100644 --- a/platformio.ini +++ b/platformio.ini @@ -651,10 +651,7 @@ board_upload.maximum_size = 33554432 [env:waveshare_esp32s3_32MB_hub75] extends = env:esp32S3_wroom2_32MB -board_build.f_flash = 80000000L monitor_filters = esp32_exception_decoder -upload_speed = 115200 -upload_port = COM1: build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32s3.build_flags} ${hub75.build_flags} ${hub75.s3_build_flags} ${hub75.i2s_disable_flags} -D WLED_RELEASE_NAME=\"ESP32-S3_Waveshare_Matrix\" From 6bd90abac7fb8443ef38d31439edb6151fcd2215 Mon Sep 17 00:00:00 2001 From: Will <71540407+Will-wastelander@users.noreply.github.com> Date: Sat, 30 May 2026 12:37:41 -0700 Subject: [PATCH 7/9] Clean up build flags in platformio.ini Removed unused build unflags. --- platformio.ini | 1 - 1 file changed, 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index dcb420ae9e..bb991fbce4 100644 --- a/platformio.ini +++ b/platformio.ini @@ -652,7 +652,6 @@ board_upload.maximum_size = 33554432 [env:waveshare_esp32s3_32MB_hub75] extends = env:esp32S3_wroom2_32MB monitor_filters = esp32_exception_decoder -build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32s3.build_flags} ${hub75.build_flags} ${hub75.s3_build_flags} ${hub75.i2s_disable_flags} -D WLED_RELEASE_NAME=\"ESP32-S3_Waveshare_Matrix\" -D WAVESHARE_S3_PINOUT From bb495f787930fd4279697aca6a8bb56718927a37 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Sat, 30 May 2026 22:02:24 +0200 Subject: [PATCH 8/9] buildenv bugfix, better release_name * un-set previous RELEASE_NAME before setting a new one * align REALEASE_NAME with naming scheme used by other HUB75 builds --- platformio.ini | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index bb991fbce4..f1dddbaf84 100644 --- a/platformio.ini +++ b/platformio.ini @@ -652,8 +652,10 @@ board_upload.maximum_size = 33554432 [env:waveshare_esp32s3_32MB_hub75] extends = env:esp32S3_wroom2_32MB monitor_filters = esp32_exception_decoder +build_unflags = ${env:esp32S3_wroom2_32MB.build_unflags} + -D WLED_RELEASE_NAME=\"ESP32-S3_WROOM-2_32MB\" ;; need to un-set the relese name before setting a new one build_flags = ${common.build_flags} ${esp32s3.build_flags} ${hub75.build_flags} ${hub75.s3_build_flags} ${hub75.i2s_disable_flags} - -D WLED_RELEASE_NAME=\"ESP32-S3_Waveshare_Matrix\" + -D WLED_RELEASE_NAME=\"ESP32-S3_Waveshare_HUB75\" -D WAVESHARE_S3_PINOUT ; -D WLED_USE_SD_SPI ; -D SD_PRINT_HOME_DIR From 82c4ce580e5683911ac7405c26fc2678350bb8e3 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Sat, 30 May 2026 22:06:00 +0200 Subject: [PATCH 9/9] move new buildenv into HUB75 section --- platformio.ini | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/platformio.ini b/platformio.ini index f1dddbaf84..579fd58a8c 100644 --- a/platformio.ini +++ b/platformio.ini @@ -649,20 +649,6 @@ board_build.partitions = tools/WLED_ESP32_32MB.csv board_upload.flash_size = 32MB board_upload.maximum_size = 33554432 -[env:waveshare_esp32s3_32MB_hub75] -extends = env:esp32S3_wroom2_32MB -monitor_filters = esp32_exception_decoder -build_unflags = ${env:esp32S3_wroom2_32MB.build_unflags} - -D WLED_RELEASE_NAME=\"ESP32-S3_WROOM-2_32MB\" ;; need to un-set the relese name before setting a new one -build_flags = ${common.build_flags} ${esp32s3.build_flags} ${hub75.build_flags} ${hub75.s3_build_flags} ${hub75.i2s_disable_flags} - -D WLED_RELEASE_NAME=\"ESP32-S3_Waveshare_HUB75\" - -D WAVESHARE_S3_PINOUT -; -D WLED_USE_SD_SPI -; -D SD_PRINT_HOME_DIR -; -D WLED_DEBUG -lib_deps = ${esp32s3.lib_deps} - ${hub75.lib_deps} - [env:esp32s3_4M_qspi] ;; ESP32-S3, with 4MB FLASH and <= 4MB PSRAM (memory_type: qio_qspi) extends = esp32s3 @@ -793,6 +779,21 @@ lib_deps = ${esp32s3.lib_deps} ${hub75.lib_deps} ;; board_build.partitions = tools/partitions-8MB_spiffs-tinyuf2.csv ;; supports adafruit UF2 bootloader +[env:waveshare_esp32s3_32MB_hub75] +;; Waveshare ESP32-S3-RGB-Matrix (memory_type: opi_opi); see https://docs.waveshare.com/ESP32-S3-RGB-Matrix +extends = env:esp32S3_wroom2_32MB +monitor_filters = esp32_exception_decoder +build_unflags = ${env:esp32S3_wroom2_32MB.build_unflags} + -D WLED_RELEASE_NAME=\"ESP32-S3_WROOM-2_32MB\" ;; need to un-set the relese name before setting a new one +build_flags = ${common.build_flags} ${esp32s3.build_flags} ${hub75.build_flags} ${hub75.s3_build_flags} ${hub75.i2s_disable_flags} + -D WLED_RELEASE_NAME=\"ESP32-S3_Waveshare_HUB75\" + -D WAVESHARE_S3_PINOUT +; -D WLED_USE_SD_SPI +; -D SD_PRINT_HOME_DIR +; -D WLED_DEBUG +lib_deps = ${esp32s3.lib_deps} + ${hub75.lib_deps} + [env:esp32s3dev_16MB_opi_hub75] ;; MOONHUB HUB75 adapter board (lilygo T7-S3 with 16MB flash and octal PSRAM) extends = env:esp32s3dev_8MB_opi