|
1 | | -; PlatformIO Project Configuration File |
2 | | -; |
3 | | -; Please visit documentation for the other options and examples |
4 | | -; https://docs.platformio.org/page/projectconf.html |
5 | | - |
6 | | -;------------------------------------------------------- |
7 | | -; global PIO parameters | |
8 | | -;------------------------------------------------------- |
9 | 1 | [platformio] |
10 | | -;default build enfironment for PIO project |
11 | 2 | default_envs = esp32-s3-devkitc-1 |
12 | 3 |
|
13 | | -;Path to source files relative to PIO project |
14 | | -; see https://docs.platformio.org/en/stable/projectconf/sections/platformio/options/directory/src_dir.html |
15 | | -src_dir = src |
16 | | - |
17 | | -;switch "include" path to be src as well, as we decide to have headers and sources in same directories |
18 | | -; this prevents the build environment from complaining the path not existing |
19 | | -include_dir = src |
20 | | - |
21 | | -;------------------------------------------------------- |
22 | | -; common parameters for all environments [env:...] | |
23 | | -;------------------------------------------------------- |
24 | 4 | [env] |
25 | | -;filter for source file directory when building |
26 | | -; see https://docs.platformio.org/en/stable/projectconf/sections/env/options/build/build_src_filter.html |
27 | | -build_src_filter = +<*> -<.git/> -<.svn/> |
| 5 | +build_flags = |
| 6 | + -std=gnu++17 ; necessary for using modern STL |
| 7 | + -Werror=return-type ; consider missing return information as fatal error |
| 8 | + -Werror=overflow |
| 9 | +build_unflags = -std=gnu++11 ; necessary to be able to specify a different language standard |
28 | 10 |
|
29 | | -;general dependencies |
30 | | -; for version requirements see https://docs.platformio.org/en/stable/core/userguide/pkg/cmd_install.html#cmd-pkg-install-requirements |
| 11 | +[production] |
| 12 | +extends = env |
31 | 13 | lib_deps = |
32 | 14 | adafruit/Adafruit SSD1306@~2.5.3 |
33 | 15 | lvgl@^8.3 |
34 | | - ; adding local library as dependency is necessary as it does not have any include files. This is because nothing should depend from this layer. |
35 | 16 | 3rd_party_adapters ; this is necessary as no source code dependency shall exist to that packet |
36 | 17 | lib_ldf_mode = deep ; to automatically detect nested dependencies (for external libraries) |
37 | 18 | build_flags = |
| 19 | + ${env.build_flags} |
38 | 20 | -DLV_CONF_PATH="${PROJECT_DIR}/lib/3rd_party_adapters/LVGL/lv_conf.h" ; lvgl: use this config file |
39 | | - -std=gnu++17 ; necessary for using modern STL |
40 | | - -Werror=return-type ; consider missing return information as fatal error |
41 | | -build_unflags = -std=gnu++11 ; necessary to be able to specify a different language standard |
| 21 | + -DBAUD_RATE=${this.monitor_speed} |
42 | 22 | monitor_speed = 115200 |
43 | | -monitor_filters = esp32_exception_decoder |
44 | | -build_type = debug |
45 | 23 |
|
46 | | -; Template section for tests to be run on native platform. |
47 | | -[test_native] |
48 | | -build_type = debug |
| 24 | +[env:native] |
49 | 25 | platform = native |
50 | 26 | lib_deps = |
51 | 27 | unity |
52 | 28 | ArduinoFake |
53 | | -lib_ldf_mode = chain ; automatically detect dependencies but to not recurse into other components |
| 29 | + utilities |
| 30 | +lib_ldf_mode = chain ; to simplify mocking, do not use deep mode |
54 | 31 | build_flags = |
| 32 | + ${env.build_flags} |
55 | 33 | -Wno-deprecated ; Workaround for https://github.com/FabioBatSilva/ArduinoFake/pull/41#issuecomment-1440550553 |
56 | | - -Werror=overflow |
57 | | - -D unitTesting |
58 | 34 | -lgcov |
59 | 35 | --coverage |
60 | 36 | -fprofile-abs-path |
61 | | - -std=gnu++17 ; necessary for using modern STL |
62 | | - -O0 -ggdb3 |
63 | | -build_unflags = -std=gnu++11 |
| 37 | + -O0 |
| 38 | + -ggdb3 |
64 | 39 |
|
65 | | -;------------------------------------------------------- |
66 | | -; ESP32 build environment | |
67 | | -;------------------------------------------------------- |
68 | 40 | [env:esp32-s3-devkitc-1] |
69 | 41 | platform = espressif32 |
70 | 42 | board = esp32-s3-devkitc-1 |
71 | 43 | framework = arduino |
72 | | -;;add dependencies to general dependencies from [env] |
73 | | -; lib_deps = |
74 | | -; ${env.lib_deps} |
75 | | - |
76 | | -; We have individual test enviroments, as this allows us to define different |
77 | | -; include paths (lib_deps) per test. |
78 | | -; And this in turn allwos us to mock different parts of the software for each test. |
79 | | -[env:test_native_tasks] |
80 | | -extends = test_native |
81 | | -test_filter = test_tasks |
82 | | -lib_deps = |
83 | | - ${test_native.lib_deps} |
84 | | - utilities |
85 | | - |
86 | | -[env:test_native_cli] |
87 | | -extends = test_native |
88 | | -test_filter = test_cli |
89 | | -debug_test = test_cli |
90 | | -lib_deps = |
91 | | - ${test_native.lib_deps} |
92 | | - |
93 | | -[env:test_native_string_helpers] |
94 | | -extends = test_native |
95 | | -test_filter = test_string_helpers |
96 | | -debug_test = test_string_helpers |
97 | | - |
98 | | -[env:test_native_hmi] |
99 | | -extends = test_native |
100 | | -test_filter = hmi/* |
101 | | -lib_deps = |
102 | | - ${test_native.lib_deps} |
103 | | - application_business_rules |
104 | | - board_adapters |
105 | | - utilities |
| 44 | +extends = production |
| 45 | +monitor_filters = esp32_exception_decoder |
0 commit comments