-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplatformio.ini
More file actions
69 lines (62 loc) · 2.48 KB
/
Copy pathplatformio.ini
File metadata and controls
69 lines (62 loc) · 2.48 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
; PlatformIO project for the SPA CONTROLLER board (ESP32-WROOM + 8ch relay).
;
; PlatformIO pins library versions and, via `build_flags = -I..`, lets the sketch
; include the shared headers (hot_tub_types.h, secrets.h) straight from the repo
; root — so no per-directory header symlinks are needed.
;
; Two build environments:
; controller (default) — BLE/BTHome OFF. Default partition, no NimBLE dep.
; controller-ble — BLE/BTHome ON (-DENABLE_BLE_BTHOME). NimBLE + bigger
; partition. See BTHomeUtils.h.
;
; Usage:
; cd controller
; pio run # compile default (BLE off)
; pio run -t upload # flash default over USB
; pio run -e controller-ble -t upload # build+flash the BLE variant
; pio run -t uploadfs # flash the data/ web UI to SPIFFS
; pio device monitor # serial console
;
; The Makefile in this directory is a thin convenience wrapper around these
; commands plus a few HTTP-based helpers (OTA push, live SPIFFS sync).
[platformio]
src_dir = .
include_dir = .
; Only the BLE-off build runs on a bare `pio run`; the BLE variant is explicit (-e).
default_envs = controller
; Settings shared by both environments.
[env]
; Arduino-ESP32 3.x (IDF 5.x). The ESP-NOW callbacks are guarded for the 3.1+
; send-callback signature change (see ESPNowUtils.cpp), so the latest core builds.
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
upload_port = /dev/ttyUSB0
monitor_port = /dev/ttyUSB0
; Resolve shared headers from the repo root instead of per-dir symlinks.
build_flags =
-I..
-std=gnu++17
build_unflags = -std=gnu++11
board_build.filesystem = spiffs
lib_deps =
bblanchon/ArduinoJson @ ^6.21.0
milesburton/DallasTemperature @ ^3.11.0
paulstoffregen/OneWire @ ^2.3.7
paulstoffregen/Time @ ^1.6.1
; Default: BLE/BTHome disabled. Uses the stock partition table (no NimBLE, so the
; firmware fits the default app slot as before).
[env:controller]
; Opt-in: BLE BTHome broadcast enabled. NimBLE bloats the firmware past the default
; app partition, so switch to min_spiffs.csv (two ~1.9MB OTA app slots + a small
; SPIFFS; the web UI in data/ is ~52KB). Re-flash over USB once when moving between
; the two partition layouts (OTA can't repartition).
[env:controller-ble]
build_flags =
${env.build_flags}
-DENABLE_BLE_BTHOME
board_build.partitions = min_spiffs.csv
lib_deps =
${env.lib_deps}
h2zero/NimBLE-Arduino @ ^2.2.3