/
platformio.ini
372 lines (359 loc) · 11.1 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
; 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]
lib_dir = lib
include_dir = lib
[common_env_data]
upload_speed = 921600
monitor_speed = 115200
platform = espressif8266 @ 4.2.1
platform32 = espressif32 @ 6.4.0
framework = arduino
board = d1_mini
build_unflags =
build_flags =
-Wl,-Map,output.map
-D BAUD=${common_env_data.monitor_speed}
#-D SKIP_SLEEPMODE
#-D FORCE_GRAVITY_MODE
#-D COLLECT_PERFDATA
-D ACTIVATE_OTA
-D CFG_DISABLE_LOGGING # Turn off verbose/notice logging to reduce size and dont overload uart (applies to LOG_LEVEL6)
-D GYRO_DISABLE_LOGGING
-D CALC_DISABLE_LOGGING
-D HELPER_DISABLE_LOGGING
-D PUSH_DISABLE_LOGGING
-D TSEN_DISABLE_LOGGING
-D WIFI_DISABLE_LOGGING
-D WEB_DISABLE_LOGGING
-D MAIN_DISABLE_LOGGING
-D USE_LITTLEFS=true
-D CFG_APPVER="\"1.4.1\""
#-D CFG_GITREV=\""beta-3\""
!python script/git_rev.py
lib_deps =
# Using local copy of these libraries
# https://github.com/mp-se/i2cdevlib.git#<document>
# https://github.com/mp-se/OneWire
# https://github.com/mp-se/Arduino-Temperature-Control-Library
https://github.com/mp-se/tinyexpr#v1.0.0
https://github.com/mp-se/Arduino-Log#1.1.2
https://github.com/mp-se/ArduinoJson#v6.21.3
https://github.com/mp-se/arduinoCurveFitting#v1.0.6
https://github.com/mp-se/arduino-mqtt#v2.5.1
https://github.com/mp-se/ESPAsyncWebServer#0.1.1
https://github.com/mp-se/ESPAsyncTCP#0.1.0
lib_deps32 =
https://github.com/mp-se/NimBLE-Arduino#1.4.1
extra_scripts =
script/copy_firmware.py
script/create_versionjson.py
html_files =
html/calibration.min.htm
html/config.min.htm
html/firmware.min.htm
html/format.min.htm
html/about.min.htm
html/index.min.htm
html/test.min.htm
html/backup.min.htm
html/ws.min.htm
[env:gravity-release]
upload_speed = ${common_env_data.upload_speed}
monitor_speed = ${common_env_data.monitor_speed}
framework = ${common_env_data.framework}
platform = ${common_env_data.platform}
extra_scripts = ${common_env_data.extra_scripts}
build_unflags = ${common_env_data.build_unflags}
build_flags =
${common_env_data.build_flags}
-D LOG_LEVEL=4
#-D USE_SERIAL_PINS # Use the TX/RX pins for the serial port
#-D RUN_HARDWARE_TEST # Will run diagnositc setup to validate the GPIO configurations
lib_deps =
https://github.com/mp-se/incbin#v1.0.0
${common_env_data.lib_deps}
board = ${common_env_data.board}
build_type = release
board_build.filesystem = littlefs
build_src_filter = +<*> -<../test/tests*.cpp>
monitor_filters = esp8266_exception_decoder
[env:gravity-unit]
upload_speed = ${common_env_data.upload_speed}
monitor_speed = ${common_env_data.monitor_speed}
framework = ${common_env_data.framework}
platform = ${common_env_data.platform}
extra_scripts = ${common_env_data.extra_scripts}
build_unflags = ${common_env_data.build_unflags}
build_flags =
${common_env_data.build_flags}
-D LOG_LEVEL=4
lib_deps =
https://github.com/mp-se/incbin#v1.0.0
https://github.com/bxparks/AUnit#v1.7.1
${common_env_data.lib_deps}
board = ${common_env_data.board}
build_type = debug
board_build.filesystem = littlefs
build_src_filter = +<*> -<main.cpp> +<../test/tests*.cpp>
monitor_filters = esp8266_exception_decoder
[env:gravity32-release]
framework = ${common_env_data.framework}
platform = ${common_env_data.platform32}
upload_speed = ${common_env_data.upload_speed}
monitor_speed = ${common_env_data.monitor_speed}
extra_scripts = ${common_env_data.extra_scripts}
build_unflags =
${common_env_data.build_unflags}
build_flags =
-Wl,-Map,output.map
-D CORE_DEBUG_LEVEL=2
${common_env_data.build_flags}
-D LOG_LEVEL=4
-D ESP32D1
#-DUSE_SERIAL_PINS # Use the TX/RX pins for the serial port
lib_deps =
${common_env_data.lib_deps}
${common_env_data.lib_deps32}
lib_ignore =
board = wemos_d1_mini32
build_type = release
board_build.partitions = part32.csv
board_build.filesystem = littlefs
board_build.embed_txtfiles = ${common_env_data.html_files}
[env:gravity32c3-release]
framework = ${common_env_data.framework}
platform = ${common_env_data.platform32}
upload_speed = ${common_env_data.upload_speed}
monitor_speed = ${common_env_data.monitor_speed}
extra_scripts = ${common_env_data.extra_scripts}
build_unflags =
${common_env_data.build_unflags}
build_flags =
-Wl,-Map,output.map
${common_env_data.build_flags}
-D LOG_LEVEL=4
-D CORE_DEBUG_LEVEL=2
-D ESP32C3
-D ARDUINO_ESP32C3_DEV
#-DUSE_SERIAL_PINS # Use the TX/RX pins for the serial port
lib_deps =
${common_env_data.lib_deps}
${common_env_data.lib_deps32}
lib_ignore =
board = lolin_c3_mini
build_type = release
board_build.partitions = part32.csv
board_build.filesystem = littlefs
board_build.embed_txtfiles = ${common_env_data.html_files}
[env:gravity32c3v1-release]
framework = ${common_env_data.framework}
platform = ${common_env_data.platform32}
upload_speed = ${common_env_data.upload_speed}
monitor_speed = ${common_env_data.monitor_speed}
extra_scripts = ${common_env_data.extra_scripts}
build_unflags =
${common_env_data.build_unflags}
build_flags =
-Wl,-Map,output.map
${common_env_data.build_flags}
-D LOG_LEVEL=4
-D CORE_DEBUG_LEVEL=2
-D ESP32C3
-D ARDUINO_ESP32C3_DEV
-D ESP32C3_REV1
#-D USE_SERIAL_PINS # Use the TX/RX pins for the serial port
lib_deps =
${common_env_data.lib_deps}
${common_env_data.lib_deps32}
lib_ignore =
board = lolin_c3_mini
build_type = release
board_build.partitions = part32.csv
board_build.filesystem = littlefs
board_build.embed_txtfiles = ${common_env_data.html_files}
[env:gravity32s2-release]
framework = ${common_env_data.framework}
platform = ${common_env_data.platform32}
upload_speed = ${common_env_data.upload_speed}
monitor_speed = ${common_env_data.monitor_speed}
extra_scripts = ${common_env_data.extra_scripts}
build_unflags =
${common_env_data.build_unflags}
build_flags =
-Wl,-Map,output.map
${common_env_data.build_flags}
-D LOG_LEVEL=4
-D CORE_DEBUG_LEVEL=2
-D ESP32S2
-D ARDUINO_ESP32S2_DEV
#-D USE_SERIAL_PINS # Use the TX/RX pins for the serial port
#-D RUN_HARDWARE_TEST # Will run diagnositc setup to validate the GPIO configurations
lib_deps =
${common_env_data.lib_deps}
lib_ignore =
board = lolin_s2_mini
build_type = release
board_build.partitions = part32.csv
board_build.filesystem = littlefs
board_build.embed_txtfiles = ${common_env_data.html_files}
[env:gravity32s3-release]
framework = ${common_env_data.framework}
platform = ${common_env_data.platform32}
upload_speed = ${common_env_data.upload_speed}
monitor_speed = ${common_env_data.monitor_speed}
extra_scripts = ${common_env_data.extra_scripts}
build_unflags =
${common_env_data.build_unflags}
build_flags =
-Wl,-Map,output.map
${common_env_data.build_flags}
-D LOG_LEVEL=4
-D CORE_DEBUG_LEVEL=2
-D ESP32S3
-D ARDUINO_ESP32S3_DEV
-D ARDUINO_USB_CDC_ON_BOOT=1
#-D USE_SERIAL_PINS # Use the TX/RX pins for the serial port
#-D RUN_HARDWARE_TEST # Will run diagnositc setup to validate the GPIO configurations
lib_deps =
${common_env_data.lib_deps}
${common_env_data.lib_deps32}
lib_ignore =
board = lolin_s3_mini
build_type = release
board_build.partitions = part32_coredump.csv
board_build.filesystem = littlefs
board_build.embed_txtfiles = ${common_env_data.html_files}
# This is a version for the floaty hardware. No DSB18 sensor and no battery measurement.
[env:gravity32lite-release]
framework = ${common_env_data.framework}
platform = ${common_env_data.platform32}
upload_speed = ${common_env_data.upload_speed}
monitor_speed = ${common_env_data.monitor_speed}
extra_scripts = ${common_env_data.extra_scripts}
build_unflags =
${common_env_data.build_unflags}
build_flags =
-Wl,-Map,output.map
${common_env_data.build_flags}
-D LOG_LEVEL=4
-D CORE_DEBUG_LEVEL=2
-D ESP32LITE
-D FLOATY
#-D USE_SERIAL_PINS # Use the TX/RX pins for the serial port
lib_deps =
${common_env_data.lib_deps}
${common_env_data.lib_deps32}
lib_ignore =
board = lolin32_lite
build_type = release
board_build.partitions = part32.csv
board_build.filesystem = littlefs
board_build.embed_txtfiles = ${common_env_data.html_files}
; [env:cov-wokwi]
; platform = ${common_env_data.platform32}
; framework = arduino
; board = lolin_s2_mini
; upload_speed = ${common_env_data.upload_speed}
; monitor_speed = ${common_env_data.monitor_speed}
; build_unflags =
; ${common_env_data.build_unflags}
; -D USE_LITTLEFS
; extra_scripts =
; script/merge_firmware.py
; #pre:script/gcov_filter.py
; build_flags =
; #-D WOKWI # Used to bypass issues with the simulator...
; -lgcov
; -D ACTIVATE_GCOV
; -D ESP32S2
; -D ARDUINO_ESP32S2_DEV
; -D USER_SSID=\""Wokwi-GUEST\""
; -D USER_SSID_PWD=\""\""
; #-D USE_SERIAL_PINS
; -D LOG_LEVEL=6
; -D CORE_DEBUG_LEVEL=6
; ${common_env_data.build_flags}
; lib_deps =
; ${common_env_data.lib_deps}
; https://github.com/bxparks/AUnit#v1.7.1
; build_type = debug
; board_build.partitions = part32.csv
; board_build.filesystem = littlefs
; board_build.embed_txtfiles = ${common_env_data.html_files}
; build_src_filter = +<*> -<main.cpp> +<../test/tests*.cpp>
#gcov_files = disabled
; [env:cov-api-wokwi]
; platform = ${common_env_data.platform32}
; framework = arduino
; board = lolin_s2_mini
; upload_speed = ${common_env_data.upload_speed}
; monitor_speed = ${common_env_data.monitor_speed}
; build_unflags =
; ${common_env_data.build_unflags}
; -D USE_LITTLEFS
; extra_scripts =
; script/merge_firmware.py
; build_flags =
; #-D WOKWI # Used to bypass issues with the simulator...
; #-D ACTIVATE_GCOV
; -D ESP32S2
; -D ARDUINO_ESP32S2_DEV
; -D USER_SSID=\""Wokwi-GUEST\""
; -D USER_SSID_PWD=\""\""
; #-D USE_SERIAL_PINS
; -D LOG_LEVEL=4
; -D CORE_DEBUG_LEVEL=1
; ${common_env_data.build_flags}
; lib_deps =
; ${common_env_data.lib_deps}
; build_type = release
; board_build.partitions = part32.csv
; board_build.filesystem = littlefs
; board_build.embed_txtfiles = ${common_env_data.html_files}
; [env:cov-esp32]
; framework = ${common_env_data.framework}
; platform = ${common_env_data.platform32}
; upload_speed = ${common_env_data.upload_speed}
; monitor_speed = ${common_env_data.monitor_speed}
; extra_scripts =
; ${common_env_data.extra_scripts}
; #script/merge_firmware.py
; #pre:script/gcov_filter.py
; build_unflags =
; ${common_env_data.build_unflags}
; build_flags =
; -Wl,-Map,output.map
; ${common_env_data.build_flags}
; -D ACTIVATE_GCOV
; -D ESP32S2
; -D ARDUINO_ESP32S2_DEV
; #-D ESP32C3
; #-D ARDUINO_ESP32C3_DEV
; #-D USER_SSID=\""Wokwi-GUEST\""
; #-D USER_SSID_PWD=\""\""
; -D LOG_LEVEL=4
; -D CORE_DEBUG_LEVEL=2
; -DUSE_SERIAL_PINS # Use the TX/RX pins for the serial port
; lib_deps =
; ${common_env_data.lib_deps}
; #${common_env_data.lib_deps32}
; lib_ignore =
; board = lolin_s2_mini
; build_type = debug
; board_build.partitions = part32.csv
; board_build.filesystem = littlefs
; board_build.embed_txtfiles = ${common_env_data.html_files}
#board_build.flash_mode = dio
#gcov_files = disable
#gcov_files = webserver.cpp gyro.cpp main.cpp
#gcov_files = webserver.cpp
#gcov_files = main.cpp
#gcov_files = wifi.cpp