-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathplatformio.ini
More file actions
261 lines (254 loc) · 13.3 KB
/
Copy pathplatformio.ini
File metadata and controls
261 lines (254 loc) · 13.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
[platformio]
; Build-Output auf lokales ext4 (/root) statt NFS (/Public). NFS hat Atomic-
; Write-Schwaechen — build_number.txt wurde einmal als NULL-bytes ueberschrieben.
; Pattern aus RFNETHM uebernommen.
build_dir = /root/pio-build/bosefix32
; Default-Env-Liste: alle Targets werden bei einem nackten "pio run" gebaut.
default_envs = esp32, s3, s3-8mb, c3, c6, c5
; -----------------------------------------------------------------------------
; Gemeinsame Konfiguration aller Targets — wird per "extends = common" geerbt.
; -----------------------------------------------------------------------------
[common]
; Platform gepinnt auf pioarduino 55.03.37 (= Arduino-core 3.3.7 / ESP-IDF 5.5.2.260206) —
; reproduzierbar ueber alle Build-Hosts. Das ungepinnte `platform = espressif32`
; resolvte je Host unterschiedlich (ein Build-Host hatte pioarduino 55.x installiert,
; ein anderer nur offizielles espressif32 6.9.0 -> kein C6-Arduino, falscher Core). Der Platform-
; Pin zieht transitiv die exakten Framework- + Toolchain-Versionen.
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.37/platform-espressif32.zip
framework = arduino
monitor_speed = 115200
monitor_filters = esp32_exception_decoder, time
lib_ldf_mode = deep+
build_flags =
-D CORE_DEBUG_LEVEL=3
; routing uses the non-regex template router (src/web_router.*) — no std::regex
; A couple of framework libs cross-include each other's headers (e.g. WiFi's
; WiFiGeneric.h includes "Network.h") and the LDF doesn't surface those, so the
; bundled-lib include dirs must be on the search path for the library builds
; too — hence build_flags (which PlatformIO propagates to lib builds), not an
; extra_script CPPPATH (project-sources only). Path is resolved via
; ${platformio.packages_dir} instead of a hardcoded /root/... so it's portable
; across hosts/PIO core dirs; the active framework lives at this slot and the
; version is pinned by the pioarduino platform above.
-I"${platformio.packages_dir}/framework-arduinoespressif32/libraries/Network/src"
-I"${platformio.packages_dir}/framework-arduinoespressif32/libraries/FS/src"
lib_deps =
Network
WiFi
FS
LittleFS
HTTPClient
ESPmDNS
Preferences
Update
ESP32Async/ESPAsyncWebServer@^3.6.0
ESP32Async/AsyncTCP@^3.3.2
bblanchon/ArduinoJson@^7.2.1
; "unser" Improv-Fork, gepinnt wie in CULFW32 — Dual-Backend Arduino+IDF.
https://github.com/tostmann/improv-wifi-busware.git#31cfd22348a670d33415202263c595cb36248b04
build_src_filter = +<*>
; Pre-build hook: snapshot working tree to git, bump build_number, generate
; src/version.h. Same contract as in CULFW32/TCM32 — see scripts/version_bump.py.
extra_scripts = pre:scripts/version_bump.py
; =============================================================================
; ESP32 (classic): Xtensa LX6 dual-core, WiFi+BT 4.2, 4 MB Flash.
; Kein USB-OTG → DevKits haben einen CH340/CP2102 als externe USB-UART-Bridge.
; Bootloader liegt bei 0x1000 (nicht 0x0 wie bei S3/C3/C6) — siehe build_release.sh.
; =============================================================================
[env:esp32]
extends = common
board = esp32dev
board_build.partitions = partitions-4mb.csv
board_build.filesystem = littlefs
board_upload.flash_size = 4MB
; FS-Image filtern: silence.mp3 (Spotify-only, ~120KB) raus, sonst sprengt das
; data/-Payload (244KB) das 256KB-spiffs der 4mb-OTA-Tabelle -> LFS_ERR_NOSPC.
; Classic hat kein Spotify, braucht silence.mp3 nicht. version_bump.py bleibt.
extra_scripts =
${common.extra_scripts}
pre:scripts/fs_exclude_esp32.py
build_flags =
${common.build_flags}
; ESP32-classic behaelt A/B-OTA (1.81MB Slots reichen)
-D SIXBACK_OTA_ENABLED=1
; =============================================================================
; ESP32-S3 (N16R8V): Quad-Flash 16 MB + Octal-PSRAM 8 MB, CH343 zum Flash an UART0
; =============================================================================
[env:s3]
extends = common
board = esp32-s3-devkitc-1
board_build.partitions = partitions.csv
board_build.filesystem = littlefs
board_upload.flash_size = 16MB
board_build.arduino.memory_type = qio_opi
board_build.flash_mode = qio
board_build.psram_type = opi
build_flags =
${common.build_flags}
; CH343 sitzt an UART0 (nicht USB-OTG): Arduino-USB-CDC AUS, damit
; Serial() ueber UART0 geht — landet als /dev/ttyACM* am Host.
-D ARDUINO_USB_MODE=0
-D ARDUINO_USB_CDC_ON_BOOT=0
-D BOARD_HAS_PSRAM
; Spotify-Trigger-Pipeline (Web-API-Remote per scmudc-preset-pressed):
; benoetigt WiFiClientSecure + Token-Refresh + Heap-Reserven, plus
; PSRAM/16MB-Flash fuer Stabilitaet. Daher S3-only. Auf C3/C6/ESP32
; bleibt der Code ge-no-op't (siehe spotify_player.cpp).
-D SIXBACK_SPOTIFY_ENABLED=1
; S3 hat das 16MB-Layout mit A/B-OTA-Slots a 3MB — OTA voll funktional.
-D SIXBACK_OTA_ENABLED=1
; #15: gabbo-WS-Watcher (HW-Tasten-Re-Arm kalter LIR-Slots) — nur PSRAM-Targets.
-D SIXBACK_GABBO_WATCHER_ENABLED=1
upload_port = /dev/serial/by-id/usb-1a86_USB_Single_Serial_5C37280229-if00
monitor_port = /dev/serial/by-id/usb-1a86_USB_Single_Serial_5C37280229-if00
; =============================================================================
; ESP32-S3, 8-MB-Variante (Issue #23): z.B. Seeed XIAO ESP32S3 — 8 MB Quad-Flash
; + 8 MB Octal-PSRAM, KEINE externe USB-UART-Bridge -> Serial() MUSS auf die
; native USB-Serial-JTAG-Peripherie (wie c3/c6), sonst ist Improv unerreichbar.
; Eigene Partition-Table (partitions-8mb.csv, App-Slots identisch zum 16-MB-
; Layout, spiffs 1.875 MB) + eigener OTA-Datei-Prefix: OHNE das Override wuerde
; CONFIG_IDF_TARGET_ESP32S3 in ota_pull.cpp das 10-MB-Standard-s3-littlefs
; ziehen, das nicht in die 1.875-MB-spiffs-Partition passt.
; NICHT von env:s3 geerbt, damit upload_port/monitor_port (Dev-Stick-Pinning)
; nicht mitkommen. ACHTUNG: ohne Pinning faellt "pio run -t upload" auf
; PlatformIO-Port-Auto-Detect zurueck (wie bei c3/c6) — bei mehreren Sticks
; am Host IMMER --upload-port explizit setzen.
; =============================================================================
[env:s3-8mb]
extends = common
board = esp32-s3-devkitc-1
board_build.partitions = partitions-8mb.csv
board_build.filesystem = littlefs
board_upload.flash_size = 8MB
board_build.arduino.memory_type = qio_opi
board_build.flash_mode = qio
board_build.psram_type = opi
build_flags =
${common.build_flags}
; Native USB-Serial-JTAG (XIAO hat nur den einen USB-C, keinen UART-Chip).
-D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=1
-D BOARD_HAS_PSRAM
; 8 MB PSRAM vorhanden -> Spotify wie beim grossen S3 aktiv.
-D SIXBACK_SPOTIFY_ENABLED=1
-D SIXBACK_OTA_ENABLED=1
; Eigener Artefakt-Namensraum fuer OTA-Pull (siehe ota_pull.cpp chipPrefix_).
-D SIXBACK_OTA_PREFIX='"sixback-s3-8mb-"'
; #15: gabbo-WS-Watcher wie beim grossen S3 (PSRAM vorhanden).
-D SIXBACK_GABBO_WATCHER_ENABLED=1
; =============================================================================
; ESP32-C3: RISC-V, 4 MB Flash, kein PSRAM, native USB-Serial-JTAG.
; Flashen passiert direkt ueber den im Chip eingebauten USB-CDC-Endpoint.
; =============================================================================
[env:c3]
extends = common
board = esp32-c3-devkitm-1
; A/B-OTA Layout (1.81MB Slots) — siehe partitions-4mb.csv. Wieder moeglich
; seit mini-silence (8kbps/30KB statt 120KB) das FS unter 256KB-spiffs drueckt.
board_build.partitions = partitions-4mb.csv
board_build.filesystem = littlefs
board_upload.flash_size = 4MB
build_flags =
${common.build_flags}
; ARDUINO_USB_MODE=1 + ARDUINO_USB_CDC_ON_BOOT=1: Serial() landet auf der
; eingebauten USB-Serial-JTAG-Bridge des C3 — dafuer KEIN externer
; USB-UART-Chip noetig. Host sieht das Geraet als
; "Espressif USB JTAG serial debug unit" / /dev/ttyACM*.
-D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=1
-D SIXBACK_SPOTIFY_ENABLED=1
; A/B-OTA wieder aktiv: 1.81MB-Slots reichen fuer die ~1.65MB-App, mini-silence
; (30KB) drueckt das FS unter 256KB-spiffs. Layout-Wechsel von no-OTA -> A/B
; braucht EINMAL USB-Factory-Flash (Partition-Table kann nicht per OTA kommen).
-D SIXBACK_OTA_ENABLED=1
; =============================================================================
; ESP32-C6: RISC-V, 4-8 MB Flash, kein PSRAM, native USB-Serial-JTAG + WiFi 6.
; Wir bauen gegen 4 MB Layout, das laeuft auch auf 8 MB Modulen (Rest = leer).
; =============================================================================
[env:c6]
extends = common
board = esp32-c6-devkitc-1
; A/B-OTA Layout (1.81MB Slots) — siehe partitions-4mb.csv. Wieder moeglich
; seit mini-silence (8kbps/30KB statt 120KB) das FS unter 256KB-spiffs drueckt.
board_build.partitions = partitions-4mb.csv
board_build.filesystem = littlefs
board_upload.flash_size = 4MB
build_flags =
${common.build_flags}
-D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=1
-D SIXBACK_SPOTIFY_ENABLED=1
; A/B-OTA wieder aktiv — siehe c3-Kommentar (1x USB-Factory beim Layout-Wechsel).
-D SIXBACK_OTA_ENABLED=1
; =============================================================================
; ESP32-C5 (Dual-Band 2.4/5 GHz WiFi 6): RISC-V single-core, native USB-Serial-
; JTAG (KEINE externe USB-UART-Bridge -> Serial() auf der nativen Peripherie wie
; c3/c6/s3-8mb, sonst Improv unerreichbar). AKTIVES Release-Target seit v0.8.28.
;
; HARDWARE-VALIDIERT (2026-06-17, C5-DevKitC-1 rev v1.0):
; Boot, LittleFS, WiFi, /api/status, NVS, OTA-Check OK; 5-GHz-Connect bewiesen
; (dedizierte 5-GHz-SSID -> band="5GHz", channel 40 in /api/status); WIFI_PS_NONE greift
; (kein 4WAY_HANDSHAKE_TIMEOUT, wie C6). ZERO Code-Edits noetig (verifiziert am
; Code): ChipFamily faellt auf #else CF_ESP32 (KEINEN C5-Case adden -> bricht den
; Improv-Fork-Build), CPU-Freq #else 160 MHz, ota_pull chipPrefix_ nimmt
; SIXBACK_OTA_PREFIX zuerst (keine C5-elif-Leiter).
;
; BOARD/FLASH: Das Lab-Devkit (DevKitC-1) hat **4 MB Flash + KEIN PSRAM** (per
; esptool flash_id + /api/status psram=0 verifiziert) -> board esp32-c5-devkitc1-n4
; + partitions-4mb.csv (A/B-OTA wie c3/c6). Damit ist env:c5 effektiv das
; C6-Aequivalent fuer C5. Spotify-Flag bleibt wie c6 (kompiliert, runtime
; PSRAM-gegated -> ohne PSRAM no-op); kein BOARD_HAS_PSRAM/gabbo (kein PSRAM).
;
; !! C5-BOOTLOADER LIEGT @ 0x2000 (NICHT 0x0!) — anders als c3/c6/s3 (0x0) und
; esp32-classic (0x1000). Verifiziert: IDF-Doku (2nd-stage bootloader @ 0x2000,
; die 8 KB davor = Key-Manager-Sektor), esptool ESP32C5ROM.BOOTLOADER_FLASH_OFFSET
; = 0x2000, und empirisch (0xE9-Image-Magic @ 0x2000 im Factory-Image + bootet auf
; echter HW). build_release.sh merge'd C5 mit boot_off=0x2000 (sonst Boot-Loop).
; Partition-Table @ 0x8000, App @ 0x10000, spiffs @ 0x3B0000 (partitions-4mb.csv).
;
; TOOLING: esptool 4.x kennt esp32c5 NICHT -> Merge braucht esptool >=5 (die
; gepinnte pioarduino-55.03.37-Plattform liefert esptoolpy-v5.1.2). build_release.sh
; loest ein C5-faehiges esptool aus den packages auf (find_c5_esptool). esp-web-
; tools@10 erkennt C5 (chipFamily "ESP32-C5", IMAGE_CHIP_ID 23) — wie im
; Schwesterprojekt esp-coordinator (identisches esptoolpy/esp-web-tools-Setup).
;
; HINWEIS Reset: esptool-Reset (RTS-Pin) ist auf dem nativen C5-USB-Serial-JTAG
; unzuverlaessig und kann das Endpoint festfahren (Write-Timeout). Fuer Runtime-
; Reconfig POST /api/reboot + Improv nutzen (Improv-Fenster: 30 s mit Creds /
; 120 s ohne); Flashen (Download-Mode) nur wenn noetig, bei Wedge Power-Cycle.
;
; ALTERNATIVE 8-MB+PSRAM-C5 (Seeed XIAO ESP32-C5 = 8 MB Flash + 8 MB Quad-PSRAM,
; oder Devkit n8r4): waere ein EIGENES env (analog s3/s3-8mb) mit board
; esp32-c5-devkitc1-n8r4 bzw. seeed_xiao_esp32c5 (letzteres erst ab 55.03.39),
; partitions-8mb.csv (spiffs @ 0x610000), BOARD_HAS_PSRAM + Spotify/gabbo. !! C5-
; PSRAM ist QUAD -> NIEMALS opi/qio_opi erzwingen (S3-Pattern NICHT kopieren),
; sonst PSRAM-Init aus -> getPsramSize()==0. Nicht angelegt bis solche HW im Lab ist.
;
; Kein upload_port/monitor_port-Pinning -> bei mehreren Sticks am Host IMMER
; --upload-port explizit setzen (wie s3-8mb/c3/c6).
; =============================================================================
[env:c5]
extends = common
board = esp32-c5-devkitc1-n4
board_build.partitions = partitions-4mb.csv
board_build.filesystem = littlefs
board_upload.flash_size = 4MB
build_flags =
${common.build_flags}
; Native USB-Serial-JTAG (wie c3/c6/s3-8mb).
-D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=1
; Spotify-Flag wie c6 (kompiliert, zur Laufzeit PSRAM-gegated -> ohne PSRAM no-op).
-D SIXBACK_SPOTIFY_ENABLED=1
; A/B-OTA (1.81MB-Slots) wie c3/c6 — mini-silence drueckt das FS unter 256KB-spiffs.
-D SIXBACK_OTA_ENABLED=1
; Eigener OTA-Artefakt-Namensraum: ota_pull.cpp chipPrefix_() prueft SIXBACK_OTA_PREFIX
; ZUERST -> deckt C5 ab, da chipPrefix_ keine C5-elif-Leiter besitzt.
-D SIXBACK_OTA_PREFIX='"sixback-c5-"'
; C5 kann KEIN Online-OTA (TLS-Pull): mbedtls + esp-aes-DMA-Puffer nicht
; allozierbar auf ~252 KB no-PSRAM-Heap (WiFi-6-Dual-Band-Stack) -> der Pull
; scheitert reproduzierbar am TLS-Handshake (esp-aes: Failed to allocate
; memory). Nur den Online-Pull sauber als "nicht unterstuetzt" melden statt
; kryptischem "HTTP -1"; lokaler Multipart-Upload (/api/ota) bleibt.
; Verifiziert 2026-07-03, siehe ~/.claude/docs/esp32-c5-ota-tls-heap.md
-D SIXBACK_OTA_SELFUPDATE_UNSUPPORTED=1