You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
firmware: ESP8266 port — cross-compile clean, ~$2 MCU now reachable
ESP8266 has been EOL'd by Espressif in favour of the C3, but it's
still the dominant chip in the cheap-and-cheerful hobbyist stratum
(NodeMCU / Wemos D1 Mini boards routinely <$2 in bulk). Getting DCP
to run there is two changes:
1. Sketch-level PWM API. The reference lamp example used
Arduino-ESP32 core 3.x v3 LEDC API (ledcAttach / ledcWrite),
which doesn't exist on ESP8266. Replaced direct calls with thin
lamp_pwm_setup() / lamp_pwm_write() inline helpers that pick
the right backend at compile time (LEDC on ESP32, analogWrite
with analogWriteFreq / analogWriteRange on ESP8266, digital
fallback elsewhere). Zero protocol-layer impact.
2. library.properties: architectures=esp32,esp8266,*. The DCPBle.cpp
was already guarded with #if __has_include(<NimBLEDevice.h>),
so the BLE side compiles to nothing on ESP8266 (which has no
BLE radio anyway).
Build matrix after this commit:
ESP32-WROOM-32 Xtensa LX6 295 KB / 22.7 KB
ESP32-C3 RV32IMC 289 KB / 13.4 KB
ESP32-C6 RV32IMAC + HW-crypto 266 KB / 14.0 KB
ESP32-H2 RV32IMAC + 802.15.4 292 KB / 14.0 KB
ESP32-P4 RV32IMAFC dual-core 326 KB / 22.0 KB
ESP8266 NodeMCU Xtensa LX106 (legacy) 242 KB / 28.9 KB ← new
ESP8266 fit: 23% of flash, 36% of RAM, 93% of IRAM. Tight on IRAM
(legitimate concern on this MCU) but well within budget.
Helper-function refactor cost on ESP32: +88 bytes flash. No global
RAM change. So adding ESP8266 support did not regress the ESP32
target in any measurable way.
Side-effects:
- docs/paper/main.tex §validation paragraph generalised from "ESP32
RISC-V family" to "ESP family" with ESP8266 row added
- README cross-compile table extended with the ESP8266 row and a
reproduce command
- Roadmap bullet updated
Runtime UART validation on the ESP8266 itself is still TODO (need a
NodeMCU on the bench). Build artefacts are produced and verified by
arduino-cli.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
paragraph=Reference firmware for the DCP wire protocol. Parses COBS-framed CRC-checked DCP frames over Serial OR BLE GATT (with NimBLE-Arduino), decodes a tiny CBOR subset, dispatches to user-registered intent handlers, and optionally verifies per-frame HMAC-SHA256 signatures.
0 commit comments