; ============================================================================ ; This file is consumed by `bash debug` (and raw `pio run`). ; CI compile, size-check, bloat, tests, and `bash autoresearch` all ; synthesise their own `platformio.ini` from `ci/boards.py` — NOT this ; file. Flags added here will NOT affect those builds; port them to ; `ci/boards.py` instead. ; ; See #3274 / #3279 / #3281 for the orthogonality rule and `agents/docs/ ; build-system.md` -> "Root ./platformio.ini is a frozen surface". ; ============================================================================ ; justification: header comment documenting the orthogonality with ci/boards.py ; added-in: PR-3295 [env] ; Global settings for all environments ; Symlink in the FastLED library so that changes to the library are reflected in the project ; build immediately. lib_deps = FastLED=symlink://./ ; NOTE: build_cache_enable and build_cache_dir are not standard PlatformIO options ; Board-specific cache directories are now configured per-board in ci/ci/boards.py ;build_cache_enable = true ;build_cache_dir = ${platformio.build_cache_dir} [env:generic-esp] # Developement branch of the open source espressif32 platform platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.35/platform-espressif32.zip framework = arduino upload_protocol = esptool monitor_filters = default esp32_exception_decoder ; Decode exceptions so that they are human readable. ; CRASH TRACE INVESTIGATION (2026-04-06): ; ESP32 Arduino framework includes built-in panic handler (Guru Meditation) that prints ; backtrace + register dump on crashes. The esp32_exception_decoder monitor filter above ; decodes addresses to file:line. For silent crashes (watchdog, brownout) with no output, ; the panic handler may not fire — CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT is the default. ; No additional crash handler implementation needed for stack traces. build_type = debug build_flags = -DDEBUG -DPIN_CLOCK=7 -DFASTLED_RMT5=1 -DESP32_ARDUINO_NO_RGB_BUILTIN=1 ; -DFASTLED_LOG_RMT_ENABLED ; -DFASTLED_LOG_PARLIO_ENABLED -DFASTLED_DEBUG=1 -g -Og -DCORE_DEBUG_LEVEL=5 -DLOG_LOCAL_LEVEL=ESP_LOG_VERBOSE -DFASTLED_ESP32_SPI_BULK_TRANSFER=1 -D IDF_CCACHE_ENABLE=1 check_tool = clangtidy [env:uno] platform = atmelavr board = uno framework = arduino [env:giga_r1_m7] platform = ststm32 board = giga_r1_m7 framework = arduino [env:esp32s3] extends = env:generic-esp board = seeed_xiao_esp32s3 ; Flash mode: Use board default (QIO) for hardware, ci/boards.py sets DIO for QEMU builds ; Set flash size to 4MB to match QEMU configuration (seeed_xiao_esp32s3 default is 8MB) ; Use board_build.flash_size to set the binary header, not board_upload.flash_size board_build.flash_size = 4MB ; Note: This partition table is for normal builds. QEMU builds use settings from ci/boards.py ; Use huge_app partition table to allow larger debug builds board_build.partitions = huge_app.csv build_flags = ${env:generic-esp.build_flags} -D ARDUINO_USB_MODE=1 ; justification: debug RPC uses native JTAG USB; Arduino HWCDC must not own its RX queue or ISR ; added-in: 1d654446ad7577dfe2ce191c9550b667bffdd490 -D ARDUINO_USB_CDC_ON_BOOT=0 -D FASTLED_ESP_FORCE_USB_SERIAL_JTAG=1 -D ARDUINO_LOOP_STACK_SIZE=16384 ; justification: remove board CDC startup defaults before selecting the native debug console ; added-in: 1d654446ad7577dfe2ce191c9550b667bffdd490 build_unflags = -DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_CDC_ON_BOOT [env:esp32c6] extends = env:generic-esp board = esp32-c6-devkitc-1 build_flags = ${env:generic-esp.build_flags} -D ARDUINO_USB_MODE=1 ; justification: debug RPC uses native JTAG USB; Arduino HWCDC must not own its RX queue or ISR ; added-in: 1d654446ad7577dfe2ce191c9550b667bffdd490 -D ARDUINO_USB_CDC_ON_BOOT=0 -D FASTLED_ESP_FORCE_USB_SERIAL_JTAG=1 -D CONFIG_PARLIO_TX_ISR_HANDLER_IN_IRAM=1 -D CONFIG_PARLIO_TX_ISR_CACHE_SAFE=1 -D ARDUINO_LOOP_STACK_SIZE=16384 -D PIN_DATA=21 -D PARLIO_FORCE_LSB_MODE=0 ; Optional: fix early prints ; Flash mode: Use board default (QIO) for hardware, ci/boards.py sets DIO for QEMU builds board_build.flash_size = 4MB board_upload.flash_size = 4MB board_build.partitions = huge_app.csv ; justification: remove board CDC startup defaults before selecting the native debug console ; added-in: 1d654446ad7577dfe2ce191c9550b667bffdd490 build_unflags = -DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_CDC_ON_BOOT [env:esp32p4] extends = env:generic-esp board = esp32-p4-evboard build_flags = ${env:generic-esp.build_flags} -D ARDUINO_USB_MODE=1 ; justification: native P4 debug RPC requires exclusive SDK USB Serial/JTAG ownership ; added-in: 1d654446ad7577dfe2ce191c9550b667bffdd490 -D ARDUINO_USB_CDC_ON_BOOT=0 -D FASTLED_ESP_FORCE_USB_SERIAL_JTAG=1 board_build.partitions = huge_app.csv ; justification: remove board CDC startup defaults before selecting the native debug console ; added-in: 1d654446ad7577dfe2ce191c9550b667bffdd490 build_unflags = -DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_CDC_ON_BOOT [env:esp32c3] extends = env:generic-esp board = esp32-c3-devkitm-1 ; Flash mode: Use board default (QIO) for hardware, ci/boards.py sets DIO for QEMU builds build_flags = ${env:generic-esp.build_flags} [env:esp32-wroom-32] extends = env:generic-esp board = esp32dev build_flags = ${env:generic-esp.build_flags} [env:esp32c2] extends = env:generic-esp platform = https://github.com/pioarduino/platform-espressif32.git#develop board = esp32-c2-devkitm-1 custom_sdkconfig = CONFIG_IDF_TARGET="esp32c2" board_build.partitions = huge_app.csv build_flags = ${env:generic-esp.build_flags} [env:esp32dev] extends = env:generic-esp platform = platformio/espressif32 board = esp32dev ; Use DIO flash mode instead of QIO for QEMU compatibility ; QEMU's ESP32 emulation doesn't support setting the QIE (Quad I/O Enable) bit, ; causing "Failed to set QIE bit" error and boot assertion failure in startup_funcs.c:95 ; DIO (Dual I/O) mode works reliably in both hardware and QEMU emulation board_build.flash_mode = dio ; #3268's manual debug-flag overrides (-UDEBUG / -DNDEBUG / -Os / -fno-exceptions ; / build_type=release / etc.) were reverted in #3279 (Phase 4). They ; existed only to defeat the legacy root-platformio.ini merge that ; injected generic-esp's debug flags into CI builds. That merge was ; severed in #3278 and fully removed in #3279, so the band-aids are no ; longer needed — CI now reads `ci/boards.py` exclusively and the 330 KB ; size ceiling is restored without manual flag stripping. build_flags = ${env:generic-esp.build_flags} [env:teensy40] platform = teensy board = teensy40 framework = arduino build_flags = -D USB_MIDI_SERIAL [env:teensy41] platform = teensy board = teensy41 framework = arduino build_flags = -D USB_MIDI_SERIAL [env:sparkfun_xrp_controller] platform = https://github.com/maxgerhardt/platform-raspberrypi board = sparkfun_xrp_controller framework = arduino build_flags = -fopt-info-all=optimization_report.txt extra_scripts = pre:ci/ci-flags.py [env:lpc845brk] ; NXP LPC845-BRK bring-up target — built via the fbuild nxplpc orchestrator ; which consumes FastLED/framework-arduino-lpc8xx. PlatformIO does not have a ; native nxplpc platform; this env is here only so the AutoResearch wrapper ; (`bash autoresearch lpc845brk`) can resolve a known environment name and ; dispatch to the consolidated bring-up sketch at examples/AutoResearch/ ; (low-memory mode auto-engages on LPC8xx; see FastLED #3030 / #3041). ; ; Build flags: ; -DRELEASE -- disables FASTLED_FORCE_DBG so the FL_DBG ; call sites stay no-op (~4 KB saved). ; ; -DFASTLED_LPC_PWM_DMA=1 -- activates the hardware-accelerated SCT + ; DMA-to-GPIO clockless driver (FastLED ; #2842 / #2850) in place of the bit-bang ; default. Claims the SCT + 3 DMA channels ; for the FastLED controller lifetime. ; The WS2812 loopback RPC is now derived from the LPC845 platform predicate ; inside AutoResearchLowMemory.h; no user build flag is required. ; justification: bump FastLED/platform-nxp-lpc8xx to v0.2.0 — picks up post-#3437-step-1 ArduinoCore-LPC8xx with full NXP CMSIS PAL in variants/lpc845/+lpc804/ ; added-in: PR-3438 platform = https://github.com/FastLED/platform-nxp-lpc8xx.git#12265f765aebd3893465d6d7ad76be66d89ba015 board = lpc845brk framework = arduino build_flags = -DRELEASE -DFASTLED_LPC_PWM_DMA=1 [env:lpc845brk_ieee754] ; Dedicated AutoResearch IEEE754 codec surface for FastLED #3039. This keeps ; the default LPC845-BRK low-memory RPC surface size-neutral while letting ; `bash autoresearch lpc845brk --ieee754` build a firmware that binds only the ; echo and ieee754CodecTest RPCs. extends = env:lpc845brk build_flags = ${env:lpc845brk.build_flags} -DFL_AUTORESEARCH_IEEE754=1 ; -------------------------------------------------------------------------- ; LPC8xx canary envs (FastLED #2990 — fbuild Stage 6 canary). ; ; Minimal definitions so the per-board CI workflows below can resolve ; each variant name against the fbuild nxplpc orchestrator. These envs ; do NOT carry the AutoResearch-specific build_flags that `lpc845brk` ; does — they exist for the Blink canary path only. ; ; All four use the same nxplpc + ArduinoCore-LPC8xx stack (see lpc845brk ; comment above for the dispatch rationale). Each maps 1:1 to one of the ; `variants//` entries in FastLED/framework-arduino-lpc8xx, matching the ; five upstream `fbuild build . -e ` jobs that already pass on ; that repo (see #2990 body). ; -------------------------------------------------------------------------- [env:lpc845] ; justification: same platform pin as env:lpc845brk above — full NXP CMSIS PAL via platform-nxplpc-arduino v0.2.0. FastLED #3437. ; added-in: PR-3438 platform = https://github.com/FastLED/platform-nxp-lpc8xx.git#12265f765aebd3893465d6d7ad76be66d89ba015 board = lpc845 framework = arduino [env:lpc804] ; justification: same platform pin as env:lpc845brk above. FastLED #3437. ; added-in: PR-3438 platform = https://github.com/FastLED/platform-nxp-lpc8xx.git#12265f765aebd3893465d6d7ad76be66d89ba015 board = lpc804 framework = arduino [env:lpcxpresso845max] ; justification: same platform pin as env:lpc845brk above. FastLED #3437. ; added-in: PR-3438 platform = https://github.com/FastLED/platform-nxp-lpc8xx.git#12265f765aebd3893465d6d7ad76be66d89ba015 board = lpcxpresso845max framework = arduino [env:lpcxpresso804] ; justification: same platform pin as env:lpc845brk above. FastLED #3437. ; added-in: PR-3438 platform = https://github.com/FastLED/platform-nxp-lpc8xx.git#12265f765aebd3893465d6d7ad76be66d89ba015 board = lpcxpresso804 framework = arduino [platformio] src_dir = examples/Sailboat ; default: examples/AutoResearch/AutoResearch.ino (override with PLATFORMIO_SRC_DIR env var) default_envs = esp32s3 ; ARDUINO_USB_CDC_ON_BOOT lives in per-board build_flags now (ci/boards.py). ; Safe to enable thanks to Serial.setTxTimeoutMs(0); see issue #2668. ; Enable shared build cache to avoid recompiling FastLED library when switching sketches ; This dramatically speeds up `bash debug ` workflow by reusing compiled objects build_cache_dir = .pio/build_cache