Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
27 changes: 27 additions & 0 deletions platforms/platformio.esp32c2.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,32 @@ platform = https://github.com/pioarduino/platform-espressif32/releases/download/
board = esp32-c2-devkitm-1
framework = arduino

; ============================================================
; SIZE OPTIMIZATION (recommended for production builds)
; ------------------------------------------------------------
; Drops a Blink-class build ~35-40% by killing the default
; debug-log strings, libstdc++ exception machinery, and
; per-function-section bloat. Comment out (or set
; build_type = debug) when you need verbose logs / exception
; decoding while developing.
; Reference: https://github.com/FastLED/FastLED/pull/3268
; ============================================================
build_type = release
build_flags =
-DCORE_DEBUG_LEVEL=0
-DLOG_LOCAL_LEVEL=ESP_LOG_NONE
-Os
-fno-exceptions
-fno-rtti
-fno-unwind-tables
-fno-asynchronous-unwind-tables
-ffunction-sections
-fdata-sections
-flto=auto
-Wl,--gc-sections
build_unflags =
-Og
-g

lib_deps =
FastLED
27 changes: 27 additions & 0 deletions platforms/platformio.esp32c3.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,32 @@ framework = arduino
; connected — boards powered from a wall adapter then hang in setup() the
; moment user code touches Serial. Leave Serial on the UART (default).

; ============================================================
; SIZE OPTIMIZATION (recommended for production builds)
; ------------------------------------------------------------
; Drops a Blink-class build ~35-40% by killing the default
; debug-log strings, libstdc++ exception machinery, and
; per-function-section bloat. Comment out (or set
; build_type = debug) when you need verbose logs / exception
; decoding while developing.
; Reference: https://github.com/FastLED/FastLED/pull/3268
; ============================================================
build_type = release
build_flags =
-DCORE_DEBUG_LEVEL=0
-DLOG_LOCAL_LEVEL=ESP_LOG_NONE
-Os
-fno-exceptions
-fno-rtti
-fno-unwind-tables
-fno-asynchronous-unwind-tables
-ffunction-sections
-fdata-sections
-flto=auto
-Wl,--gc-sections
build_unflags =
-Og
-g

lib_deps =
FastLED
21 changes: 21 additions & 0 deletions platforms/platformio.esp32c5.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,30 @@ framework = arduino
; Without these the FastLED PARLIO TX ISR sits in flash and takes cache-miss
; stalls during execution, silently corrupting LED protocol timing.
; See FastLED src/platforms/esp/32/drivers/parlio/ for the canonical chipset list.
;
; SIZE OPTIMIZATION (lines below the PARLIO flags) drops a Blink-class build
; ~35-40% by killing default debug-log strings, libstdc++ exception machinery,
; and per-function-section bloat. Comment them out (or set build_type = debug)
; when you need verbose logs / exception decoding while developing.
; Reference: https://github.com/FastLED/FastLED/pull/3268
build_type = release
build_flags =
-DCONFIG_PARLIO_TX_ISR_HANDLER_IN_IRAM=1
-DCONFIG_PARLIO_TX_ISR_CACHE_SAFE=1
-DCORE_DEBUG_LEVEL=0
-DLOG_LOCAL_LEVEL=ESP_LOG_NONE
-Os
-fno-exceptions
-fno-rtti
-fno-unwind-tables
-fno-asynchronous-unwind-tables
-ffunction-sections
-fdata-sections
-flto=auto
-Wl,--gc-sections
build_unflags =
-Og
-g

lib_deps =
FastLED
21 changes: 21 additions & 0 deletions platforms/platformio.esp32c6.ini
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,30 @@ monitor_filters =
; interface, which only enumerates when a USB host is connected — sketches
; that touch Serial in setup() then hang when the board is powered from a
; wall adapter instead of a PC.
;
; SIZE OPTIMIZATION (lines below the PARLIO flags) drops a Blink-class build
; ~35-40% by killing default debug-log strings, libstdc++ exception machinery,
; and per-function-section bloat. Comment them out (or set build_type = debug)
; when you need verbose logs / exception decoding while developing.
; Reference: https://github.com/FastLED/FastLED/pull/3268
build_type = release
build_flags =
-DCONFIG_PARLIO_TX_ISR_HANDLER_IN_IRAM=1
-DCONFIG_PARLIO_TX_ISR_CACHE_SAFE=1
-DCORE_DEBUG_LEVEL=0
-DLOG_LOCAL_LEVEL=ESP_LOG_NONE
-Os
-fno-exceptions
-fno-rtti
-fno-unwind-tables
-fno-asynchronous-unwind-tables
-ffunction-sections
-fdata-sections
-flto=auto
-Wl,--gc-sections
build_unflags =
-Og
-g

board_build.flash_mode = dio
board_upload.flash_size = 4MB
Expand Down
32 changes: 32 additions & 0 deletions platforms/platformio.esp32dev.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,37 @@ platform = https://github.com/pioarduino/platform-espressif32/releases/download/
board = esp32dev
framework = arduino

