Files
frame/poc/apps/m1_hardware
Lainandlain d73cadbcd6 ci: repair first-run workflow failures (#1)
## Root causes (run 33344835245)

| Job | Cause | Fix |
|---|---|---|
| Host GCC compatibility | Runner GCC 13.3 has no `-std=c++26`;
`poc/host` sets `CMAKE_CXX_STANDARD 26` | Install `gcc-14`/`g++-14`, set
`CC`/`CXX` |
| Host branch coverage | `llvm-profdata: command not found` (clang-18
present, LLVM tools absent) | Install `llvm-18`, prepend
`/usr/lib/llvm-18/bin` to PATH |
| ESP-IDF dev firmware | `cmake: command not found` — action overrides
container entrypoint so the IDF env is never sourced | Source `.
/opt/esp/idf/export.sh` in the build step |
| ESP-IDF M1 hardware firmware | same as above | same |
| Repository gates | clang-format v22-formatted sources vs CI
clang-format-18 (console_service.cc:260,300; display_service.cc:31;
status_log.cc:34) | Reformatted with clang-format 18.1.8 semantics; full
dry-run green |
| Gitleaks | No secret finding: the push-event scan range referenced
stale pre-rewrite revision `7bae861` (unknown revision); scan infra
failed | No change — one-time bootstrap artifact; PR/post-merge events
have valid ranges (verified by this run) |

Host Clang ASan/UBSan and Host clang-tidy were already green; `required`
is the aggregate.

Formatting diffs are formatting-only (`struct tm utc_time{}` -> `struct
tm utc_time {}`).

---------

Co-authored-by: ania-lain <[email protected]>
2026-08-31 09:04:01 +08:00
..

Frame M1 Hardware Firmware

This isolated ESP-IDF application implements the 0.1.0-dev.1 hardware-status vertical slice for the Waveshare ESP32-S3-RLCD-4.2 N16R8 board. It does not load dynamic plugins.

It checks the ESP32-S3 target, 16 MiB flash, 8 MiB PSRAM, ST7305 display, shared I2C RTC/SHTC3, active-low KEY, SDMMC TF card transitions, Wi-Fi STA configuration with softAP web provisioning, native landscape 400x300 display output, and USB Serial/JTAG console output.

Wi-Fi provisioning persists the last credentials as plaintext JSON at /system/wifi.json on the internal system_fs partition. This is a user-approved development-board exception (SEC-010, recorded in _doc/requirements-v4.2.md under M1-007): ESP-IDF v6.0.2 requires Flash Encryption or an HMAC eFuse key to protect NVS encryption keys, and both provisioning steps are irreversible on the single development board. Production boards must switch to NVS-encrypted credential storage before shipping. The password never appears in UART output, logs, or status.

On boot the device auto-connects with the saved credentials. When no valid configuration exists, or after 5 disconnects without an IP address or 60 seconds without obtaining one, it starts an open setup hotspot Frame-Setup-XXXX at 192.168.4.1. The portal's network list is populated from a live scan; hidden networks cannot be typed into the browser form — configure those through the console with wifi set <ssid> hidden. Holding KEY for 3 seconds or longer also requests the setup hotspot; such a hold is a portal command and does not count as a button press.

Build with the exact IDF tag:

. "$IDF_PATH/export.sh"
cmake --preset default --fresh
cmake --build --preset default

The console is available through USB Serial/JTAG at 115200 baud. Useful commands:

status [--json]
wifi set <ssid> [hidden]
wifi clear
wifi reconnect
wifi status
prov status
prov start
prov scan
storage probe
storage status
selftest

Do not place real credentials in command transcripts or committed evidence. wifi set asks for the password after parsing the command so it is not stored in command history; terminal software must also keep local echo disabled. The password is persisted only inside /system/wifi.json under the SEC-010 development-board exception and is never echoed back.