Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bus-level global buffering #3280

Merged
merged 36 commits into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
498dd76
Decouple segment led buffer from global led buffer
Aircoookie Jun 26, 2023
f6e86bf
First global buffer iteration
Aircoookie Jun 26, 2023
61ba16b
Global buffer and ABL fixes
Aircoookie Jun 26, 2023
fa9b151
Slightly more efficient buffer copy to busses
Aircoookie Jun 26, 2023
272f96b
Double buffering at bus level.
blazoncek Jun 30, 2023
858b57d
Return of local leds[]
blazoncek Jul 1, 2023
c9ef034
Build bump/fix
blazoncek Jul 2, 2023
66616e1
Some timings added.
blazoncek Jul 3, 2023
8831c76
restoreColorLossy small optimization
softhack007 Jul 4, 2023
45a0061
reverting _restaurationBri change
softhack007 Jul 5, 2023
ad825b8
Added a few debug timings.
blazoncek Jul 5, 2023
59a144b
Disable global buffer on ESP8266 by default
blazoncek Jul 5, 2023
f437fd6
Code readability.
blazoncek Jul 6, 2023
2ad3ab7
Correct scaling for peek.
blazoncek Jul 6, 2023
822298a
Merge branch 'main' into alt-buffer
Aircoookie Jul 9, 2023
6267d11
Fix compilation and ABL scaling
Aircoookie Jul 9, 2023
fa6070c
Multiple updates:
blazoncek Jul 12, 2023
4766666
Static queued segment bounds
Aircoookie Jul 13, 2023
72a72db
proper rounding of FPS
softhack007 Jul 13, 2023
5e20abd
Move segment bounds queuing to WS2812FX
Aircoookie Jul 13, 2023
57d3585
Merge branch 'main' into alt-buffer
blazoncek Jul 14, 2023
f1e1bd4
Slight optimisation in BusDigial::getPixelColor()
blazoncek Jul 14, 2023
82e01f7
Fixed ABL calculation.
blazoncek Jul 17, 2023
abfb8bb
Fix (almost good) for unbuffered ABL calculations.
blazoncek Jul 17, 2023
ebb4628
Minor correction (slider names)
softhack007 Jul 17, 2023
5ef7cd7
blur bugfix
softhack007 Jul 18, 2023
7dcbb40
Trying to solve ABL bug.
blazoncek Jul 18, 2023
5b9630c
Repaint NPB buffer on brightness updates
Aircoookie Jul 19, 2023
0cf50e8
FX Fireworks optimisation
blazoncek Jul 19, 2023
2fce15d
Restore brightness immediately after show()
Aircoookie Jul 19, 2023
8ccf349
Always repaint NPB buffer on brightness change
Aircoookie Jul 19, 2023
aa54d65
upgrade -S3/-S2/-C3 to platform 5.3.0
softhack007 Jul 20, 2023
2db966b
Improvements for -S3 with PSRAM
softhack007 Jul 20, 2023
050489d
allow Lolin Wifi Fix on -S3
softhack007 Jul 20, 2023
f8e766f
add -S3 PSRAM (qio_opi) to nightly builds
softhack007 Jul 20, 2023
c8fdf37
upgrade to FastLED 3.6.0
softhack007 Jul 20, 2023
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
42 changes: 23 additions & 19 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# CI binaries
; default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, esp32dev, esp32_eth # ESP32 variant builds are temporarily excluded from CI due to toolchain issues on the GitHub Actions Linux environment
default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, esp32dev, esp32_eth, lolin_s2_mini, esp32c3dev, esp32s3dev_8MB
default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, esp32dev, esp32_eth, lolin_s2_mini, esp32c3dev, esp32s3dev_8MB, esp32s3dev_8MB_PSRAM_opi