; ============================================================
; SIZE OPTIMIZATION (recommended for production builds)
; ------------------------------------------------------------
; Without these flags, a FastLED + Arduino-ESP32 build typically
; links a ~600 KB binary because the default Arduino-ESP32 build
; carries CORE_DEBUG_LEVEL=5 (every log string compiled in),
; full libstdc++ exception machinery, and unstripped per-function
; sections. With them you drop ~35-40% (Blink: 631 KB -> 408 KB
; in FastLED's own CI).
;
; Want verbose ESP-IDF logs / exception decoder while developing?
; Comment out the block below OR set build_type = debug.
;
; Reference: https://github.com/FastLED/FastLED/pull/3268
; ============================================================
build_type = release
build_flags =
-DCORE_DEBUG_LEVEL=0
-DLOG_LOCAL_LEVEL=ESP_LOG_NONE
-Os
-fno-exceptions
-fno-rtti
-fno-unwind-tables
-fno-asynchronous-unwind-tables
-ffunction-sections
-fdata-sections
-flto=auto
-Wl,--gc-sections
build_unflags =
-Og
-g

lib_deps =
FastLED
21 changes: 21 additions & 0 deletions platforms/platformio.esp32h2.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,30 @@ framework = arduino
; Without these the FastLED PARLIO TX ISR sits in flash and takes cache-miss
; stalls during execution, silently corrupting LED protocol timing.
; See FastLED src/platforms/esp/32/drivers/parlio/ for the canonical chipset list.
;
; SIZE OPTIMIZATION (lines below the PARLIO flags) drops a Blink-class build
; ~35-40% by killing default debug-log strings, libstdc++ exception machinery,
; and per-function-section bloat. Comment them out (or set build_type = debug)
; when you need verbose logs / exception decoding while developing.
; Reference: https://github.com/FastLED/FastLED/pull/3268
build_type = release
build_flags =
-DCONFIG_PARLIO_TX_ISR_HANDLER_IN_IRAM=1
-DCONFIG_PARLIO_TX_ISR_CACHE_SAFE=1
-DCORE_DEBUG_LEVEL=0
-DLOG_LOCAL_LEVEL=ESP_LOG_NONE
-Os
-fno-exceptions
-fno-rtti
-fno-unwind-tables
-fno-asynchronous-unwind-tables
-ffunction-sections
-fdata-sections
-flto=auto
-Wl,--gc-sections
build_unflags =
-Og
-g

lib_deps =
FastLED
21 changes: 21 additions & 0 deletions platforms/platformio.esp32p4.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,30 @@ board_build.partitions = huge_app.csv
; it has no effect on Serial routing while CDC_ON_BOOT=0, so we leave it
; unset here. P4's upstream default is 0 (TinyUSB); C3/C5/C6/H2 force it to
; 1 (HWCDC) via platform.txt.
;
; SIZE OPTIMIZATION (lines below the PARLIO flags) drops a Blink-class build
; ~35-40% by killing default debug-log strings, libstdc++ exception machinery,
; and per-function-section bloat. Comment them out (or set build_type = debug)
; when you need verbose logs / exception decoding while developing.
; Reference: https://github.com/FastLED/FastLED/pull/3268
build_type = release
build_flags =
-DCONFIG_PARLIO_TX_ISR_HANDLER_IN_IRAM=1
-DCONFIG_PARLIO_TX_ISR_CACHE_SAFE=1
-DCORE_DEBUG_LEVEL=0
-DLOG_LOCAL_LEVEL=ESP_LOG_NONE
-Os
-fno-exceptions
-fno-rtti
-fno-unwind-tables
-fno-asynchronous-unwind-tables
-ffunction-sections
-fdata-sections
-flto=auto
-Wl,--gc-sections
build_unflags =
-Og
-g

lib_deps =
FastLED
27 changes: 27 additions & 0 deletions platforms/platformio.esp32s2.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,32 @@ platform = https://github.com/pioarduino/platform-espressif32/releases/download/
board = lolin_s2_mini
framework = arduino

; ============================================================
; SIZE OPTIMIZATION (recommended for production builds)
; ------------------------------------------------------------
; Drops a Blink-class build ~35-40% by killing the default
; debug-log strings, libstdc++ exception machinery, and
; per-function-section bloat. Comment out (or set
; build_type = debug) when you need verbose logs / exception
; decoding while developing.
; Reference: https://github.com/FastLED/FastLED/pull/3268
; ============================================================
build_type = release
build_flags =
-DCORE_DEBUG_LEVEL=0
-DLOG_LOCAL_LEVEL=ESP_LOG_NONE
-Os
-fno-exceptions
-fno-rtti
-fno-unwind-tables
-fno-asynchronous-unwind-tables
-ffunction-sections
-fdata-sections
-flto=auto
-Wl,--gc-sections
build_unflags =
-Og
-g

lib_deps =
FastLED
28 changes: 27 additions & 1 deletion platforms/platformio.esp32s3.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,36 @@ upload_protocol = esptool
; The exception decoder is a useful tool for debugging that is difficult
; to enable in the Arduino IDE. But in platformio it will decode the
; 0x0f4852c0 addreesses into the actual function names.
monitor_filters =
monitor_filters =
default
esp32_exception_decoder

; ============================================================
; SIZE OPTIMIZATION (recommended for production builds)
; ------------------------------------------------------------
; Drops a Blink-class build ~35-40% by killing the default
; debug-log strings, libstdc++ exception machinery, and
; per-function-section bloat. Comment out (or set
; build_type = debug) when you need verbose logs / exception
; decoding while developing.
; Reference: https://github.com/FastLED/FastLED/pull/3268
; ============================================================
build_type = release
build_flags =
-DCORE_DEBUG_LEVEL=0
-DLOG_LOCAL_LEVEL=ESP_LOG_NONE
-Os
-fno-exceptions
-fno-rtti
-fno-unwind-tables
-fno-asynchronous-unwind-tables
-ffunction-sections
-fdata-sections
-flto=auto
-Wl,--gc-sections
build_unflags =
-Og
-g

lib_deps =
FastLED
Expand Down
25 changes: 25 additions & 0 deletions platforms/platformio.esp8266.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,30 @@ platform = espressif8266
board = esp01
framework = arduino

; ============================================================
; SIZE OPTIMIZATION (recommended for production builds)
; ------------------------------------------------------------
; ESP8266 is tighter on flash than ESP32 and benefits even more
; from the strip flags. Comment out (or set build_type = debug)
; if you need verbose logs / exception decoding while developing.
; Note: ESP8266 uses NONOS SDK so the ESP-IDF-only
; CORE_DEBUG_LEVEL / ESP_LOG_NONE defines aren't applicable here.
; Reference: https://github.com/FastLED/FastLED/pull/3268
; ============================================================
build_type = release
build_flags =
-Os
-fno-exceptions
-fno-rtti
-fno-unwind-tables
-fno-asynchronous-unwind-tables
-ffunction-sections
-fdata-sections
-flto=auto
-Wl,--gc-sections
build_unflags =
-Og
-g

lib_deps =
FastLED
9 changes: 4 additions & 5 deletions platforms/platformio.lpc804.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@
; (clockless_arm_lpc_plu.h) by uncommenting -DFASTLED_LPC_PLU below. The
; PLU synthesizes the bitstream in the chip's 26-LUT hardware fabric.
;
; The platform package is NOT in the upstream PlatformIO registry. We use
; the zackees/platform-nxplpc-arduino fork (adds the Arduino framework
; binding via ArduinoCore-LPC8xx). The SHA below is pinned to match
; FastLED master's own platformio.ini.
; The platform package isn't in the upstream PlatformIO registry; we use
; the zackees/platform-nxplpc-arduino package, which adds the Arduino
; framework binding for the LPC8xx parts via ArduinoCore-LPC8xx.

[env:lpc804]
platform = https://github.com/zackees/platform-nxplpc-arduino.git#2ee527ae80de98e9105329a7260edb003289dfda
platform = https://github.com/zackees/platform-nxplpc-arduino.git#main
board = lpc804
framework = arduino

Expand Down
9 changes: 4 additions & 5 deletions platforms/platformio.lpc845.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@
; m0clockless_c.h) by default. For the SCT+DMA fast path see the
; lpc845brk env (-DFASTLED_LPC_PWM_DMA=1).
;
; The platform package is NOT in the upstream PlatformIO registry. We use
; the zackees/platform-nxplpc-arduino fork (adds the Arduino framework
; binding via ArduinoCore-LPC8xx). The SHA below is pinned to match
; FastLED master's own platformio.ini.
; The platform package isn't in the upstream PlatformIO registry; we use
; the zackees/platform-nxplpc-arduino package, which adds the Arduino
; framework binding for the LPC8xx parts via ArduinoCore-LPC8xx.

