Repository navigation
Expand file tree
/
Copy pathplatformio.ini
More file actions
260 lines (231 loc) · 9.99 KB
/
Copy pathplatformio.ini
File metadata and controls
260 lines (231 loc) · 9.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
; ============================================================================
; 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
-D ARDUINO_USB_CDC_ON_BOOT=1
-D ARDUINO_LOOP_STACK_SIZE=16384
[env:esp32c6]
extends = env:generic-esp
board = esp32-c6-devkitc-1
build_flags =
${env:generic-esp.build_flags}
-D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=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
[env:esp32p4]
extends = env:generic-esp
board = esp32-p4-evboard
build_flags =
${env:generic-esp.build_flags}
-D ARDUINO_USB_MODE=1
board_build.partitions = huge_app.csv
[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/<name>/` entries in FastLED/framework-arduino-lpc8xx, matching the
; five upstream `fbuild build . -e <variant>` 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 <example>` workflow by reusing compiled objects
build_cache_dir = .pio/build_cache