# Release binaries
; default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, esp32dev, esp32_eth, lolin_s2_mini, esp32c3dev, esp32s3dev_8MB
Expand Down Expand Up @@ -175,7 +175,7 @@ upload_speed = 115200
# ------------------------------------------------------------------------------
lib_compat_mode = strict
lib_deps =
fastled/FastLED @ 3.5.0
fastled/FastLED @ 3.6.0
IRremoteESP8266 @ 2.8.2
makuna/NeoPixelBus @ 2.7.5
https://github.com/Aircoookie/ESPAsyncWebServer.git @ ~2.0.7
Expand All @@ -201,7 +201,7 @@ build_flags =
-DESP8266
-DFP_IN_IROM
;-Wno-deprecated-declarations
-Wno-register ;; leaves some warnings when compiling C files: command-line option '-Wno-register' is valid for C++/ObjC++ but not for C
;-Wno-register ;; leaves some warnings when compiling C files: command-line option '-Wno-register' is valid for C++/ObjC++ but not for C
;-Dregister= # remove warnings in C++17 due to use of deprecated register keyword by the FastLED library ;; warning: this can be dangerous
-Wno-misleading-indentation
; NONOSDK22x_190703 = 2.2.2-dev(38a443e)
Expand Down Expand Up @@ -249,9 +249,8 @@ lib_deps =
;;
;; please note that you can NOT update existing ESP32 installs with a "V4" build. Also updating by OTA will not work properly.
;; You need to completely erase your device (esptool erase_flash) first, then install the "V4" build from VSCode+platformio.
platform = espressif32@5.2.0
platform = espressif32@5.3.0
platform_packages =
toolchain-riscv32-esp @ 8.4.0+2021r2-patch5 ; required for platform version < 5.3.0, remove this line when upgrading to platform >=5.3.0
build_flags = -g
-Wshadow=compatible-local ;; emit warning in case a local variable "shadows" another local one
-DARDUINO_ARCH_ESP32 -DESP32
Expand All @@ -265,9 +264,8 @@ lib_deps =

[esp32s2]
;; generic definitions for all ESP32-S2 boards
platform = espressif32@5.2.0
platform = espressif32@5.3.0
platform_packages =
toolchain-riscv32-esp @ 8.4.0+2021r2-patch5 ; required for platform version < 5.3.0, remove this line when upgrading to platform >=5.3.0
build_flags = -g
-DARDUINO_ARCH_ESP32
-DARDUINO_ARCH_ESP32S2
Expand All @@ -285,9 +283,8 @@ lib_deps =

[esp32c3]
;; generic definitions for all ESP32-C3 boards
platform = espressif32@5.2.0
platform = espressif32@5.3.0
platform_packages =
toolchain-riscv32-esp @ 8.4.0+2021r2-patch5 ; required for platform version < 5.3.0, remove this line when upgrading to platform >=5.3.0
build_flags = -g
-DARDUINO_ARCH_ESP32
-DARDUINO_ARCH_ESP32C3
Expand All @@ -304,9 +301,8 @@ lib_deps =

[esp32s3]
;; generic definitions for all ESP32-S3 boards
platform = espressif32@5.2.0
platform = espressif32@5.3.0
platform_packages =
toolchain-riscv32-esp @ 8.4.0+2021r2-patch5 ; required for platform version < 5.3.0, remove this line when upgrading to platform >=5.3.0
build_flags = -g
-DESP32
-DARDUINO_ARCH_ESP32
Expand Down Expand Up @@ -450,6 +446,7 @@ board_build.flash_mode = qio
upload_speed = 460800
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp32s2.build_flags} #-D WLED_RELEASE_NAME=S2_saola
;-DLOLIN_WIFI_FIX ;; try this in case Wifi does not work
-DARDUINO_USB_CDC_ON_BOOT=1
lib_deps = ${esp32s2.lib_deps}

Expand All @@ -462,6 +459,7 @@ board = esp32-c3-devkitm-1
board_build.partitions = tools/WLED_ESP32_4MB_1MB_FS.csv
build_flags = ${common.build_flags} ${esp32c3.build_flags} #-D WLED_RELEASE_NAME=ESP32-C3
-D WLED_WATCHDOG_TIMEOUT=0
-DLOLIN_WIFI_FIX ; seems to work much better with this
-DARDUINO_USB_CDC_ON_BOOT=1 ;; for virtual CDC USB
;-DARDUINO_USB_CDC_ON_BOOT=0 ;; for serial-to-USB chip
upload_speed = 460800
Expand All @@ -478,7 +476,7 @@ build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp32s3.build_flags}
-D CONFIG_LITTLEFS_FOR_IDF_3_2 -D WLED_WATCHDOG_TIMEOUT=0
-D ARDUINO_USB_CDC_ON_BOOT=0 ;; -D ARDUINO_USB_MODE=1 ;; for boards with serial-to-USB chip
;-D ARDUINO_USB_CDC_ON_BOOT=1 ;; -D ARDUINO_USB_MODE=0 ;; for boards with USB-OTG connector only (USBCDC or "TinyUSB")
;-D ARDUINO_USB_CDC_ON_BOOT=1 ;; -D ARDUINO_USB_MODE=1 ;; for boards with USB-OTG connector only (USBCDC or "TinyUSB")
;-D WLED_DEBUG
lib_deps = ${esp32s3.lib_deps}
board_build.partitions = tools/WLED_ESP32_8MB.csv
Expand All @@ -487,19 +485,18 @@ board_build.flash_mode = qio
; board_build.flash_mode = dio ;; try this if you have problems at startup
monitor_filters = esp32_exception_decoder

