-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathplatformio.ini
523 lines (472 loc) · 14.7 KB
/
platformio.ini
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
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
[platformio]
# These default envs are built when running `pio run`.
# Note that GitHub Actions use a different list in `jazzlights.yml`.
default_envs =
vest
vest_dev
vest_instrumentation
clouds_s3_debug
gauntlet
native
# Settings shared by all platforms.
[env]
test_build_src = true
extra_scripts = extras/site/flash/merge-bin.py
# Shared production build parameters for embedded devices. Will not build on its own.
[env:_embedded]
framework = arduino
upload_speed = 115200
monitor_speed = 115200
debug_tool = olimex-arm-usb-ocd-h
# Unfortunately upload_port and monitor_port don't natively support regexes, but hwgrep does.
# For some reason the characters '*', '?', '[', and ']' don't work in hwgrep, so we improvised.
# macOS uses /dev/cu.usbserial-.+, Linux uses /dev/ttyUSB.+ and Windows uses COM.+
upload_port = hwgrep://^(/dev/cu\.usbserial-.+|/dev/ttyUSB.+|COM.+)$
monitor_port = ${this.upload_port}
lib_deps =
# FastLED 3.9.0 broke our build because it removed CLEDController::showLeds(). That issue
# was fixed in 3.9.5, but we're avoiding 3.9.x since those are betas for 4.0 and could
# cause further issues. Plan is to stay pinned to 3.7.8 until 4.0 is released.
fastled/[email protected]
build_flags =
-Werror=format
# Shared production build parameters for arduino. Will not build on its own.
[env:_arduino]
extends = env:_embedded
framework = arduino
# Force espressif32 version to <50 because otherwise it can pick up the one from pioarduino.
platform = espressif32 @ <50
# Shared production build parameters for various m5stack boards. Will not build on its own.
[env:_atom]
extends = env:_arduino
board = m5stack-atom
upload_speed = 1500000
monitor_filters = esp32_exception_decoder, time
upload_port = hwgrep://^(/dev/cu\.usbserial-.{10}|/dev/ttyUSB.+|COM.+)$
monitor_port = ${this.upload_port}
# Increase available flash size from 1.25MB to 3MB
# by disabling Over The Air install option.
board_build.partitions = atom_matrix_partition_table.csv
# ATOM Matrix production build parameters. Will not build on its own.
[env:_atom_matrix]
extends = env:_atom
build_flags =
${env:_atom.build_flags}
-DJL_CONTROLLER=ATOM_MATRIX
# ATOM Matrix production vest build.
[env:vest]
extends = env:_atom_matrix
build_flags =
${env:_atom_matrix.build_flags}
-DJL_CONFIG=VEST
-DBOOT_NAME=VEST
# ATOM Matrix build designed to boot into the calibration mode suitable for assembling vests.
[env:vest_calibrate]
extends = env:_atom_matrix
build_flags =
${env:_atom_matrix.build_flags}
-DJL_CONFIG=VEST
-DBOOT_NAME=FAB
-DJL_START_SPECIAL=1
-DJL_BUTTON_LOCK=0
# ATOM Matrix development vest build.
# Uses lower LED brightness to not overload computer USB, and disables button lock.
[env:vest_dev]
extends = env:_atom_matrix
build_flags =
${env:_atom_matrix.build_flags}
-DJL_CONFIG=VEST
-DBOOT_NAME=DEV
-DJL_DEV=1
# ATOM Matrix development vest build that saves and logs timing information about the arduino loop.
[env:vest_timing]
extends = env:vest_dev
build_flags =
${env:vest_dev.build_flags}
'-UBOOT_NAME -DBOOT_NAME=TIMING'
-DJL_TIMING=1
# ATOM Matrix development vest build with custom FreeRTOS settings to enable instrumentation.
# This requires additional installation steps, see the Instrumentation section of DEBUGGING.md.
# Note that this makes use of the sdkconfig.vest_instrumentation file. If we end up wanting to
# have other environments inherit from this one, we can configure it via something like
# board_build.cmake_extra_args = -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.release.defaults"
# https://github.com/platformio/platform-espressif32/issues/638
# https://docs.espressif.com/projects/esp-idf/en/release-v5.2/esp32/api-guides/build-system.html#custom-sdkconfig-defaults
[env:vest_instrumentation]
extends = env:vest_timing
framework = espidf, arduino
build_flags =
${env:vest_timing.build_flags}
'-UBOOT_NAME -DBOOT_NAME=INSTRUMENT'
-DJL_INSTRUMENTATION=1
# ATOM Matrix development vest build that uses Esp32WiFiNetwork.
[env:vest_esp_wifi]
extends = env:vest_dev
build_flags =
${env:vest_dev.build_flags}
'-UBOOT_NAME -DBOOT_NAME=ESP-WIFI'
-DJL_ESP32_WIFI=1
# ATOM Matrix development vest build with Arduino Ethernet support.
[env:vest_arduino_ethernet]
extends = env:vest_dev
lib_deps =
${env:vest_dev.lib_deps}
arduino-libraries/Ethernet
build_flags =
${env:vest_dev.build_flags}
'-UBOOT_NAME -DBOOT_NAME=A-ETH'
-DJL_ETHERNET=1
-DJL_ESP32_ETHERNET=0
-DJL_ESP32_WIFI=0
# ATOM Matrix development vest build with Ethernet enabled that uses Esp32 networks.
[env:vest_esp_ethernet]
extends = env:vest_dev
build_flags =
${env:vest_dev.build_flags}
'-UBOOT_NAME -DBOOT_NAME=ESP-ETH'
-DJL_ETHERNET=1
-DJL_ESP32_ETHERNET=1
-DJL_ESP32_WIFI=1
# ATOM Matrix development vest build with Ethernet enabled and Wi-Fi disabled.
[env:vest_esp_ethernet_only]
extends = env:vest_dev
build_flags =
${env:vest_dev.build_flags}
'-UBOOT_NAME -DBOOT_NAME=ETHOD'
-DJL_ETHERNET=1
-DJL_ESP32_ETHERNET=1
-DJL_WIFI=0
# ATOM Matrix development vest build with Ethernet enabled and Wi-Fi disabled.
[env:vest_instr_esp_ethernet_only]
extends = env:vest_instrumentation
build_flags =
${env:vest_instrumentation.build_flags}
'-UBOOT_NAME -DBOOT_NAME=ETHIOD'
-DJL_ETHERNET=1
-DJL_ESP32_ETHERNET=1
-DJL_WIFI=0
# ATOM Matrix production shoe build.
[env:shoe]
extends = env:_atom_matrix
build_flags =
${env:_atom_matrix.build_flags}
-DJL_CONFIG=SHOE
-DBOOT_NAME=SHOE
# ATOM Matrix production staff build.
[env:staff]
extends = env:_atom_matrix
build_flags =
${env:_atom_matrix.build_flags}
-DJL_CONFIG=STAFF
-DBOOT_NAME=STAFF
# ATOM Matrix production hat build.
[env:hat]
extends = env:_atom_matrix
build_flags =
${env:_atom_matrix.build_flags}
-DJL_CONFIG=HAT
-DBOOT_NAME=HAT
# ATOM Matrix production rope light build.
[env:ropelight]
extends = env:_atom_matrix
build_flags =
${env:_atom_matrix.build_flags}
-DJL_CONFIG=ROPELIGHT
-DBOOT_NAME=ROPE
# ATOM Matrix production hammer build.
[env:hammer]
extends = env:_atom_matrix
build_flags =
${env:_atom_matrix.build_flags}
-DJL_CONFIG=HAMMER
-DBOOT_NAME=HAMMER
# ATOM Matrix production fairy wand build.
[env:fairy_wand]
extends = env:_atom_matrix
build_flags =
${env:_atom_matrix.build_flags}
-DJL_CONFIG=FAIRY_WAND
-DBOOT_NAME=WAND
# ATOM Lite production build parameters. Will not build on its own.
[env:_atom_lite]
extends = env:_atom
build_flags =
${env:_atom.build_flags}
-DJL_CONTROLLER=ATOM_LITE
# ATOM Matrix production fairy wand build.
[env:vest_lite]
extends = env:_atom_lite
build_flags =
${env:_atom_lite.build_flags}
-DJL_CONFIG=VEST
-DBOOT_NAME=VEST-LITE
# ATOM S3 production build parameters. Will not build on its own.
[env:_atom_s3]
extends = env:_arduino
board = m5stack-atoms3
upload_speed = 1500000
# It appears that once we've flashed a debug build on an S3,
# it fails to work with esptool, the default upload_protocol.
upload_protocol = esp-builtin
monitor_filters = esp32_exception_decoder, time
upload_port = hwgrep://^/dev/cu\.(usb|)modem\d{3,4}$
monitor_port = ${this.upload_port}
build_flags =
${env:_arduino.build_flags}
-DJL_CONTROLLER=ATOM_S3
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1
lib_deps =
${env:_arduino.lib_deps}
m5stack/M5Unified
# ATOM S3 production vest build.
[env:vest_s3]
extends = env:_atom_s3
build_flags =
${env:_atom_s3.build_flags}
-DJL_CONFIG=VEST
-DBOOT_NAME=VEST-S3
# ATOM S3 development vest build.
# Uses lower LED brightness to not overload computer USB, and disables button lock.
[env:vest_s3_dev]
extends = env:_atom_s3
build_flags =
${env:_atom_s3.build_flags}
-DJL_CONFIG=VEST
-DBOOT_NAME=DEV-S3
-DJL_DEV=1
# ATOM S3 debug vest build for stepping though code.
[env:vest_s3_debug]
extends = env:vest_s3_dev
debug_tool = esp-builtin
debug_speed = 12000
build_type = debug
build_flags =
${env:vest_s3_dev.build_flags}
'-UBOOT_NAME -DBOOT_NAME=DEBUG-S3'
-DCORE_DEBUG_LEVEL=5
-DARDUINO_USB_MODE=1
-DJL_DEBUG=1
# ATOM Matrix production clouds build.
[env:clouds]
extends = env:_atom_matrix
build_flags =
${env:_atom_matrix.build_flags}
-DJL_CONFIG=CLOUDS
-DBOOT_NAME=CLOUDS
lib_deps =
${env:_atom_matrix.lib_deps}
# Normally we'd include this by adding "ESP Async WebServer" but that version fails to link due to missing SHA1 dependencies.
https://github.com/me-no-dev/ESPAsyncWebServer.git
# ATOM Matrix development clouds build.
[env:clouds_dev]
extends = env:clouds
build_flags =
${env:clouds.build_flags}
'-UBOOT_NAME -DBOOT_NAME=CLOUDS-DEV'
-DJL_DEV=1
# ATOM S3 production clouds build.
[env:clouds_s3]
extends = env:_atom_s3
build_flags =
${env:_atom_s3.build_flags}
-DJL_CONFIG=CLOUDS
-DBOOT_NAME=CLOUDS3
lib_deps =
${env:_atom_s3.lib_deps}
# Normally we'd include this by adding "ESP Async WebServer" but that version fails to link due to missing SHA1 dependencies.
https://github.com/me-no-dev/ESPAsyncWebServer.git
# ATOM S3 development clouds build.
[env:clouds_s3_dev]
extends = env:clouds_s3
build_flags =
${env:clouds_s3.build_flags}
'-UBOOT_NAME -DBOOT_NAME=CLOUDS3-DEV'
-DJL_DEV=1
# ATOM S3 development debug build.
[env:clouds_s3_debug]
extends = env:clouds_s3_dev
debug_tool = esp-builtin
debug_speed = 12000
build_type = debug
build_flags =
${env:clouds_s3_dev.build_flags}
'-UBOOT_NAME -DBOOT_NAME=CLOUDS3-DBG'
-DCORE_DEBUG_LEVEL=5
-DARDUINO_USB_MODE=1
-DJL_DEBUG=1
# ATOM Matrix production Xmas tree build.
[env:xmas_tree]
extends = env:_atom_matrix
build_flags =
${env:_atom_matrix.build_flags}
-DJL_CONFIG=XMAS_TREE
-DBOOT_NAME=XMAS-TREE
# ATOM Matrix production rotary phone build.
[env:phone]
extends = env:_atom_matrix
build_flags =
${env:_atom_matrix.build_flags}
-DJL_CONFIG=PHONE
-DBOOT_NAME=PHONE
# ATOM S3 production rotary phone build.
[env:phone_s3]
extends = env:_atom_s3
build_flags =
${env:_atom_s3.build_flags}
-DJL_CONFIG=PHONE
-DBOOT_NAME=PHONES3
# ATOM S3 development debug build.
[env:phone_s3_debug]
extends = env:phone_s3
debug_tool = esp-builtin
debug_speed = 12000
build_type = debug
build_flags =
${env:phone_s3.build_flags}
'-UBOOT_NAME -DBOOT_NAME=PHONES3-DBG'
-DCORE_DEBUG_LEVEL=5
-DARDUINO_USB_MODE=1
-DJL_DEBUG=1
# Core2AWS production build parameters. Will not build on its own.
[env:_core2aws]
extends = env:_arduino
board = m5stack-core2
monitor_filters = esp32_exception_decoder, time
upload_speed = 1500000
upload_port = hwgrep://^(/dev/cu\.usbserial-.{8}|/dev/ttyUSB.+|COM.+)$
monitor_port = ${this.upload_port}
# Increase available flash size by disabling Over The Air install option.
board_build.partitions = huge_app.csv
build_flags =
${env:_arduino.build_flags}
-DJL_CONTROLLER=CORE2AWS
lib_deps =
${env:_arduino.lib_deps}
m5stack/M5Core2
# Core2AWS production gauntlet build.
[env:gauntlet]
extends = env:_core2aws
build_flags =
${env:_core2aws.build_flags}
-DJL_CONFIG=GAUNTLET
-DBOOT_NAME=GAUNTLET
# Main Core2AWS development build for gauntlet.
# Uses lower LED brightness to not overload computer USB, disables button lock.
[env:gauntlet_dev]
extends = env:_core2aws
build_flags =
${env:_core2aws.build_flags}
-DJL_CONFIG=GAUNTLET
-DBOOT_NAME=GNTLT-DEV
-DJL_DEV=1
# Core2AWS development build for gauntlet with Ethernet support.
[env:gauntlet_ethernet]
extends = env:gauntlet_dev
lib_deps =
${env:gauntlet_dev.lib_deps}
arduino-libraries/Ethernet
build_flags =
${env:gauntlet_dev.build_flags}
'-UBOOT_NAME -DBOOT_NAME=GNTLT-ETH'
-DJL_CORE2AWS_ETHERNET=1
# Core2AWS development build for gauntlet with Ethernet support.
[env:gauntlet_esp_ethernet_only]
extends = env:gauntlet_dev
build_flags =
${env:gauntlet_dev.build_flags}
'-UBOOT_NAME -DBOOT_NAME=GNTLT-ETHO'
-DJL_CORE2AWS_ETHERNET=1
-DJL_ETHERNET=1
-DJL_ESP32_ETHERNET=1
-DJL_WIFI=0
-DJL_DISABLE_BLUETOOTH=1
# M5Stamp Pico production vest build.
# This requires using the M5Stack USB ESP32 Downloader Kit
# https://docs.m5stack.com/en/accessory/esp32_downloader_kit
# You also need to install the drivers that match the driver chip (CP2104 or CH9102).
[env:m5stamp_pico]
extends = env:_arduino
board = m5stamp-pico
upload_port = hwgrep://^/dev/cu\.wchusbserial\d{11}$
monitor_port = ${this.upload_port}
# Increase available flash size from 1.25MB to 3MB
# by disabling Over The Air install option.
board_build.partitions = atom_matrix_partition_table.csv
build_flags =
${env:_arduino.build_flags}
-DJL_CONFIG=VEST
-DBOOT_NAME=PICO
-DJL_CONTROLLER=M5STAMP_PICO
# M5Stamp C3U production vest build.
[env:m5stamp_c3u]
extends = env:_arduino
board = adafruit_qtpy_esp32c3
upload_port = hwgrep://^/dev/cu\.(usb|)modem\d{3,7}$
monitor_port = ${this.upload_port}
# Increase available flash size from 1.25MB to 3MB
# by disabling Over The Air install option.
board_build.partitions = atom_matrix_partition_table.csv
build_flags =
${env:_arduino.build_flags}
-DJL_CONFIG=VEST
-DBOOT_NAME=C3U
-DJL_CONTROLLER=M5STAMP_C3U
[env:vest_idf5]
extends = env:_embedded
framework = arduino
# The official espressif32 platform from platformio is no longer tracking updates to ESP-IDF or the espressif
# Arduino core, so it is stuck on ESP-IDF v4 and the Arduino core v2. We instead use the unofficial pioarduino
# platform which is kept in sync. More details here:
# https://github.com/platformio/platform-espressif32/issues/1225
platform = https://github.com/pioarduino/platform-espressif32/releases/download/53.03.10/platform-espressif32.zip
board = m5stack-atom
upload_speed = 1500000
board_build.partitions = atom_matrix_partition_table.csv
build_flags =
${env:_embedded.build_flags}
-DJL_CONTROLLER=ATOM_MATRIX
-DJL_CONFIG=VEST
-DBOOT_NAME=VEST-IDF
[env:vest_idf5_esp_ethernet_only]
extends = env:vest_idf5
build_flags =
${env:vest_idf5.build_flags}
'-UBOOT_NAME -DBOOT_NAME=ETHOD5'
-DJL_DEV=1
-DJL_ETHERNET=1
-DJL_ESP32_ETHERNET=1
-DJL_WIFI=0
[env:vest_idf5_espidf]
extends = env:vest_idf5
framework = espidf, arduino
board_build.embed_txtfiles =
managed_components/espressif__esp_insights/server_certs/https_server.crt
managed_components/espressif__esp_rainmaker/server_certs/rmaker_mqtt_server.crt
managed_components/espressif__esp_rainmaker/server_certs/rmaker_claim_service_server.crt
managed_components/espressif__esp_rainmaker/server_certs/rmaker_ota_server.crt
[env:vest_idf5_espidf_esp_ethernet_only]
extends = env:vest_idf5_espidf
build_flags =
${env:vest_idf5_espidf.build_flags}
'-UBOOT_NAME -DBOOT_NAME=ETHODEI5'
-DJL_DEV=1
-DJL_ETHERNET=1
-DJL_ESP32_ETHERNET=1
-DJL_WIFI=0
# Custom configs for multi-device testing.
[env:ds33_dev_a]
extends = env:vest_dev
upload_port = /dev/cu.usbserial-755264D6FA
monitor_port = ${this.upload_port}
[env:ds33_dev_b]
extends = env:vest_dev
upload_port = /dev/cu.usbserial-2D526B01AC
monitor_port = ${this.upload_port}
# Config for running on the host OS that runs PlatformIO.
[env:native]
platform = native
build_flags =
-std=c++20
-DJL_CONFIG=NONE
-DJL_CONTROLLER=NATIVE