-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplatformio.ini
More file actions
138 lines (135 loc) · 7.2 KB
/
Copy pathplatformio.ini
File metadata and controls
138 lines (135 loc) · 7.2 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
; SPDX-License-Identifier: MIT
; Copyright (c) 2026 Tomasz Fiedoruk
; Biper-AP lane B — additive envs only. This file is OURS (not upstream);
; it is picked up by the root extra_configs wildcard variants/*/platformio.ini,
; so no upstream file needs editing to add environments.
[env:Biper_AP_C6L_spike]
extends = env:M5Stack_Unit_C6L_companion_radio_ble
board = unit_c6l
; First spike measurement: mesh+BLE+WiFi(AP)+HTTP = 2 094 093 B — does not fit the stock
; min_spiffs app slot (1 966 080 B). huge_app = 3 MB app, no OTA slot; rescue
; path is unaffected (the official web installer erases all and rewrites from 0).
; Side effect on repartition: SPIFFS moves -> the unit gets a fresh identity.
; 16 MB + 2x OTA (decyzja wlasciciela F-04, 21.08): stockowy board udawal
; 4 MB, a huge_app.csv wypalal OTA na zawsze. Board JSON w boards/unit_c6l.json.
board_build.partitions = variants/biper_ap/partitions_c6l_16mb.csv
; Bazowe `-w` wycisza WSZYSTKO — w tym funkcje bool bez return, ktora oddaje
; smieci z rejestru (tak przeszedl F-01 audytu Codexa: wynik wipe z przycisku
; byl przypadkiem). -w wygrywa z -Werror=... niezaleznie od kolejnosci flag
; (zmierzone na tym toolchainie), wiec jedyna droga jest zdjecie -w w NASZYCH
; envach; brakujacy return staje sie bledem kompilacji dla calego drzewa.
build_unflags = -w
build_flags =
${env:M5Stack_Unit_C6L_companion_radio_ble.build_flags}
-Werror=return-type
; Raw bytes from the radio entropy source at boot. Bench use, by hand — the
; verdict (distinct values, bits set, longest run) is printed either way:
; pio run -e Biper_AP_C6L_spike -t upload --build-flag=-DBIPER_RNG_SAMPLES
; Biper layer: AP window plus OLED/button/feedback.
; Autostart okna jest od 20.08.2026 ZACHOWANIEM PRODUKCYJNYM (decyzja
; wlasciciela, odwraca doktryne z 18.08): panel to jedyny interfejs kostki,
; wiec siec musi istniec od wlaczenia zasilania. Dawna flaga laboratoryjna
; BIPER_AP_AUTOSTART znikla z kodu; straznikiem prywatnosci i energii jest
; okno gasnace po 10 minutach bez zywego panelu (Codex F-04).
-D BIPER_AP=1
-D BIPER_SCREEN=1
; Private key export is inherited from [arduino_base], where upstream's own
; comment reads "comment these out for more secure firmware". The panel never
; issues that command, and the WS bridge is reachable from any page open in
; the phone's browser — so the cube must not be able to hand out its identity.
-UENABLE_PRIVATE_KEY_EXPORT
-UENABLE_PRIVATE_KEY_IMPORT
; --- overrides of inherited upstream defines: each -U before its own -D ---
; RAM diet (P0): the stock env sizes these for hobbyist mega-networks
; (350 contacts ~66 kB + 256-frame offline queue ~46 kB of STATIC RAM).
; A Biper family cube needs neither; WiFi AP + BLE + WS must fit in the
; C6's 512 kB with no PSRAM. Measured before/after: heap with AP+screen went 34 kB -> 115 kB free.
; NO -U before our -D. PlatformIO reorders flags: every -U lands AFTER all
; -D in the final compiler command, so "-U X -D X=100" erased BOTH defines
; and each translation unit fell back to its own header default: MyMesh.h
; said MAX_CONTACTS=100, BaseChatMesh.h said 32. One class, two array sizes,
; two different offsets of every member behind the array - the advert path
; stored contacts where the panel's enumeration never looked. The owner's
; pair could not see each other since the RAM diet landed (bench address
; probes 19.08: MAXC=100 vs MAXC=32 on the same object). A later -D cleanly
; overrides an earlier one; that is the only mechanism used now.
-D MAX_CONTACTS=100
-D OFFLINE_QUEUE_SIZE=32
; Upstream's P_LORA_TX_LED=15 is a copy-paste from another board: C6L has a
; WS2812 on GPIO2 and no plain LED (the buzzer sits on GPIO11); GPIO15 is the OLED RST line (M5 docs).
; Left defined, the radio would hold the display in reset between TXes.
-UP_LORA_TX_LED
; Route Serial to the USB-Serial-JTAG console (board manifest leaves it on
; UART0 pins, which makes every print invisible on the USB port).
-D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=1
; BiperAp.cpp includes NodePrefs.h from the companion_radio example: the
; layer flips setRepeatEn(true) at boot (owner doctrine: a Biper cube
; assumes no infrastructure and forwards packets by default).
-I examples/companion_radio
build_src_filter =
${env:M5Stack_Unit_C6L_companion_radio_ble.build_src_filter}
+<helpers/biper/*.cpp>
; Env-scoped target swap: same file as upstream plus a radio-SPI accessor
; (the display must share the radio's SPIClass — see BiperC6LTarget.cpp).
-<../variants/m5stack_unit_c6l/UnitC6LBoard.cpp>
+<../variants/biper_ap/BiperC6LTarget.cpp>
lib_deps =
${env:M5Stack_Unit_C6L_companion_radio_ble.lib_deps}
adafruit/Adafruit SSD1306 @ ^2.5.13
; WiFi-only variant, prepared for the owner's panel-milestone decision ("kill BLE once the
; PWA replaces the official app"): extends the USB companion env (no BLE
; stack, ~25-40 kB RAM back). Built on demand, not flashed by default.
[env:Biper_AP_C6L_wifi_only]
extends = env:M5Stack_Unit_C6L_companion_radio_usb
board = unit_c6l
; 16 MB + 2x OTA (decyzja wlasciciela F-04, 21.08): stockowy board udawal
; 4 MB, a huge_app.csv wypalal OTA na zawsze. Board JSON w boards/unit_c6l.json.
board_build.partitions = variants/biper_ap/partitions_c6l_16mb.csv
; Patrz komentarz przy env spike: -w zdjete, brakujacy return = blad (F-01).
build_unflags = -w
build_flags =
${env:M5Stack_Unit_C6L_companion_radio_usb.build_flags}
-Werror=return-type
-D BIPER_AP=1
-D BIPER_SCREEN=1
-UENABLE_PRIVATE_KEY_EXPORT
-UENABLE_PRIVATE_KEY_IMPORT
; NO -U before our -D. PlatformIO reorders flags: every -U lands AFTER all
; -D in the final compiler command, so "-U X -D X=100" erased BOTH defines
; and each translation unit fell back to its own header default: MyMesh.h
; said MAX_CONTACTS=100, BaseChatMesh.h said 32. One class, two array sizes,
; two different offsets of every member behind the array - the advert path
; stored contacts where the panel's enumeration never looked. The owner's
; pair could not see each other since the RAM diet landed (bench address
; probes 19.08: MAXC=100 vs MAXC=32 on the same object). A later -D cleanly
; overrides an earlier one; that is the only mechanism used now.
-D MAX_CONTACTS=100
-D OFFLINE_QUEUE_SIZE=32
-UP_LORA_TX_LED
-D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=1
-I examples/companion_radio
build_src_filter =
${env:M5Stack_Unit_C6L_companion_radio_usb.build_src_filter}
+<helpers/biper/*.cpp>
-<../variants/m5stack_unit_c6l/UnitC6LBoard.cpp>
+<../variants/biper_ap/BiperC6LTarget.cpp>
lib_deps =
${env:M5Stack_Unit_C6L_companion_radio_usb.lib_deps}
adafruit/Adafruit SSD1306 @ ^2.5.13
; Test natywny CZYSTEJ logiki warstwy Biper (BiperLogic.h): prawda doreczen
; dopasowana po znaczniku i podtrzymanie okna hotspotu. Wzor: native_kiss_modem.
; Upstreamowy env `native` stoi na brakujacych deklaracjach atol/atoi w
; ConfigSerializer.cpp (identycznie na czystym upstreamie — ograniczenie
; odziedziczone, nie nasza regresja), wiec testujemy bez kompilowania src/.
[env:native_biper_faces]
platform = native
test_framework = googletest
build_flags = -std=c++17
-I src
test_filter = test_biper_faces
build_src_filter =
-<*>
lib_deps =
google/googletest @ 1.17.0