-
-
Notifications
You must be signed in to change notification settings - Fork 269
/
platformio.ini
161 lines (144 loc) · 5.05 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
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[platformio]
src_dir = firmware/src
lib_dir = firmware/lib
include_dir = firmware/include
test_dir = firmware/test
data_dir = firmware/data
; Note: change this to the target environment to get VSCode to handle code
; completion, etc, correctly.
default_envs = chainlink
[extra]
lib_deps =
Adafruit [email protected]
; Note: the Arduino Uno builds are temporarily disabled (legacy .ino files are being cleaned up and only platformio will be supported going forward)
; Go back to 6c1e1913cbfc23ee90155410a65ac26e2389134f for the last stable version that supported them in the meantime.
;
; [env:uno-shift-register]
; platform = atmelavr
; board = uno
; framework = arduino
; monitor_speed = 38400
; monitor_echo = yes
; monitor_eol = LF
; lib_deps = ${extra.lib_deps}
; build_flags =
; -DSPI_IO=true
; -DREVERSE_MOTOR_DIRECTION=false
; -DNEOPIXEL_DEBUGGING_ENABLED=true
; -DINA219_POWER_SENSE=false
; -DSPLITFLAP_PIO_HARDWARE_CONFIG
; [env:uno-direct]
; platform = atmelavr
; board = uno
; framework = arduino
; monitor_speed = 38400
; monitor_echo = yes
; monitor_eol = LF
; lib_deps = ${extra.lib_deps}
; build_flags =
; -DNUM_MODULES=3
; -DSPI_IO=false
; -DREVERSE_MOTOR_DIRECTION=false
; -DNEOPIXEL_DEBUGGING_ENABLED=true
; -DINA219_POWER_SENSE=false
; -DSPLITFLAP_PIO_HARDWARE_CONFIG
[esp32base]
platform = [email protected]
framework = arduino
board = esp32dev
upload_speed = 921600
monitor_speed = 230400
monitor_echo = yes
monitor_eol = LF
monitor_filters = esp32_exception_decoder
board_build.partitions = default_ffat.csv
extra_scripts =
pre:firmware/buildscript_build_info_macros.py
; This would be much cleaner if we didn't need to preserve Arduino IDE compatibility and the splitflap
; module driver could be pulled out to its own library and shared properly... Instead, we remove the
; .ino file (referred to as .ino.cpp during the build) and add additional source.
build_src_filter = +<*> -<.git/> -<.svn/> -<example/> -<examples/> -<test/> -<tests/> -<Splitflap.ino.cpp> +<../esp32/core> +<../esp32/splitflap> +<../esp32/proto_gen>
lib_deps =
bodmer/TFT_eSPI @ 2.4.25
knolleary/PubSubClient @ 2.8
bakercp/PacketSerial @ 1.4.0
nanopb/Nanopb @ 0.4.6 ; Ideally this would reference the nanopb submodule, but that would require
; everyone to check out submodules to just compile, so we use the library
; registry for the runtime. The submodule is available for manually updating
; the pre-compiled (checked in) .pb.h/c files when proto files change, but is
; otherwise not used during application firmware compilation.
build_flags =
-DSPI_IO=true
-DSPLITFLAP_PIO_HARDWARE_CONFIG
-DREVERSE_MOTOR_DIRECTION=false
; Set to true to enable MQTT support (see secrets.h.example for configuration)
-DMQTT=false
; Set to true to enable HTTP support (see secrets.h.example for configuration)
-DHTTP=false
; Set to true to enable display support for T-Display (default)
-DENABLE_DISPLAY=true
-DUSER_SETUP_LOADED=1
-DST7789_DRIVER=1
-DCGRAM_OFFSET=1
-DTFT_WIDTH=135
-DTFT_HEIGHT=240
-DTFT_MISO=-1
-DTFT_MOSI=19
-DTFT_SCLK=18
-DTFT_CS=5
-DTFT_DC=16
-DTFT_RST=23
-DTFT_BL=4
-DLOAD_GLCD=1
-DLOAD_GFXFF=1
-DSPI_FREQUENCY=40000000
[env:chainlink]
extends=esp32base
build_flags =
${esp32base.build_flags}
-DCHAINLINK
-DNUM_MODULES=6
[env:chainlinkBase]
extends=esp32base
build_src_filter = ${esp32base.build_src_filter} +<../esp32/base>
build_flags =
${esp32base.build_flags}
-DCHAINLINK
-DCHAINLINK_BASE
-DNUM_MODULES=108
-DINA219_POWER_SENSE=true
lib_deps =
${esp32base.lib_deps}
adafruit/Adafruit MCP23017 Arduino Library @ ^1.3.0
fastled/FastLED @ ^3.4.0
adafruit/Adafruit BusIO @ ^1.9.1
[env:chainlinkDriverTester]
extends=esp32base
build_src_filter = +<*> -<.git/> -<.svn/> -<example/> -<examples/> -<test/> -<tests/> -<Splitflap.ino.cpp> +<../esp32/core> +<../esp32/tester>
build_flags =
${esp32base.build_flags}
-DCHAINLINK
-DCHAINLINK_DRIVER_TESTER
-DNUM_MODULES=12
-DINA219_POWER_SENSE=true
lib_deps =
${esp32base.lib_deps}
adafruit/Adafruit MCP23017 Arduino Library @ ^1.3.0
adafruit/Adafruit BusIO @ ^1.9.1
build_type = debug
[env:esp32CustomAdvanced]
; For non-chainlink custom ESP32-based advanced builds that use shift registers but omit the Chainlink design elements like loopbacks and LEDs.
; This is not the environment you want unless you have custom non-Chainlink hardware and really know the intricacies of the shift register arrangement.
extends=esp32base
build_flags =
${esp32base.build_flags}
-DNUM_MODULES=6