Repository navigation
Expand file tree
/
Copy pathplatformio.ini
More file actions
417 lines (405 loc) · 21.7 KB
/
Copy pathplatformio.ini
File metadata and controls
417 lines (405 loc) · 21.7 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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
[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.
; 94ecf31: RPC 0x07 = Get Network State per Spec (ESP Web Tools >= 10.5
; pollt das im Dashboard; der alte Pin quittierte 0x07 mit ERROR_NONE).
https://github.com/tostmann/improv-wifi-busware.git#94ecf3147d93922ee6413318fafbe2489730f76b
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
; Classic ist das einzige ausgelieferte Target ohne SIXBACK_SPOTIFY_ENABLED,
; darum faellt silence.mp3 (Spotify-only) aus dem FS-Image.
; ACHTUNG: der frueher hier stehende Grund ("~120KB sprengen zusammen mit einem
; 244KB-data/ das 256KB-spiffs -> LFS_ERR_NOSPC") stimmt seit 2026-05-28 NICHT
; mehr. silence.mp3 ist 30KB, data/ gesamt 170KB, und c3/c6/c5 fahren dieselbe
; partitions-4mb.csv MIT Spotify und vollem data/. Der Filter spart nur
; LittleFS-Fuellstand, er ist kein Platzzwang.
; Der Grund, Spotify hier trotzdem nicht nachzuziehen, ist der OTA-Pfad:
; esp32-classic hat die hoechste Abbruchquote beim Firmware-Pull aller Targets
; (Messung 2026-09-11 auf dem Update-Host: rund 20% abgebrochene Verbindungen
; gegen ~1% beim s3), und ein groesseres Image verlaengert genau diesen
; Download. Entscheidung 2026-09-18 zu Issue #43. 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}
; CDC_ON_BOOT=0 -> Serial() bleibt UART0 (CH343), Logs landen weiter als
; /dev/ttyACM* am Host. USB_MODE=1 schaltet die native USB-Peripherie von
; USB-OTG auf HW-CDC-JTAG; zusammen mit SIXBACK_IMPROV_DUAL laeuft dann
; eine ZWEITE Improv-Instanz auf dem nativen Port (wifi_provisioning.cpp).
; Damit provisioniert dieses EINE Image sowohl Boards MIT UART-Bridge
; (DevKitC-1) als auch OHNE (Arduino Nano ESP32 u.ae.) — die Serial-Achse
; der Target-Matrix entfaellt. Partitionen unveraendert => OTA-safe.
-D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=0
-D SIXBACK_IMPROV_DUAL=1
-D BOARD_HAS_PSRAM
; Spotify-Trigger-Pipeline (Web-API-Remote per scmudc-preset-pressed):
; benoetigt WiFiClientSecure + Token-Refresh + Heap-Reserven. Der S3 ist
; die Referenz- und Empfehlungsplattform dafuer (PSRAM + 16MB Flash).
; NICHT mehr "S3-only": c3, c6, c5 und c5-16mb bauen die Pipeline seither
; ebenfalls mit. Ge-no-op't ist der Code nur noch auf env:esp32 — Grund
; siehe dort und 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
; Plausibilitaets-Deckel auf esp_rom_delay_us — siehe src/rom_delay_guard.cpp.
; NUR auf C6: dort ist die rueckwaerts springende Zeitbasis (rev v0.0)
; nachgewiesen, und nur dort ist der IDF-Temperatursensor-Underflow am
; Blech aufgetreten (INT_WDT-Panic aus phy_get_tsens_value, 3x reproduziert).
-D SIXBACK_ROM_DELAY_GUARD=1
-Wl,--wrap=esp_rom_delay_us
; SYSTIMER-Blackbox (src/systimer_blackbox.cpp): eigener GPTimer-ISR in IRAM
; schreibt rohe SYSTIMER-Counter + OS-Tick-Alarm-Target in RTC-NOINIT-RAM,
; der den Panic-Reboot ueberlebt. NUR c6 — auf gesunden Targets reine Last.
-D SIXBACK_SYSTIMER_BLACKBOX=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
; =============================================================================
; ESP32-C5 mit 16 MB Flash + in-package PSRAM (ESP32-C5-WROOM-1-N16R8 u.a.).
; Eigenes Target analog s3-8mb: das Standard-c5-Env (4-MB-Layout, no-PSRAM)
; laeuft auf diesen Boards zwar, laesst aber 12 MB Flash und das komplette
; PSRAM brach liegen. Hier: 16-MB-Partitions (partitions.csv, identisch S3 —
; NVS 0x9000 + otadata 0xE000 liegen in ALLEN Layouts gleich) + PSRAM aktiv.
; ACHTUNG: der Umstieg 4->16 MB geht nur per Factory-Install, und das
; Factory-Image traegt im NVS-Bereich 0xFF (merge_bin-Fuellung) und wird ab
; 0x0 geschrieben => die Einstellungen sind danach weg (Image-Inhalt geprueft
; 2026-10-01; die fruehere Aussage "ein Umstieg erhaelt die Einstellungen"
; war falsch).
; Board esp32-c5-devkitc1-n16r4 (pioarduino): bringt memory_type qio_qspi,
; psram_type qio (C5-PSRAM ist QUAD — NIE das S3-opi-Muster!) und
; BOARD_HAS_PSRAM als extra_flag mit. Der "R4"-Name ist kosmetisch — die
; PSRAM-Groesse wird zur Laufzeit erkannt; gemessen 2026-07-30 auf einem
; C5HR8-Die (eFuse PSRAM_CAP=2): esp_psram total = 8 MB.
; KEIN SIXBACK_OTA_SELFUPDATE_UNSUPPORTED: die TLS-Heap-Enge, die den
; no-PSRAM-C5 vom Online-Pull ausschliesst, faellt mit PSRAM weg — der
; mbedtls-PSRAM-Hook nimmt die Handshake-Puffer. On-hardware bestaetigt
; 2026-07-30 (N16R8-Board, dieser Build): /api/update/check zieht das
; sixback.io-Manifest per HTTPS fehlerfrei; exakt dieser Handshake starb
; auf dem no-PSRAM-C5 an "esp-aes: Failed to allocate memory". Der volle
; Install-Download folgt beim naechsten Release-Zyklus.
[env:c5-16mb]
extends = common
board = esp32-c5-devkitc1-n16r4
board_build.partitions = partitions.csv
board_build.filesystem = littlefs
build_flags =
${common.build_flags}
; Native USB-Serial-JTAG (wie c5).
-D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=1
; PSRAM vorhanden -> Spotify + gabbo wie bei den S3-Targets
; (beide zusaetzlich runtime-PSRAM-gegated).
-D SIXBACK_SPOTIFY_ENABLED=1
-D SIXBACK_GABBO_WATCHER_ENABLED=1
-D SIXBACK_OTA_ENABLED=1
; Eigener Artefakt-Namensraum fuer OTA-Pull (ota_pull.cpp chipPrefix_).
-D SIXBACK_OTA_PREFIX='"sixback-c5-16mb-"'
; ---------------------------------------------------------------------------
; Lab-Probe-Envs (NICHT releasen, nicht im build_release-Target-Set).
; Identisch zu c5-16mb bzw. s3, plus SIXBACK_CONTIG_PROBE=1: instrumentiert
; die zwei Live-Outbound-Handler und macht outboundBlockFloor() zur Laufzeit
; verstellbar (/api/dbg/contig). Zweck: den fest verdrahteten 16000er-Floor
; gegen Messwerte pruefen — FHEM 144729 msg1367262.
; ---------------------------------------------------------------------------
[env:c5-16mb-probe]
extends = env:c5-16mb
build_flags =
${env:c5-16mb.build_flags}
-D SIXBACK_CONTIG_PROBE=1
[env:s3-probe]
extends = env:s3
build_flags =
${env:s3.build_flags}
-D SIXBACK_CONTIG_PROBE=1
; =============================================================================
; SixBack-Max — 16-MB-Targets mit grosser NVS (partitions-16mb-max.csv).
;
; WOFUER: Installationen mit vielen Speakern. Ein Preset-Slice braucht ~26 NVS-
; Entries, das Inventory ~28, das Spotify-Token ~29; die Standard-NVS hat 630
; Entries, davon 126 GC-Reserve. Ab ~9 Boxen ist sie so voll, dass JEDER Write
; am Gate scheitert (nvs_helper.cpp writeBlobGated_) — inklusive des Writes,
; der wieder Platz schaffen wuerde. Max hat 6930 Entries.
;
; ⚠️ EIGENE FLASH-OFFSETS, DAHER EIGENER NAME. app0 liegt bei 0x50000 statt
; 0x10000, spiffs bei 0x650000 statt 0x610000. Die Partitionstabelle wird von
; OTA NIE geschrieben, ein Geraet behaelt also die Tabelle seines Erst-Flashs —
; es gibt zwei Generationen im Feld, und jede braucht ihr eigenes
; Update-Manifest. esp-web-tools matcht den Improv-Firmware-Namen EXAKT gegen
; manifest.name; ueber FW_NAME="SixBack-Max" bekommt die Max-Generation daher
; zwingend manifest-update-*-max.json und kann die Standard-Offsets gar nicht
; erst ziehen. FW_NAME und SIXBACK_OTA_PREFIX sind hier KEINE Kosmetik —
; ohne sie schreibt ein Standard-Update die App auf NVS+otadata.
;
; Die beiden Envs sind ABSICHTLICH unterschiedlich aufgebaut:
; s3-max erbt env:s3 vollstaendig (Board, PSRAM, Feature-Flags, Port-
; Pinning) und ergaenzt nur. Das geht, weil env:s3 KEINEN
; SIXBACK_OTA_PREFIX setzt (ota_pull.cpp faellt dort auf die
; Chip-Erkennung zurueck) — es gibt also nichts zu ueberschreiben.
; ⚠️ Wer env:s3 spaeter einen OTA_PREFIX gibt, muss s3-max auf
; das c5-Muster unten umstellen.
; c5-16mb-max wiederholt die Flags von env:c5-16mb, statt sie zu erben, weil
; env:c5-16mb einen SIXBACK_OTA_PREFIX setzt und der hier ein
; anderer sein muss. Ein `-U SIXBACK_OTA_PREFIX` vor dem neuen
; -D ist KEINE Loesung: PlatformIO macht daraus zwei Flags, eines
; davon ein leeres `-U`, und der Compiler bricht mit
; "macro names must be identifiers" ab (verifiziert 2026-08-14).
; Gleiches Muster wie env:s3-8mb, das aus demselben Grund nicht
; von env:s3 erbt.
; =============================================================================
[env:s3-max]
extends = env:s3
board_build.partitions = partitions-16mb-max.csv
build_flags =
${env:s3.build_flags}
-D FW_NAME='"SixBack-Max"'
-D SIXBACK_OTA_PREFIX='"sixback-s3-max-"'
; Max lebt komplett unter /max/ — eigenes manifest.json, eigene Artefakte.
; Am gemeinsamen Manifest wuerde jedes Standard-Release den Max-Geraeten
; sofort eine neue Version melden und ihr Pull liefe auf 404. MUSS auf "/"
; enden (ota_pull.cpp haengt den Dateinamen direkt an).
-D SIXBACK_OTA_BASE_URL='"https://sixback.io/max/"'
[env:c5-16mb-max]
extends = common
board = esp32-c5-devkitc1-n16r4
board_build.partitions = partitions-16mb-max.csv
board_build.filesystem = littlefs
build_flags =
${common.build_flags}
; --- ab hier identisch zu env:c5-16mb; bei Aenderungen dort mitziehen ---
-D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=1
-D SIXBACK_SPOTIFY_ENABLED=1
-D SIXBACK_GABBO_WATCHER_ENABLED=1
-D SIXBACK_OTA_ENABLED=1
; --- Max-spezifisch ---
-D FW_NAME='"SixBack-Max"'
-D SIXBACK_OTA_PREFIX='"sixback-c5-16mb-max-"'
; Siehe env:s3-max — eigenes Manifest unter /max/, MUSS auf "/" enden.
-D SIXBACK_OTA_BASE_URL='"https://sixback.io/max/"'