-
Notifications
You must be signed in to change notification settings - Fork 212
/
platformio.ini
466 lines (422 loc) · 12.5 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
; * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
; PlatformIO Project Configuration file for GUIslice
; - https://github.com/ImpulseAdventure/GUIslice
;
; - This file will be used to select the MCU, Display
; and Touch drivers to use with GUIslice
;
; * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
; =========================================================
; Section 1: PlatformIO GENERAL SETTINGS
; =========================================================
[platformio]
; Source files to build:
; - Path to main application code or
; one of the GUIslice examples to run
;
;src_dir = examples/arduino/ex01_ard_basic
;src_dir = examples/arduino/ex02_ard_btn_txt
src_dir = examples/arduino/ex04_ard_ctrls
;src_dir = examples/arduino/ex07_ard_slider
;src_dir = ...
; Extra config:
; - PlatformIO config to build from project root
lib_dir = .
; Default environments to load
;default_envs =
; Arduino-ILI9341-STMPE610
; ESP32-TFT_eSPI-STMPE610
[env]
; GUIslice compilation more straightforward in "deep" LDF mode
lib_ldf_mode = deep
; To enable inspect/cppcheck w/o LTO1 error, disable LTO
build_unflags =
; -flto
; ---------------------------------------------------------
[common]
; Define any additional compilation flags here
build_flags =
; -Wall
; -Wextra
; -Wunused-variable
; =========================================================
; Section 2: UPLOAD SETTINGS
; =========================================================
[upload-avrisp]
; Board default is:
; - upload_protocol = arduino
upload_protocol = stk500v2
upload_flags =
-Pusb
; =========================================================
; Section 3: DISPLAY DRIVERS
; =========================================================
; ---------------------------------------------------------
; Display: Adafruit/Adafruit_ILI9341
; ---------------------------------------------------------
; NOTE:
; - Need to use lib_ldf_mode=deep otherwise the Adafruit
; libraries report "no such file" compilation errors on
; "Adafruit_I2CDevice.h"
[disp-ILI9341]
lib_deps =
SPI
Wire
adafruit/Adafruit BusIO
adafruit/Adafruit GFX Library
adafruit/Adafruit ILI9341
adafruit/Adafruit STMPE610
build_flags =
; ---------------------------------------------------------
; Display: prenticedavid/MCUFRIEND_kbv
; ---------------------------------------------------------
[disp-mcufriend]
lib_deps =
Wire
adafruit/Adafruit BusIO
adafruit/Adafruit GFX Library
prenticedavid/MCUFRIEND_kbv
build_flags =
; ---------------------------------------------------------
; Display: ILI9341_t3
; ---------------------------------------------------------
[disp-ILI9341_t3]
; NOTE (lib_deps):
; - Need to specify the github sources otherwise PIO
; compilation reports "no such file" on SPI.h
lib_deps =
https://github.com/PaulStoffregen/Wire
https://github.com/PaulStoffregen/SPI
https://github.com/PaulStoffregen/ILI9341_t3
build_flags =
; ---------------------------------------------------------
; Display: bodmer/TFT_eSPI
; ---------------------------------------------------------
[disp-TFT_eSPI]
lib_deps =
TFT_eSPI
; TFT_eSPI display configuration
; - Example from: Setup1_ILI9341-cal-esp32-feather.h
; Adafruit Feather ESP32 + Adafruit 2.4" Featherwing TFT
;
; - If using TFT_eSPI, configure to match the settings in the
; User Setup included within TFT_eSPI/User_Setup_Select.h
; - You must use "-DUSER_SETUP_LOADED=1" here to disable the
; default config files within TFT_eSPI from being used.
build_flags =
-D USER_SETUP_LOADED=1
-D ILI9341_DRIVER
-D TFT_CS=15
-D TFT_DC=33
-D TFT_RST=-1
-D TFT_MOSI=18
-D TFT_SCLK=5
-D TOUCH_CS=32
-D LOAD_GLCD
-D LOAD_FONT2
-D LOAD_FONT4
-D LOAD_FONT6
-D LOAD_FONT7
-D LOAD_FONT8
-D LOAD_GFXFF
-D SMOOTH_FONT
-D SPI_FREQUENCY=40000000
-D SPI_READ_FREQUENCY=20000000
-D SPI_TOUCH_FREQUENCY=2500000
-D SUPPORT_TRANSACTIONS
; ---------------------------------------------------------
; Display: M5stack/m5stack
; ---------------------------------------------------------
[disp-M5Stack]
lib_deps =
m5stack/M5Stack
build_flags =
; =========================================================
; Section 4: TOUCH DRIVERS
; =========================================================
; ---------------------------------------------------------
; Touch: Adafruit/Adafruit_STMPE610
; ---------------------------------------------------------
[touch-STMPE610]
lib_deps =
Wire
adafruit/Adafruit STMPE610
build_flags =
; ---------------------------------------------------------
; Touch: Adafruit/Adafruit_FT6206
; ---------------------------------------------------------
[touch-FT6206]
lib_deps =
Wire
adafruit/Adafruit FT6206 Library
build_flags =
; ---------------------------------------------------------
; Touch: Adafruit/Adafruit_Touchscreen (4wire)
; ---------------------------------------------------------
[touch-4wire]
lib_deps =
adafruit/Adafruit TouchScreen
build_flags =
; ---------------------------------------------------------
; Touch: PaulStoffregen/XPT2046_Touchscreen
; ---------------------------------------------------------
[touch-XPT2046_ps]
lib_deps =
PaulStoffregen/XPT2046_Touchscreen
build_flags =
; ---------------------------------------------------------
; Touch: None
; ---------------------------------------------------------
[touch-none]
lib_deps =
build_flags =
; =========================================================
; Section 5: MCU Settings
;
; - For additional settings, please refer to:
; https://docs.platformio.org/en/latest/boards/index.html
;
; =========================================================
; ---------------------------------------------------------
; MCU: "Arduino"
; - Includes:
; - Atmel AVR
; - Arduino UNO (board=uno)
; - Atmel megaAVR
; - ATmega2560 (board=ATmega2560)
; - Atmel SAM
; - Adafruit Grand Central M4 (board=adafruit_grandcentral_m4)
; - Arduino Due (board=due)
; - Arduino Zero (board=zero
; - etc.
; ---------------------------------------------------------
[mcu-Arduino]
platform = atmelavr
board = ATmega2560
framework = arduino
extends = upload-avrisp
; ---------------------------------------------------------
; MCU: ESP32
; - Includes:
; - Adafruit ESP32 Feather (board=featheresp32)
; - etc.
; ---------------------------------------------------------
[mcu-ESP32]
platform = espressif32
board = featheresp32
framework = arduino
; ---------------------------------------------------------
; MCU: M5Stack (ESP32)
; - Includes:
; - M5stack (board=m5stack-core-esp32)
; - etc.
; ---------------------------------------------------------
[mcu-M5Stack]
platform = espressif32
board = m5stack-core-esp32
framework = arduino
; ---------------------------------------------------------
; MCU: Teensy
; - Includes:
; - Teensy 3.1/3.2 (board=teensy31)
; - Teensy 4.0 (board=teensy40)
; - etc.
; ---------------------------------------------------------
[mcu-Teensy]
platform = teensy
board = teensy31
framework = arduino
; Disable ks0108 as PIO compile for T3 will fail even
; though the ks0108 library is not being used/included.
lib_ignore = ks0108
; =========================================================
; Section 6: ENVIRONMENTS
; =========================================================
; ---------------------------------------------------------
; PlatformIO Example GUIslice Environments
;
; - The following section contains a few example
; environment configurations that combine a
; MCU, Display and Touch driver while also loading
; a corresponding example config from GUIslice.
; - The GUIslice configuration is pulled from the
; associated GUIslice /configs/ file.
; - If you have an existing GUIslice config file,
; it is relatively easy to add your own environment
; here to load the config.
; ---------------------------------------------------------
[env:Arduino-ILI9341-STMPE610]
extends = mcu-Arduino
lib_deps =
${disp-ILI9341.lib_deps}
${touch-STMPE610.lib_deps}
build_flags =
${common.build_flags}
${disp-ILI9341.build_flags}
${touch-STMPE610.build_flags}
-D USER_CONFIG_LOADED
-D USER_CONFIG_INC_FILE
-D USER_CONFIG_INC_FNAME=\"../configs/ard-shld-adafruit_28_res.h\"
[env:Arduino-ILI9341-FT6206]
extends = mcu-Arduino
lib_deps =
${disp-ILI9341.lib_deps}
${touch-FT6206.lib_deps}
build_flags =
${common.build_flags}
${disp-ILI9341.build_flags}
${touch-FT6206.build_flags}
-D USER_CONFIG_LOADED
-D USER_CONFIG_INC_FILE
-D USER_CONFIG_INC_FNAME=\"../configs/ard-shld-adafruit_28_cap.h\"
[env:Arduino-mcufriend-NoTouch]
extends = mcu-Arduino
lib_deps =
${disp-mcufriend.lib_deps}
build_flags =
${common.build_flags}
${disp-mcufriend.build_flags}
-D USER_CONFIG_LOADED
-D USER_CONFIG_INC_FILE
-D USER_CONFIG_INC_FNAME=\"../configs/ard-shld-mcufriend.h\"
[env:Arduino-mcufriend-4wire]
extends = mcu-Arduino
lib_deps =
${disp-mcufriend.lib_deps}
${touch-4wire.lib_deps}
build_flags =
${common.build_flags}
${disp-mcufriend.build_flags}
${touch-4wire.build_flags}
-D USER_CONFIG_LOADED
-D USER_CONFIG_INC_FILE
-D USER_CONFIG_INC_FNAME=\"../configs/ard-shld-mcufriend_4wire.h\"
; TODO: Determine why the override isn't working
; Undefine some settings so we can override
; -U ADATOUCH_PIN_YP
; -U ADATOUCH_PIN_XM
; -U ADATOUCH_PIN_YM
; -U ADATOUCH_PIN_XP
; -U ADATOUCH_X_MIN
; -U ADATOUCH_X_MAX
; -U ADATOUCH_Y_MIN
; -U ADATOUCH_Y_MAX
; Provide new pinout & calibration
; -D ADATOUCH_PIN_YP = A1
; -D ADATOUCH_PIN_XM = A2
; -D ADATOUCH_PIN_YM = 7
; -D ADATOUCH_PIN_XP = 6
; -D ADATOUCH_X_MIN = 145
; -D ADATOUCH_X_MAX = 905
; -D ADATOUCH_Y_MIN = 937
; -D ADATOUCH_Y_MAX = 165
[env:Teensy-ILI9341_t3-NoTouch]
extends = mcu-Teensy
lib_deps =
${disp-ILI9341_t3.lib_deps}
build_flags =
${common.build_flags}
${disp-ILI9341_t3.build_flags}
-D USER_CONFIG_LOADED
-D USER_CONFIG_INC_FILE
-D USER_CONFIG_INC_FNAME=\"../configs/teensy-adagfx-ili9341_t3-NoTouch-audio.h\"
[env:Teensy-ILI9341_t3-XPT2046]
extends = mcu-Teensy
lib_deps =
${disp-ILI9341_t3.lib_deps}
${touch-XPT2046_ps.lib_deps}
build_flags =
${common.build_flags}
${disp-ILI9341_t3.build_flags}
${touch-XPT2046_ps.build_flags}
-D USER_CONFIG_LOADED
-D USER_CONFIG_INC_FILE
-D USER_CONFIG_INC_FNAME=\"../configs/teensy-adagfx-ili9341_t3-xpt2046-audio.h\"
[env:ESP32-TFT_eSPI-STMPE610]
extends = mcu-ESP32
lib_deps =
${disp-TFT_eSPI.lib_deps}
${touch-STMPE610.lib_deps}
build_flags =
${common.build_flags}
${disp-TFT_eSPI.build_flags}
${touch-STMPE610.build_flags}
-D USER_CONFIG_LOADED=1
-D USER_CONFIG_INC_FILE=1
-D USER_CONFIG_INC_FNAME=\"../configs/esp-shld-adafruit_24_feather_touch-espi.h\"
[env:M5Stack-M5Stack-NoTouch]
extends = mcu-M5Stack
lib_deps =
${disp-M5Stack.lib_deps}
build_flags =
${common.build_flags}
${disp-M5Stack.build_flags}
-D USER_CONFIG_LOADED=1
-D USER_CONFIG_INC_FILE=1
-D USER_CONFIG_INC_FNAME=\"../configs/esp-shld-m5stack.h\"
; ---------------------------------------------------------
; PlatformIO Custom GUIslice Environment
;
; - Instead of using a GUIslice config file directly, an
; alternative approach is to define all of the GUIslice
; config settings here in a custom environment.
; - The settings here match the same ones found in the
; GUIslice config. To convert between the formats:
;
; GUIslice config platformio config
; ----------------------- --------------------
; #define <PARAM> -D <PARAM>
; #define <PARAM> <VALUE> -D <PARAM>=<VALUE>
;
; ---------------------------------------------------------
[env:CustomConfig]
; Define your MCU, Display Driver and Touch Driver here
extends = mcu-Arduino
lib_deps =
${disp-ILI9341.lib_deps}
${touch-STMPE610.lib_deps}
build_flags =
${common.build_flags}
${disp-ILI9341.build_flags}
${touch-STMPE610.build_flags}
; Specify your user config details here
; Example from /configs/ard-shld-adafruit_28_res.h
-D USER_CONFIG_LOADED
-D DRV_DISP_ADAGFX
-D DRV_DISP_ADAGFX_ILI9341
-D DRV_TOUCH_ADA_STMPE610
-D ADAGFX_PIN_CS=10
-D ADAGFX_PIN_DC=9
-D ADAGFX_PIN_RST=0
-D ADAGFX_SPI_HW=1
-D ADAGFX_PIN_MOSI=11
-D ADAGFX_PIN_MISO=12
-D ADAGFX_PIN_CLK=13
-D ADAGFX_PIN_SDCS=4
-D GSLC_ROTATE=1
-D ADATOUCH_I2C_HW=0
-D ADATOUCH_SPI_HW=1
-D ADATOUCH_SPI_SW=0
-D ADATOUCH_I2C_ADDR=0x41
-D ADATOUCH_PIN_CS=8
-D ADATOUCH_X_MIN=244
-D ADATOUCH_X_MAX=3858
-D ADATOUCH_Y_MIN=141
-D ADATOUCH_Y_MAX=3717
-D ADATOUCH_REMAP_YX=0
-D DEBUG_ERR=1
-D GSLC_FEATURE_COMPOUND=0
-D GSLC_FEATURE_XTEXTBOX_EMBED=0
-D GSLC_FEATURE_INPUT=0
-D GSLC_SD_EN=0
-D GSLC_TOUCH_MAX_EVT=1
-D GSLC_SD_BUFFPIXEL=50
-D GSLC_CLIP_EN=1
-D GSLC_BMP_TRANS_EN=1
-D GSLC_BMP_TRANS_RGB=0xFF,0x00,0xFF
-D GSLC_USE_FLOAT=0
-D GSLC_DEV_TOUCH=\"\"
-D GSLC_USE_PROGMEM=1
-D GSLC_LOCAL_STR=0
-D GSLC_LOCAL_STR_LEN=30
; ...