|
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 | 16 | johboh/nlohmann-json@^3.11.3 |
35 | | - ; adding local library as dependency is necessary as it does not have any include files. This is because nothing should depend from this layer. |
36 | 17 | 3rd_party_adapters ; this is necessary as no source code dependency shall exist to that packet |
37 | 18 | lib_ldf_mode = deep ; to automatically detect nested dependencies (for external libraries) |
38 | 19 | build_flags = |
| 20 | + ${env.build_flags} |
39 | 21 | -DLV_CONF_PATH="${PROJECT_DIR}/lib/3rd_party_adapters/LVGL/lv_conf.h" ; lvgl: use this config file |
40 | | - -std=gnu++17 ; necessary for using modern STL |
41 | | - -Werror=return-type ; consider missing return information as fatal error |
42 | | -build_unflags = -std=gnu++11 ; necessary to be able to specify a different language standard |
| 22 | + -DBAUD_RATE=${this.monitor_speed} |
43 | 23 | monitor_speed = 115200 |
44 | | -monitor_filters = esp32_exception_decoder |
45 | | -build_type = debug |
46 | 24 |
|
47 | | -; Template section for tests to be run on native platform. |
48 | | -[test_native] |
49 | | -build_type = debug |
| 25 | +[env:native] |
50 | 26 | platform = native |
51 | 27 | lib_deps = |
52 | 28 | unity |
53 | | - ArduinoFake |
| 29 | + ArduinoFake@^0.4.0 |
54 | 30 | enterprise_business_rules |
55 | | -lib_ldf_mode = chain ; automatically detect dependencies but to not recurse into other components |
| 31 | + utilities |
| 32 | +lib_ldf_mode = chain ; to simplify mocking, do not use deep mode |
56 | 33 | build_flags = |
| 34 | + ${env.build_flags} |
57 | 35 | -Wno-deprecated ; Workaround for https://github.com/FabioBatSilva/ArduinoFake/pull/41#issuecomment-1440550553 |
58 | | - -Werror=overflow |
59 | | - -D unitTesting |
60 | 36 | -lgcov |
61 | 37 | --coverage |
62 | 38 | -fprofile-abs-path |
63 | | - -std=gnu++17 ; necessary for using modern STL |
64 | | - -O0 -ggdb3 |
65 | | -build_unflags = -std=gnu++11 |
| 39 | + -O0 |
| 40 | + -ggdb3 |
66 | 41 |
|
67 | | -;------------------------------------------------------- |
68 | | -; ESP32 build environment | |
69 | | -;------------------------------------------------------- |
70 | 42 | [env:esp32-s3-devkitc-1] |
71 | 43 | platform = espressif32 |
72 | 44 | board = esp32-s3-devkitc-1 |
73 | 45 | framework = arduino |
74 | | -;;add dependencies to general dependencies from [env] |
75 | | -; lib_deps = |
76 | | -; ${env.lib_deps} |
77 | | - |
78 | | -; We have individual test enviroments, as this allows us to define different |
79 | | -; include paths (lib_deps) per test. |
80 | | -; And this in turn allwos us to mock different parts of the software for each test. |
81 | | -[env:test_native_tasks] |
82 | | -extends = test_native |
83 | | -test_filter = test_tasks |
84 | | -lib_deps = |
85 | | - ${test_native.lib_deps} |
86 | | - utilities |
87 | | - |
88 | | -[env:test_native_cli] |
89 | | -extends = test_native |
90 | | -test_filter = test_cli |
91 | | -debug_test = test_cli |
92 | | -lib_deps = |
93 | | - ${test_native.lib_deps} |
94 | | - |
95 | | -[env:test_native_string_helpers] |
96 | | -extends = test_native |
97 | | -test_filter = test_string_helpers |
98 | | -debug_test = test_string_helpers |
99 | | - |
100 | | -[env:test_native_hmi] |
101 | | -extends = test_native |
102 | | -test_filter = hmi/* |
103 | | -lib_deps = |
104 | | - ${test_native.lib_deps} |
105 | | - application_business_rules |
106 | | - board_adapters |
107 | | - utilities |
| 46 | +extends = production |
| 47 | +monitor_filters = esp32_exception_decoder |
0 commit comments