-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplatformio.ini
More file actions
501 lines (470 loc) · 15.3 KB
/
platformio.ini
File metadata and controls
501 lines (470 loc) · 15.3 KB
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
;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 specific configurations
; *****************************************************************************
[platformio]
default_envs = ConvoyLeaderTarget, ConvoyLeaderSim
extra_configs =
config/buildmode.ini
config/hardwareversion.ini
platformio_override.ini
; ********************************************************************************
; Select native build mode here!
; ********************************************************************************
[mode:selected_native]
#extends = mode:debug_native
#build_flags =
# ${mode:debug_native.build_flags}
extends = mode:release_native
build_flags =
${mode:release_native.build_flags}
; ********************************************************************************
; Select esp32 build mode here!
; ********************************************************************************
[mode:selected_esp32]
extends = mode:debug_log
build_flags =
${mode:debug_log.build_flags}
; ********************************************************************************
; Select esp32 hardware version here!
; ********************************************************************************
[target:esp32]
extends = version:V1
build_flags =
${version:V1.build_flags}
; *****************************************************************************
; Static check configuration
; *****************************************************************************
[static_check_configuration]
check_tool = cppcheck, clangtidy
check_severity = medium, high
check_patterns =
include
src
lib
check_flags =
cppcheck: cppcheck: --suppress=*:*/libdeps/* --suppress=*:*lib/Webots/* --suppress=noExplicitConstructor --suppress=unusedFunction --std=c++11
clangtidy: --header-filter='' --checks=-*,clang-analyzer-*,performance-*,portability-*,readability-uppercase-literal-suffix,readability-redundant-control-flow --warnings-as-errors=-*,clang-analyzer-*,performance-*,portability-*,readability-uppercase-literal-suffix,readability-redundant-control-flow
check_skip_packages = yes
; *****************************************************************************
; PC target environment for Webots simulation.
;
; It is assumed that the environment variable WEBOTS_HOME is set to the
; Webots directory, e.g. WEBOTS_HOME=C:\Users\<user>\AppData\Local\Programs\Webots
; *****************************************************************************
[target:Sim]
platform = native @ ~1.2.1
extends = mode:selected_native
build_flags =
${mode:selected_native.build_flags}
-std=c++11
-D TRANSPORT_USE_TCP=1
-D _USE_MATH_DEFINES
-D TARGET_NATIVE
-lmosquitto
-I./lib/Webots/include/c
-I./lib/Webots/include/cpp
-L./lib/Webots/lib/controller
-llibController
lib_deps =
HALInterfaces
BlueAndi/ArduinoNative @ ~0.2.2
HALSim
Webots
MainNative
lib_ignore =
HALTargetCommon
HALTargetV1
HALTargetV2
HALTest
MainTestNative
extra_scripts =
./scripts/webots_launcher.py
pre:./scripts/add_os_specific_build_flags.py
pre:./scripts/create_webots_library.py
pre:./scripts/check_os.py
post:./scripts/copy_webots_shared_libs.py
; Custom options (https://docs.platformio.org/en/latest/scripting/examples/platformio_ini_custom_options.html)
custom_webots_ip_address = 127.0.0.1 ; IP address of the Webots simulation, which is used for TCP communication
custom_webots_protocol = ipc ; [ipc|tcp] - ipc is faster but only works on the same machine, tcp works also over network
custom_webots_robot_name = ZumoComSystem
custom_webots_robot_serial_rx_channel = 4
custom_webots_robot_serial_tx_channel = 3
; *****************************************************************************
; PC target environment for tests
; *****************************************************************************
[target:Test]
platform = native @ ~1.2.1
build_flags =
-std=c++11
-D TARGET_NATIVE
-D UNIT_TEST
-D _USE_MATH_DEFINES
lib_deps =
HALInterfaces
BlueAndi/ArduinoNative @ ~0.2.2
HALTest
Utilities
bblanchon/ArduinoJson @ ^7.4.2
MainTestNative
lib_ignore =
HALSim
HALTargetCommon
HALTargetV1
HALTargetV2
MainNative
extra_scripts =
pre:./scripts/add_os_specific_build_flags.py
; *****************************************************************************
; Convoy leader application
; *****************************************************************************
[app:ConvoyLeader]
build_flags =
lib_deps =
APPConvoyLeader
Service
Utilities
gabryelreyes/SerialMuxProt @ ^2.3.0
bblanchon/ArduinoJson @ ^7.4.2
PlatoonService
lib_ignore =
APPConvoyFollower
APPLineFollower
APPRemoteControl
APPSensorFusion
APPTest
APPTurtle
; *****************************************************************************
; Convoy follower application
; *****************************************************************************
[app:ConvoyFollower]
build_flags =
lib_deps =
APPConvoyFollower
Service
Utilities
gabryelreyes/SerialMuxProt @ ^2.3.0
bblanchon/ArduinoJson @ ^7.4.2
PlatoonService
lib_ignore =
APPConvoyLeader
APPLineFollower
APPRemoteControl
APPSensorFusion
APPTest
APPTurtle
; *****************************************************************************
; Line follower application
; *****************************************************************************
[app:LineFollower]
build_flags =
lib_deps =
APPLineFollower
Service
Utilities
gabryelreyes/SerialMuxProt @ ^2.3.0
bblanchon/ArduinoJson @ ^7.4.2
lib_ignore =
APPConvoyLeader
APPConvoyFollower
APPRemoteControl
APPSensorFusion
APPTest
APPTurtle
; *****************************************************************************
; Remote control application
; *****************************************************************************
[app:RemoteControl]
build_flags =
lib_deps =
APPRemoteControl
Service
Utilities
gabryelreyes/SerialMuxProt @ ^2.3.0
bblanchon/ArduinoJson @ ^7.4.2
lib_ignore =
APPConvoyLeader
APPConvoyFollower
APPLineFollower
APPSensorFusion
APPTest
APPTurtle
; *****************************************************************************
; Test application
; *****************************************************************************
[app:Test]
build_flags =
lib_deps =
APPTest
Service
Utilities
lib_ignore =
APPConvoyLeader
APPConvoyFollower
APPLineFollower
APPRemoteControl
APPSensorFusion
APPTurtle
; *****************************************************************************
; Sensor Fusion application
; *****************************************************************************
[app:SensorFusion]
build_flags =
lib_deps =
APPSensorFusion
hideakitai/ArduinoEigen @ ^0.3.2
gabryelreyes/SerialMuxProt @ ^2.3.0
bblanchon/ArduinoJson @ ^7.4.2
lib_ignore =
APPConvoyLeader
APPConvoyFollower
APPLineFollower
APPRemoteControl
APPTest
APPTurtle
; *****************************************************************************
; Turtle application
; *****************************************************************************
[app:Turtle]
build_flags =
lib_deps =
APPTurtle
Service
Utilities
bblanchon/ArduinoJson @ ^7.4.2
gabryelreyes/SerialMuxProt @ ^2.3.0
lib_ignore =
APPConvoyLeader
APPConvoyFollower
APPLineFollower
APPRemoteControl
APPSensorFusion
APPTest
; *****************************************************************************
; Convoy leader application on target
; *****************************************************************************
[env:ConvoyLeaderTarget]
extends = target:esp32, app:ConvoyLeader, static_check_configuration
build_flags =
${target:esp32.build_flags}
${app:ConvoyLeader.build_flags}
lib_deps =
${target:esp32.lib_deps}
${app:ConvoyLeader.lib_deps}
lib_ignore =
${target:esp32.lib_ignore}
${app:ConvoyLeader.lib_ignore}
extra_scripts =
${target:esp32.extra_scripts}
; *****************************************************************************
; Convoy leader application on simulation
; *****************************************************************************
[env:ConvoyLeaderSim]
extends = target:Sim, app:ConvoyLeader, static_check_configuration
build_flags =
${target:Sim.build_flags}
${app:ConvoyLeader.build_flags}
lib_deps =
${target:Sim.lib_deps}
${app:ConvoyLeader.lib_deps}
lib_ignore =
${target:Sim.lib_ignore}
${app:ConvoyLeader.lib_ignore}
extra_scripts =
${target:Sim.extra_scripts}
; *****************************************************************************
; Convoy follower application on target
; *****************************************************************************
[env:ConvoyFollowerTarget]
extends = target:esp32, app:ConvoyFollower, static_check_configuration
build_flags =
${target:esp32.build_flags}
${app:ConvoyFollower.build_flags}
lib_deps =
${target:esp32.lib_deps}
${app:ConvoyFollower.lib_deps}
lib_ignore =
${target:esp32.lib_ignore}
${app:ConvoyFollower.lib_ignore}
extra_scripts =
${target:esp32.extra_scripts}
; *****************************************************************************
; Convoy follower application on simulation
; *****************************************************************************
[env:ConvoyFollowerSim]
extends = target:Sim, app:ConvoyFollower, static_check_configuration
build_flags =
${target:Sim.build_flags}
${app:ConvoyFollower.build_flags}
lib_deps =
${target:Sim.lib_deps}
${app:ConvoyFollower.lib_deps}
lib_ignore =
${target:Sim.lib_ignore}
${app:ConvoyFollower.lib_ignore}
extra_scripts =
${target:Sim.extra_scripts}
; *****************************************************************************
; Line follower application on simulation
; *****************************************************************************
[env:LineFollowerSim]
extends = target:Sim, app:LineFollower, static_check_configuration
build_flags =
${target:Sim.build_flags}
${app:LineFollower.build_flags}
lib_deps =
${target:Sim.lib_deps}
${app:LineFollower.lib_deps}
lib_ignore =
${target:Sim.lib_ignore}
${app:LineFollower.lib_ignore}
extra_scripts =
${target:Sim.extra_scripts}
; *****************************************************************************
; Line follower application on target
; *****************************************************************************
[env:LineFollowerTarget]
extends = target:esp32, app:LineFollower, static_check_configuration
build_flags =
${target:esp32.build_flags}
${app:LineFollower.build_flags}
lib_deps =
${target:esp32.lib_deps}
${app:LineFollower.lib_deps}
lib_ignore =
${target:esp32.lib_ignore}
${app:LineFollower.lib_ignore}
extra_scripts =
${target:esp32.extra_scripts}
; *****************************************************************************
; Remote Control application on simulation
; *****************************************************************************
[env:RemoteControlSim]
extends = target:Sim, app:RemoteControl, static_check_configuration
build_flags =
${target:Sim.build_flags}
${app:RemoteControl.build_flags}
lib_deps =
${target:Sim.lib_deps}
${app:RemoteControl.lib_deps}
lib_ignore =
${target:Sim.lib_ignore}
${app:RemoteControl.lib_ignore}
extra_scripts =
${target:Sim.extra_scripts}
; *****************************************************************************
; Remote Control application on target
; *****************************************************************************
[env:RemoteControlTarget]
extends = target:esp32, app:RemoteControl, static_check_configuration
build_flags =
${target:esp32.build_flags}
${app:RemoteControl.build_flags}
lib_deps =
${target:esp32.lib_deps}
${app:RemoteControl.lib_deps}
lib_ignore =
${target:esp32.lib_ignore}
${app:RemoteControl.lib_ignore}
extra_scripts =
${target:esp32.extra_scripts}
; *****************************************************************************
; Sensor Fusion application on simulation
; *****************************************************************************
[env:SensorFusionSim]
extends = target:Sim, app:SensorFusion, static_check_configuration
build_flags =
${target:Sim.build_flags}
${app:SensorFusion.build_flags}
lib_deps =
${target:Sim.lib_deps}
${app:SensorFusion.lib_deps}
hideakitai/ArduinoEigen @ ^0.3.2
lib_ignore =
${target:Sim.lib_ignore}
${app:SensorFusion.lib_ignore}
extra_scripts =
${target:Sim.extra_scripts}
lib_compat_mode = off
; *****************************************************************************
; Sensor Fusion application on target
; *****************************************************************************
[env:SensorFusionTarget]
extends = target:esp32, app:SensorFusion, static_check_configuration
build_flags =
${target:esp32.build_flags}
${app:SensorFusion.build_flags}
lib_deps =
${target:esp32.lib_deps}
${app:SensorFusion.lib_deps}
hideakitai/ArduinoEigen @ ^0.3.2
lib_ignore =
${target:esp32.lib_ignore}
${app:SensorFusion.lib_ignore}
extra_scripts =
${target:esp32.extra_scripts}
; *****************************************************************************
; PC target environment for tests
; *****************************************************************************
[env:Test]
extends = target:Test, app:Test, static_check_configuration
build_flags =
${target:Test.build_flags}
${app:Test.build_flags}
lib_deps =
${target:Test.lib_deps}
${app:Test.lib_deps}
lib_ignore =
${target:Test.lib_ignore}
${app:Test.lib_ignore}
extra_scripts =
${target:Test.extra_scripts}
; *****************************************************************************
; Turtle application on target
; *****************************************************************************
[env:TurtleTarget]
extends = target:esp32, app:Turtle, static_check_configuration
board_microros_transport = custom
build_flags =
${target:esp32.build_flags}
${app:Turtle.build_flags}
lib_deps =
${target:esp32.lib_deps}
${app:Turtle.lib_deps}
https://github.com/gabryelreyes/micro_ros_platformio
lib_ignore =
${target:esp32.lib_ignore}
${app:Turtle.lib_ignore}
libmicroros
extra_scripts =
${target:esp32.extra_scripts}
; *****************************************************************************
; Turtle application on simulation
; *****************************************************************************
[env:TurtleSim]
extends = target:Sim, app:Turtle, static_check_configuration
build_flags =
${target:Sim.build_flags}
${app:Turtle.build_flags}
-I./lib/libmicroros/include
-L./lib/libmicroros
-llibmicroros
lib_deps =
${target:Sim.lib_deps}
${app:Turtle.lib_deps}
UDPNative
WiFiNative
libmicroros
lib_ignore =
${target:Sim.lib_ignore}
${app:Turtle.lib_ignore}
extra_scripts =
${target:Sim.extra_scripts}