[env:lpc845]
platform = https://github.com/zackees/platform-nxplpc-arduino.git#2ee527ae80de98e9105329a7260edb003289dfda
platform = https://github.com/zackees/platform-nxplpc-arduino.git#main
board = lpc845
framework = arduino

Expand Down
9 changes: 4 additions & 5 deletions platforms/platformio.lpc845brk.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@
; (clockless_arm_lpc_pwm_dma.h — SCT + 3-channel DMA-to-GPIO). Drop the
; FASTLED_LPC_PWM_DMA flag if you'd rather use the plain bit-bang driver.
;
; The platform package is NOT in the upstream PlatformIO registry. We use
; the zackees/platform-nxplpc-arduino fork (adds the Arduino framework
; binding via ArduinoCore-LPC8xx). The SHA below is pinned to match
; FastLED master's own platformio.ini.
; The platform package isn't in the upstream PlatformIO registry; we use
; the zackees/platform-nxplpc-arduino package, which adds the Arduino
; framework binding for the LPC8xx parts via ArduinoCore-LPC8xx.

[env:lpc845brk]
platform = https://github.com/zackees/platform-nxplpc-arduino.git#2ee527ae80de98e9105329a7260edb003289dfda
platform = https://github.com/zackees/platform-nxplpc-arduino.git#main
board = lpc845brk
framework = arduino

Expand Down
Loading
Loading