[env:esp32s3dev_8MB_PSRAM]
;; ESP32-TinyS3 development board, with 8MB FLASH and 8MB PSRAM (memory_type: qio_opi, qio_qspi, or opi_opi)
;board = um_tinys3 ; -> needs workaround from https://github.com/Aircoookie/WLED/pull/2905#issuecomment-1328049860
;board = esp32s3box ; -> error: 'esp32_adc2gpio' was not declared in this scope
board = esp32-s3-devkitc-1 ; -> compiles, but does not support PSRAM
[env:esp32s3dev_8MB_PSRAM_opi]
;; ESP32-S3 development board, with 8MB FLASH and >= 8MB PSRAM (memory_type: qio_opi)
board = esp32-s3-devkitc-1 ;; generic dev board; the next line adds PSRAM support
board_build.arduino.memory_type = qio_opi ;; use with PSRAM: 8MB or 16MB
platform = ${esp32s3.platform}
platform_packages = ${esp32s3.platform_packages}
upload_speed = 921600
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp32s3.build_flags}
-D CONFIG_LITTLEFS_FOR_IDF_3_2 -D WLED_WATCHDOG_TIMEOUT=0
;-D ARDUINO_USB_CDC_ON_BOOT=0 ;; -D ARDUINO_USB_MODE=1 ;; for boards with serial-to-USB chip
-D ARDUINO_USB_CDC_ON_BOOT=1 ;; -D ARDUINO_USB_MODE=0 ;; for boards with USB-OTG connector only (USBCDC or "TinyUSB")
;-D ARDUINO_USB_CDC_ON_BOOT=0 ;; -D ARDUINO_USB_MODE=1 ;; for boards with serial-to-USB chip
-D ARDUINO_USB_CDC_ON_BOOT=1 -D ARDUINO_USB_MODE=1 ;; for boards with USB-OTG connector only (USBCDC or "TinyUSB")
; -D WLED_RELEASE_NAME=ESP32-S3_PSRAM
-D WLED_USE_PSRAM -DBOARD_HAS_PSRAM ; tells WLED that PSRAM shall be used
lib_deps = ${esp32s3.lib_deps}
Expand All @@ -508,6 +505,13 @@ board_build.f_flash = 80000000L
board_build.flash_mode = qio
monitor_filters = esp32_exception_decoder

[env:esp32s3dev_8MB_PSRAM_qspi]
;; ESP32-TinyS3 development board, with 8MB FLASH and PSRAM (memory_type: qio_qspi)
extends = env:esp32s3dev_8MB_PSRAM_opi
;board = um_tinys3 ; -> needs workaround from https://github.com/Aircoookie/WLED/pull/2905#issuecomment-1328049860
board = esp32-s3-devkitc-1 ;; generic dev board; the next line adds PSRAM support
board_build.arduino.memory_type = qio_qspi ;; use with PSRAM: 2MB or 4MB

[env:esp8285_4CH_MagicHome]
board = esp8285
platform = ${common.platform_wled_default}
Expand Down
8 changes: 8 additions & 0 deletions tools/WLED_ESP32_16MB_9MB_FS.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x300000,
app1, app, ota_1, 0x310000,0x300000,
spiffs, data, spiffs, 0x610000,0x9E0000,
coredump, data, coredump,,64K
# to create/use ffat, see https://github.com/marcmerlin/esp32_fatfsimage
3 changes: 2 additions & 1 deletion tools/WLED_ESP32_8MB.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x200000,
app1, app, ota_1, 0x210000,0x200000,
spiffs, data, spiffs, 0x410000,0x3F0000,
spiffs, data, spiffs, 0x410000,0x3E0000,
coredump, data, coredump,,64K
Loading
Loading