ADR-110: ESP32-C6 firmware extension (#764)

Closes the firmware-side ADR-110 design at v0.7.0-esp32 after a 38-iter /loop SOTA sprint.

Headline (bench, COM9+COM12 ESP32-C6):
- 99.56% cross-board RX, 104.1 µs smoothed offset stdev (≤100 µs §2.4 target met)
- 3.95× EMA suppression, 1.4 ppm crystal skew preserved

4 firmware releases: v0.6.7 / v0.6.8 / v0.6.9 / v0.7.0-esp32.
42 ADR-110 unit tests, 1761 v2 workspace tests, full Firmware CI + QEMU green.
This commit is contained in:
rUv
2026-05-23 15:34:48 -04:00
committed by GitHub
parent 5d544126ee
commit 00a234eda8
63 changed files with 5864 additions and 63 deletions
@@ -73,3 +73,13 @@ static mmwave_state_t s_stub_mmwave = {0};
esp_err_t mmwave_sensor_init(int tx, int rx) { (void)tx; (void)rx; return ESP_ERR_NOT_FOUND; }
bool mmwave_sensor_get_state(mmwave_state_t *s) { if (s) *s = s_stub_mmwave; return false; }
const char *mmwave_type_name(mmwave_type_t t) { (void)t; return "None"; }
/* ADR-110 iter 38 — fuzz-harness stub for c6_sync_espnow_is_valid.
* Real implementation lives in main/c6_sync_espnow.c; the fuzz target
* (`fuzz_serialize`) only links csi_collector.c against esp_stubs.c, so
* iter-11's `if (c6_sync_espnow_is_valid()) flags |= (1 << 4);` needs a
* symbol here or `clang -fsanitize=fuzzer` fails with an undefined-reference
* linker error. Returning false means the bit-4 cross-node-sync-valid flag
* stays 0 in fuzz inputs, which is the natural fuzz semantic. */
#include <stdbool.h>
bool c6_sync_espnow_is_valid(void) { return false; }
+21 -7
View File
@@ -62,14 +62,28 @@ static inline esp_err_t esp_timer_delete(esp_timer_handle_t h) { (void)h; return
/* ---- esp_wifi_types.h ---- */
/** Minimal rx_ctrl fields needed by csi_serialize_frame. */
/** Minimal rx_ctrl fields needed by csi_serialize_frame.
*
* ADR-110: the HE-tagging path in csi_collector.c references either
* (CONFIG_SOC_WIFI_HE_SUPPORT branch) cur_bb_format, second
* (legacy / S3 branch) sig_mode, cwb, stbc
*
* Both sets are unconditionally declared here so a single stub builds
* for either branch — the Makefile picks which side via -D flags. */
typedef struct {
signed rssi : 8;
unsigned channel : 4;
unsigned noise_floor : 8;
unsigned rx_ant : 2;
/* Padding to fill out the struct so it compiles. */
unsigned _pad : 10;
signed rssi : 8;
unsigned channel : 4;
unsigned noise_floor : 8;
unsigned rx_ant : 2;
/* ADR-110 HE-branch fields (CONFIG_SOC_WIFI_HE_SUPPORT path) */
unsigned cur_bb_format : 4; /**< 0=11b 1=11g/a 2=HT 3=VHT 4=HE-SU 5=HE-MU 6=HE-ER-SU 7=HE-TB */
unsigned second : 4; /**< secondary 40 MHz channel offset */
/* ADR-110 legacy-branch fields (pre-HE chips) */
unsigned sig_mode : 2; /**< 0=non-HT 1=HT 3=VHT */
unsigned cwb : 1; /**< 0=20 MHz 1=40 MHz */
unsigned stbc : 1; /**< STBC flag */
/* Padding to keep alignment predictable. */
unsigned _pad : 18;
} wifi_pkt_rx_ctrl_t;
/** Minimal wifi_csi_info_t needed by csi_serialize_frame. */