forked from jniebuhr/gaggimate
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplatformio.ini
More file actions
205 lines (197 loc) · 6.32 KB
/
Copy pathplatformio.ini
File metadata and controls
205 lines (197 loc) · 6.32 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
; 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
[env]
platform = espressif32@6.12.0
framework = arduino
monitor_speed = 115200
build_unflags =
-std=gnu++11
check_flags =
cppcheck: --enable=all --inline-suppr --suppress=*:*/.pio/*
monitor_filters =
esp32_exception_decoder
time
default
[display_common]
build_flags =
-std=c++17
-std=gnu++17
-DLV_CONF_INCLUDE_SIMPLE
-DLV_CONF_PATH="${platformio.src_dir}/display/lv_conf.h"
-DDISABLE_ALL_LIBRARY_WARNINGS
-DLV_CONF_SUPPRESS_DEFINE_CHECK
-DARDUINO_USB_CDC_ON_BOOT=1
-DCORE_DEBUG_LEVEL=3
-DCONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN
-O2
-DCONFIG_MAX_FILENAME_LEN=64
-DCONFIG_MAX_URL_LEN=128
-DCONFIG_NIMBLE_CPP_LOG_LEVEL=2
-DCONFIG_BT_NIMBLE_PINNED_TO_CORE=0
; Run AsyncTCP on core 0, same core as the WiFi MAC and LWIP tcpip thread.
; Driving LWIP from a different core than the WiFi/RX path (core 1) risks
; cross-core LWIP races under load that wedge the whole IP stack (web + ICMP
; die together). v1.8.1 used core 0 and was stable; the BLE load that
; originally motivated moving it off core 0 is now much lower (idle 30-50ms
; connection interval + fire-and-forget telemetry).
-DCONFIG_ASYNC_TCP_RUNNING_CORE=0
-DCONFIG_ASYNC_TCP_MAX_ACK_TIME=5000
-DCONFIG_ASYNC_TCP_PRIORITY=10
-DCONFIG_ASYNC_TCP_QUEUE_SIZE=64
-DCONFIG_ASYNC_TCP_STACK_SIZE=8192
-DDEFAULT_MAX_WS_CLIENTS=3
lib_deps_default =
FS
SPIFFS
LittleFS
Wire
SPI
ble_ota_dfu
NanoPbComm
h2zero/NimBLE-Arduino@^1.4.0
nanopb/Nanopb@^0.4.9
https://github.com/ESP32Async/AsyncTCP.git#v3.4.9
https://github.com/ESP32Async/ESPAsyncWebServer.git#v3.9.1
bblanchon/ArduinoJson@^7.2.1
256dpi/MQTT@^2.5.2
https://github.com/gaggimate/esp-arduino-ble-scales#v1.0.2
homespan/HomeSpan@1.9.1
jnthas/Improv WiFi Library@^0.0.4
[env:display]
board = LilyGo-T-RGB
board_build.filesystem = littlefs
upload_speed = 921600
build_src_filter = -<*> +<display/> +<version.h>
extra_scripts =
pre:scripts/auto_firmware_version.py
; Ensures src/display/webassets/* (embedded web UI) exists before compile;
; stubs an empty bundle if build_webui.sh hasn't been run. [GM-106]
pre:scripts/embed_webui_pre.py
; nanopb's official PlatformIO integration generates gaggimate.pb.{c,h} from the
; .proto at build time (no committed generated files, no separate generator
; script). The matching gaggimate.options is picked up automatically.
custom_nanopb_protos =
+<lib/NanoPbComm/proto/gaggimate.proto>
custom_nanopb_options =
--error-on-unmatched
lib_deps =
${display_common.lib_deps_default}
lewisxhe/SensorLib @ 0.2.3
bodmer/TFT_eSPI @ 2.5.43
lvgl/lvgl @ 8.4.0
moononournation/GFX Library for Arduino @ 1.5.9
build_flags =
${display_common.build_flags}
[env:display-headless]
extends = env:display
lib_deps =
${display_common.lib_deps_default}
build_flags =
${display_common.build_flags}
-DGAGGIMATE_HEADLESS
build_src_filter = -<*> +<display/> +<version.h> -<display/drivers/> -<display/ui/> -<display/lv_conf.h>
[env:display-headless-8m]
extends = env:display-headless
board = seeed_xiao_esp32s3
[env:controller]
board = Gaggimate-Controller
build_src_filter = -<*> +<controller/> +<version.h>
extra_scripts =
pre:scripts/auto_firmware_version.py
custom_nanopb_protos =
+<lib/NanoPbComm/proto/gaggimate.proto>
custom_nanopb_options =
--error-on-unmatched
lib_deps =
GaggiMateController
FS
SPIFFS
ble_ota_dfu
NanoPbComm
h2zero/NimBLE-Arduino@^1.4.0
nanopb/Nanopb@^0.4.9
bblanchon/ArduinoJson@^7.2.1
build_flags =
-std=c++17
-std=gnu++17
-DCORE_DEBUG_LEVEL=3
-DARDUINO_USB_CDC_ON_BOOT=1
; Native-host env for Autotune SIMC unit tests. Autotune.cpp = STL-only, so
; `pio test -e native_autotune` runs host-side, no ESP32/Arduino runtime.
; Unity framework shipped with PlatformIO.
[env:native_autotune]
platform = native
framework =
lib_ldf_mode = off
lib_deps =
throwtheswitch/Unity@^2.6.0
test_framework = unity
test_filter = test_autotune_simc
; Test TU includes Autotune.cpp directly (see #include at top of
; test_autotune_simc.cpp) — native linker skips NayrodPID's Arduino-dependent
; siblings (SimplePID, SimpleKalmanFilter, ...).
build_unflags =
-std=gnu++11
build_flags =
-std=c++17
-I lib/NayrodPID/src
-Wno-unused-variable
-Wno-unused-function
; Desktop simulator: builds the real display firmware natively with the BLE link
; to the controller mocked (sim/comms) and an SDL window as the panel (sim/driver).
; All host shims for Arduino/ESP/FreeRTOS/FS/Preferences/WiFi live in sim/platform.
; Requires SDL2 on the host (macOS: `brew install sdl2`). See sim/README.md. [GM-107]
[env:display-sim]
platform = native
framework =
lib_ldf_mode = off
; Adds a clickable "Run Simulator" task (pio run -e display-sim -t run).
extra_scripts = post:scripts/sim_run.py
build_src_filter =
-<*>
+<display/>
+<version.h>
+<../sim/>
-<display/main.cpp>
-<display/drivers/>
-<display/webassets/>
-<display/plugins/MQTTPlugin.cpp>
-<display/plugins/HomekitPlugin.cpp>
-<display/plugins/mDNSPlugin.cpp>
-<display/plugins/NetworkWatchdogPlugin.cpp>
-<display/plugins/WifiStaWatchdogPlugin.cpp>
-<display/plugins/BLEScalePlugin.cpp>
-<display/plugins/ImprovPlugin.cpp>
lib_deps =
lvgl/lvgl@8.4.0
bblanchon/ArduinoJson@^7.2.1
build_unflags =
-std=gnu++11
build_flags =
-DGAGGIMATE_SIM
-std=gnu++17
-DLV_CONF_INCLUDE_SIMPLE
-DLV_CONF_PATH="${platformio.src_dir}/display/lv_conf.h"
-DLV_CONF_SUPPRESS_DEFINE_CHECK
-DDISABLE_ALL_LIBRARY_WARNINGS
-DCORE_DEBUG_LEVEL=0
; Make ArduinoJson auto-configure exactly as on the device (Arduino String,
; no std::string) so its overload resolution matches the firmware.
-DARDUINO=10812
; Path to the embedded WebUI blob, .incbin'd by sim/web/web_ui_blob_sim.S.
-DGM_WEB_UI_BIN=\"${PROJECT_DIR}/src/display/webassets/web_ui.bin\"
-I ${PROJECT_DIR}/sim/platform
-I ${PROJECT_DIR}/sim/platform/arduino
-I ${PROJECT_DIR}/sim/comms
-I ${PROJECT_DIR}/sim/driver
-I ${PROJECT_DIR}/sim/web
-I ${PROJECT_DIR}/src
!sdl2-config --cflags
!sdl2-config --libs