-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplatformio.ini
More file actions
303 lines (279 loc) · 8.36 KB
/
platformio.ini
File metadata and controls
303 lines (279 loc) · 8.36 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
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
[platformio]
default_envs = c3-4mb-prod, s3-4mb-prod, s3-pcb-prod, s3-pcb-dev
; ========================================
; COMMON CONFIGURATION
; ========================================
[common]
lib_deps_base =
arduino-libraries/NTPClient@^3.2.1
ropg/ezTime@^0.8.3
bblanchon/ArduinoJson@^7.4.2
cyijun/ESP32MQTTClient@^1.1.1
esphome/AsyncTCP-esphome@^2.1.4
esphome/ESPAsyncWebServer-esphome@^3.4.0
marian-craciunescu/ESP32Ping@^1.7
build_flags_base =
-Isrc
-std=gnu++17
-DASYNC_TCP_SSL_ENABLED=0
-DCONFIG_ASYNC_TCP_MAX_ACK_TIME=3000
-DCONFIG_ASYNC_TCP_PRIORITY=10
-DCONFIG_ASYNC_TCP_QUEUE_SIZE=8
-DASYNCWEBSERVER_REGEX=1
-DARDUINOJSON_USE_LONG_LONG=0
build_unflags_base =
-O2
-std=gnu++11
; CORE_DEBUG_LEVEL: 0=None, 1=Error, 2=Warn, 3=Info, 4=Debug, 5=Verbose
; Release optimization profile
build_flags_release =
-Os
-ffunction-sections
-fdata-sections
-Wl,--gc-sections
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_ERROR
-DAPP_LOG_LEVEL=LOG_LEVEL_ERROR
-DRELEASE_BUILD=1
; Debug profile
build_flags_debug =
-O0
-g3
-ggdb
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_INFO
-DAPP_LOG_LEVEL=LOG_LEVEL_NOTICE
; ========================================
; BASE ENVIRONMENTS
; ========================================
[env:esp32c3_base]
platform = espressif32@^6.9.0
board = esp32-c3-devkitc-02
framework = arduino
monitor_speed = 115200
upload_speed = 460800
board_build.filesystem = littlefs
board_build.partitions = partitions_4mb_no_ota.csv
board_upload.offset_address = 0x20000
lib_deps = ${common.lib_deps_base}
build_flags =
${common.build_flags_base}
-DDISABLE_OTA=1
-DBOARD_HAS_PSRAM=0
-DBOARD_ESP32C3_MINI
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1
; FastLED RMT driver configuration for ESP32-C3 (4 RMT channels)
; MAX_CHANNELS=1: Conservative, single LED strip, prevents conflicts
; BUILTIN_DRIVER=1: Use stable ESP-IDF RMT driver (prevents crashes)
-DFASTLED_RMT_MAX_CHANNELS=1
-DFASTLED_RMT_BUILTIN_DRIVER=1
build_unflags = ${common.build_unflags_base}
[env:esp32s3_8mb_pcb_base]
platform = espressif32@^6.9.0
board = esp32-s3-devkitc-1
framework = arduino
monitor_speed = 115200
upload_speed = 921600
board_build.filesystem = littlefs
board_build.partitions = partitions_8mb_ota.csv
board_build.flash_mode = qio
board_upload.flash_size = 8MB
board_upload.offset_address = 0x20000
; No PSRAM on custom PCB (8MB flash only)
lib_deps = ${common.lib_deps_base}
build_flags =
${common.build_flags_base}
-DBOARD_HAS_PSRAM=0
-DBOARD_ESP32S3_CUSTOM_PCB
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1
; FastLED RMT driver configuration for ESP32-S3 (4 TX + 4 RX channels)
; MAX_CHANNELS=1: Conservative, single LED strip, prevents conflicts
; BUILTIN_DRIVER=1: Use stable ESP-IDF RMT driver (prevents crashes)
-DFASTLED_RMT_MAX_CHANNELS=1
-DFASTLED_RMT_BUILTIN_DRIVER=1
build_unflags = ${common.build_unflags_base}
[env:esp32s3_4mb_psram_base]
platform = espressif32@^6.9.0
board = esp32-s3-devkitc-1
framework = arduino
monitor_speed = 115200
upload_speed = 921600
board_build.filesystem = littlefs
board_build.partitions = partitions_4mb_no_ota.csv
board_build.flash_mode = qio
board_upload.flash_size = 4MB
board_upload.offset_address = 0x20000
; PSRAM configuration for ESP32-S3R8 (4MB Flash + 2MB PSRAM)
board_build.arduino.memory_type = qio_qspi
board_build.psram_type = qio
lib_deps = ${common.lib_deps_base}
build_flags =
${common.build_flags_base}
-DDISABLE_OTA=1
-DBOARD_HAS_PSRAM=1
-DBOARD_ESP32S3_MINI
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1
; FastLED RMT driver configuration for ESP32-S3 (4 TX + 4 RX channels)
; MAX_CHANNELS=1: Conservative, single LED strip, prevents conflicts
; BUILTIN_DRIVER=1: Use stable ESP-IDF RMT driver (prevents crashes)
-DFASTLED_RMT_MAX_CHANNELS=1
-DFASTLED_RMT_BUILTIN_DRIVER=1
build_unflags = ${common.build_unflags_base}
; ========================================
; PRODUCTION BUILD ENVIRONMENTS
; ========================================
[env:c3-4mb-prod]
extends = env:esp32c3_base
lib_deps =
${env:esp32c3_base.lib_deps}
fastled/FastLED@^3.10.3
build_flags =
${env:esp32c3_base.build_flags}
${common.build_flags_release}
; LEDs disabled on ESP32-C3 - FastLED.show() crashes on this platform
; Root cause: FastLED library has broken ESP32-C3 support
; Crash happens inside CFastLED::show() regardless of driver configuration
; Works fine on ESP32-S3 variants
-DENABLE_LEDS=0
extra_scripts =
pre:scripts/pio/generate_config_example.py
pre:scripts/pio/build_frontend.py
[env:s3-4mb-prod]
extends = env:esp32s3_4mb_psram_base
lib_deps =
${env:esp32s3_4mb_psram_base.lib_deps}
fastled/FastLED@^3.10.3
build_flags =
${env:esp32s3_4mb_psram_base.build_flags}
${common.build_flags_release}
-DENABLE_LEDS=1
extra_scripts =
pre:scripts/pio/generate_config_example.py
pre:scripts/pio/build_frontend.py
; ========================================
; DEVELOPMENT ENVIRONMENT
; ========================================
[env:c3-4mb-dev]
extends = env:esp32c3_base
upload_port = /dev/cu.usbmodem134401
monitor_port = /dev/cu.usbmodem134401
lib_deps =
${env:esp32c3_base.lib_deps}
fastled/FastLED@^3.10.3
build_flags =
${env:esp32c3_base.build_flags}
${common.build_flags_debug}
; Testing: LEDs enabled to identify actual crash cause
; Minimal test shows FastLED + AsyncWebServer + MQTT work fine
; If crash still happens, it's interaction with other components
-DENABLE_LEDS=1
monitor_filters =
esp32_exception_decoder
colorize
monitor_rts = 0
monitor_dtr = 0
extra_scripts =
pre:scripts/pio/generate_config_example.py
pre:scripts/pio/build_frontend.py
scripts/pio/build_upload_monitor.py
[env:s3-4mb-dev]
extends = env:esp32s3_4mb_psram_base
upload_port = /dev/cu.usbmodem134401
monitor_port = /dev/cu.usbmodem134401
lib_deps =
${env:esp32s3_4mb_psram_base.lib_deps}
fastled/FastLED@^3.10.3
build_flags =
${env:esp32s3_4mb_psram_base.build_flags}
${common.build_flags_debug}
-DENABLE_LEDS=1
monitor_filters =
esp32_exception_decoder
colorize
monitor_rts = 0
monitor_dtr = 0
extra_scripts =
pre:scripts/pio/generate_config_example.py
pre:scripts/pio/build_frontend.py
scripts/pio/build_upload_monitor.py
; ========================================
; CUSTOM PCB ENVIRONMENTS (with eFuse protection)
; ========================================
[env:s3-pcb-prod]
extends = env:esp32s3_8mb_pcb_base
lib_deps =
${env:esp32s3_8mb_pcb_base.lib_deps}
fastled/FastLED@^3.10.3
build_flags =
${env:esp32s3_8mb_pcb_base.build_flags}
${common.build_flags_release}
-DENABLE_LEDS=1
extra_scripts =
pre:scripts/pio/generate_config_example.py
pre:scripts/pio/build_frontend.py
[env:s3-pcb-dev]
extends = env:esp32s3_8mb_pcb_base
lib_deps =
${env:esp32s3_8mb_pcb_base.lib_deps}
fastled/FastLED@^3.10.3
build_flags =
${env:esp32s3_8mb_pcb_base.build_flags}
${common.build_flags_debug}
-DENABLE_LEDS=1
board_build.embed_files =
monitor_filters =
esp32_exception_decoder
colorize
monitor_rts = 0
monitor_dtr = 0
extra_scripts =
pre:scripts/pio/generate_config_example.py
pre:scripts/pio/build_frontend.py
scripts/pio/build_upload_monitor.py
; ========================================
; TEST ENVIRONMENT
; ========================================
[env:c3-mqtt-poc]
extends = env:esp32c3_base
upload_port = /dev/cu.usbmodem134401
monitor_port = /dev/cu.usbmodem134401
lib_deps =
${env:esp32c3_base.lib_deps}
build_flags =
${env:esp32c3_base.build_flags}
${common.build_flags_debug}
-DENABLE_LEDS=0
build_src_filter =
+<../test/test_mqtt_poc.cpp>
+<config/>
monitor_filters =
esp32_exception_decoder
colorize
monitor_rts = 0
monitor_dtr = 0
[env:c3-4mb-test]
extends = env:esp32c3_base
lib_deps =
${env:esp32c3_base.lib_deps}
fastled/FastLED@^3.10.3
build_flags =
${env:esp32c3_base.build_flags}
${common.build_flags_debug}
-DARDUINO_JSON_USE_DOUBLE=0
-DENABLE_LEDS=1
-Wl,--gc-sections
build_src_filter = +<*> -<main.cpp>
monitor_filters =
esp32_exception_decoder
colorize
monitor_rts = 0
monitor_dtr = 0
upload_speed = 115200
test_framework = unity
test_speed = 115200
test_filter = *
test_build_src = yes
test_ignore = test_integration_*
debug_test = *
debug_build_flags = -O0 -g3 -ggdb