forked from DavidSchinazi/jazzlights
-
Notifications
You must be signed in to change notification settings - Fork 0
/
platformio.ini
340 lines (308 loc) · 10.3 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
[platformio]
# These default envs are run by GitHub automation on all commits.
default_envs = atom_matrix, atom_matrix_dev, atom_matrix_instrumentation, esp8266, core2aws
[env]
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
build_flags =
-DJAZZLIGHTS_PLATFORMIO=1
-DWEARABLE=1
-DMAX_MILLIWATTS=9200 # Default power limit for USB-powered wearables is 9W
# Power levels used for MAX_MILLIWATTS are approximate.
# The FastLED power calculation algorithm is not entirely accurate,
# and probably not calibrated for the LED strips we use.
# Main ATOM Matrix production build.
[env:atom_matrix]
platform = espressif32
board = pico32
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
build_flags =
${env.build_flags}
-DBOOT_NAME=GECKO
# ATOM Matrix build designed to boot into the calibration mode suitable for building vests.
[env:atom_matrix_calibrate]
extends = env:atom_matrix
build_flags =
${env:atom_matrix.build_flags}
-DSTART_SPECIAL=1
-DBUTTON_LOCK=0
'-UBOOT_NAME -DBOOT_NAME=FAB'
# Main ATOM Matrix development build
# Uses lower LED brightness to not overload computer USB.
# Disables button lock.
[env:atom_matrix_dev]
# Power limit of 4200 mW for the LEDs
# (plus about another 300 mW for the M5Stack ATOM Matrix ESP32 and its display)
# empirically determined not to overload the USB port on a laptop computer during development
extends = env:atom_matrix
build_flags =
${env:atom_matrix.build_flags}
'-UMAX_MILLIWATTS -DMAX_MILLIWATTS=4200' # Reduce power limit to 4W for host-connected development boards
'-UBOOT_NAME -DBOOT_NAME=DEV'
-DFIRST_BRIGHTNESS=0
-DBUTTON_LOCK=0
# ATOM Matrix debug build for stepping though code.
[env:atom_matrix_debug]
extends = env:atom_matrix_dev
build_type = debug
build_flags =
${env:atom_matrix_dev.build_flags}
'-UBOOT_NAME -DBOOT_NAME=DEBUG'
# ATOM Matrix build that saves and logs timing information about the arduino loop.
[env:atom_matrix_timing]
extends = env:atom_matrix_dev
build_flags =
${env:atom_matrix_dev.build_flags}
'-UBOOT_NAME -DBOOT_NAME=TIMING'
-DJL_TIMING=1
# ATOM Matrix build with custom FreeRTOS settings to enable instrumentation.
# This uses our local sdkconfig instead of the default Arduino one here:
# https://github.com/espressif/arduino-esp32/blob/master/tools/sdk/esp32/sdkconfig
[env:atom_matrix_instrumentation]
extends = env:atom_matrix_timing
framework = espidf, arduino
build_flags =
${env:atom_matrix_timing.build_flags}
'-UBOOT_NAME -DBOOT_NAME=INSTRUMENT'
-DJL_INSTRUMENTATION=1
[env:atom_matrix_ethernet_dev]
extends = env:atom_matrix_dev
lib_deps =
${env:atom_matrix_dev.lib_deps}
arduino-libraries/Ethernet
build_flags =
${env:atom_matrix_dev.build_flags}
'-DJAZZLIGHTS_ARDUINO_ETHERNET=1'
'-UBOOT_NAME -DBOOT_NAME=ETHD'
# ATOM Matrix production configuration for gecko foot on stage.
[env:atom_matrix_gecko_foot]
extends = env:atom_matrix
build_flags =
${env:atom_matrix.build_flags}
'-DGECKO_SCALES=1'
'-DGECKO_FOOT=1'
'-UMAX_MILLIWATTS'
'-UBOOT_NAME -DBOOT_NAME=FOOT'
# ATOM Matrix development configuration for gecko foot on stage.
[env:atom_matrix_gecko_foot_dev]
extends = env:atom_matrix_dev
build_flags =
${env:atom_matrix_dev.build_flags}
'-DGECKO_SCALES=1'
'-DGECKO_FOOT=1'
'-UMAX_MILLIWATTS'
'-UBOOT_NAME -DBOOT_NAME=FOOT-DEV'
# ATOM Matrix build for gecko foot with timing information.
[env:atom_matrix_gecko_foot_timing]
extends = env:atom_matrix_timing
build_flags =
${env:atom_matrix_timing.build_flags}
'-DGECKO_SCALES=1'
'-DGECKO_FOOT=1'
'-UMAX_MILLIWATTS'
'-UBOOT_NAME -DBOOT_NAME=FOOT-TIMING'
# ATOM Matrix production configuration for caboose wall with timing information.
[env:atom_matrix_caboose_wall]
extends = env:atom_matrix_timing
build_flags =
${env:atom_matrix_timing.build_flags}
'-DCABOOSE_LIGHTS=1'
'-DIS_CABOOSE_WALL=1'
'-UMAX_MILLIWATTS'
'-UBOOT_NAME -DBOOT_NAME=CABOOSE_WALL'
# ATOM Matrix build with custom FreeRTOS settings to enable instrumentation.
# See atom_matrix_instrumentation above for more details.
[env:atom_matrix_gecko_foot_instrumentation]
extends = env:atom_matrix_instrumentation
build_flags =
${env:atom_matrix_instrumentation.build_flags}
'-DGECKO_SCALES=1'
'-DGECKO_FOOT=1'
'-UMAX_MILLIWATTS'
'-UBOOT_NAME -DBOOT_NAME=FOOT-INSTR'
# ATOM Matrix build for robot with timing information.
[env:atom_matrix_robot_timing]
extends = env:atom_matrix_timing
build_flags =
${env:atom_matrix_timing.build_flags}
'-DGECKO_SCALES=1'
'-DIS_ROBOT=1'
'-UMAX_MILLIWATTS'
'-UBOOT_NAME -DBOOT_NAME=ROBOT-TIMING'
# ATOM Matrix build with custom FreeRTOS settings to enable instrumentation with robot scales.
# See atom_matrix_instrumentation above for more details.
[env:atom_matrix_robot_instrumentation]
extends = env:atom_matrix_instrumentation
build_flags =
${env:atom_matrix_instrumentation.build_flags}
'-DGECKO_SCALES=1'
'-DIS_ROBOT=1'
'-UMAX_MILLIWATTS'
'-UBOOT_NAME -DBOOT_NAME=ROBOT-INSTR'
# ATOM Matrix production configuration for staff.
[env:atom_matrix_staff]
extends = env:atom_matrix
build_flags =
${env:atom_matrix.build_flags}
'-DIS_STAFF=1'
'-UBOOT_NAME -DBOOT_NAME=STAFF'
'-UMAX_MILLIWATTS -DMAX_MILLIWATTS=300' # Significantly reduce power limit since this is 24V and 6 LEDs per pixel.
-DFIRST_BRIGHTNESS=3
# ATOM Matrix production configuration for the captain hat.
[env:atom_matrix_captain_hat]
extends = env:atom_matrix
build_flags =
${env:atom_matrix.build_flags}
'-DIS_CAPTAIN_HAT=1'
'-UBOOT_NAME -DBOOT_NAME=CPT-HAT'
# ATOM Matrix production configuration for camp sign.
[env:atom_matrix_camp_sign]
extends = env:atom_matrix
build_flags =
${env:atom_matrix.build_flags}
-DCAMP_SIGN=1
-UMAX_MILLIWATTS # Don't need power management for camp sign
'-UBOOT_NAME -DBOOT_NAME=CAMPSIGN'
# ATOM Matrix production configuration for rope light.
[env:atom_matrix_ropelight]
extends = env:atom_matrix
build_flags =
${env:atom_matrix.build_flags}
'-DIS_ROPELIGHT=1'
'-UMAX_MILLIWATTS'
'-UBOOT_NAME -DBOOT_NAME=ROPE'
# ATOM Matrix production configuration for guppy.
[env:atom_matrix_guppy]
extends = env:atom_matrix
build_flags =
${env:atom_matrix.build_flags}
-DIS_GUPPY=1
-UMAX_MILLIWATTS # Don't need power management for guppy
'-UBOOT_NAME -DBOOT_NAME=GUPPY'
# ATOM Matrix production configuration for hammer.
[env:atom_matrix_hammer]
extends = env:atom_matrix
build_flags =
${env:atom_matrix.build_flags}
-DHAMMER=1
-DGLOW_ONLY=1
'-UBOOT_NAME -DBOOT_NAME=HAMMER'
# ATOM Matrix production configuration for Fairy Wand.
[env:atom_matrix_wand]
extends = env:atom_matrix
build_flags =
${env:atom_matrix.build_flags}
-DFAIRY_WAND=1
'-UBOOT_NAME -DBOOT_NAME=WAND'
[env:atom_lite]
extends = env:atom_matrix
build_flags =
${env:atom_matrix.build_flags}
-DATOM_MATRIX_SCREEN=0
-DBUTTONS_DISABLED=1
'-UBOOT_NAME -DBOOT_NAME=LITE'
# Main Core2AWS production build for gauntlet.
[env:core2aws]
platform = espressif32
board = esp32dev
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.build_flags}
-DBOOT_NAME=GAUNTLET
-DCORE2AWS=1
-DIS_GAUNTLET=1
lib_deps =
${env.lib_deps}
m5stack/M5Core2
# Main Core2AWS development build for gauntlet.
# Uses lower LED brightness to not overload computer USB.
# Disables button lock.
[env:core2aws_dev]
extends = env:core2aws
build_flags =
${env:core2aws.build_flags}
'-UMAX_MILLIWATTS -DMAX_MILLIWATTS=4200' # Reduce power limit to 4W for host-connected development boards
'-UBOOT_NAME -DBOOT_NAME=GAUNTLET-DEV'
-DFIRST_BRIGHTNESS=0
-DBUTTON_LOCK=0
# M5Stamp Pico
# 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:atom_matrix
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.build_flags}
-DBOOT_NAME=PICO
-DM5STAMP_PICO=1
# M5Stamp C3U
[env:m5stamp_c3u]
extends = env:atom_matrix
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.build_flags}
-DATOM_MATRIX_SCREEN=0
-DBUTTONS_DISABLED=1
-DBOOT_NAME=C3U
-DM5STAMP_C3U=1
# Main production build for the 2017 controllers.
[env:esp8266]
platform = espressif8266
board = nodemcuv2
monitor_filters = esp8266_exception_decoder, time
upload_port = hwgrep://^(/dev/cu\.usbserial-.{4}|/dev/ttyUSB.+|COM.+)$
monitor_port = ${this.upload_port}
# Main development build for the 2017 controllers.
[env:esp8266_dev]
extends = env:esp8266
build_flags =
${env:esp8266.build_flags}
'-UMAX_MILLIWATTS -DMAX_MILLIWATTS=4200'
-DFIRST_BRIGHTNESS=0
# ESP8266 production configuration for ropelight.
[env:esp8266_ropelight]
extends = env:esp8266
build_flags =
${env:esp8266.build_flags}
'-DIS_ROPELIGHT=1'
'-UMAX_MILLIWATTS'
'-UBOOT_NAME -DBOOT_NAME=ROPE'
# Custom configs for multi-device testing.
[env:ds33_dev_a]
extends = env:atom_matrix_dev
upload_port = /dev/cu.usbserial-755264D6FA
monitor_port = ${this.upload_port}
[env:ds33_dev_b]
extends = env:atom_matrix_dev
upload_port = /dev/cu.usbserial-2D526B01AC
monitor_port = ${this.upload_port}