Skip to content

Commit ae40e2b

Browse files
committed
Release v0.6.2-esp32: ADR-081 kernel + Timer Svc fix, 4MB CI variant
version.txt → 0.6.2. firmware-ci.yml: matrix-build both 8MB (sdkconfig.defaults) and 4MB (sdkconfig.defaults.4mb) variants, uploading variant-named artifacts (esp32-csi-node.bin / esp32-csi-node-4mb.bin, partition-table.bin / partition-table-4mb.bin). Unblocks 6-binary releases from CI alone, no local ESP-IDF required. CHANGELOG: promote [Unreleased] ADR-081 work into [v0.6.2-esp32], plus Fixed entries for Timer Svc stack overflow and the fast_loop_cb → emit_feature_state implicit-decl compile error. Validation: 30 s run on ESP32-S3 (MAC 3c:0f:02:e9:b5:f8), 149 rv_feature_state emissions, no stack overflow, HEALTH mesh packet sent. Co-Authored-By: claude-flow <ruv@ruv.net>
1 parent a426ae3 commit ae40e2b

3 files changed

Lines changed: 56 additions & 19 deletions

File tree

.github/workflows/firmware-ci.yml

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,50 @@ on:
1212

1313
jobs:
1414
build:
15-
name: Build ESP32-S3 Firmware
15+
name: Build ESP32-S3 Firmware (${{ matrix.variant }})
1616
runs-on: ubuntu-latest
1717
container:
1818
image: espressif/idf:v5.4
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
include:
23+
- variant: 8mb
24+
sdkconfig: sdkconfig.defaults
25+
partition_table_name: partitions_display.csv
26+
size_limit_kb: 1100
27+
artifact_app: esp32-csi-node.bin
28+
artifact_pt: partition-table.bin
29+
- variant: 4mb
30+
sdkconfig: sdkconfig.defaults.4mb
31+
partition_table_name: partitions_4mb.csv
32+
size_limit_kb: 1100
33+
artifact_app: esp32-csi-node-4mb.bin
34+
artifact_pt: partition-table-4mb.bin
1935

2036
steps:
2137
- uses: actions/checkout@v4
2238

23-
- name: Build firmware
39+
- name: Build firmware (${{ matrix.variant }})
2440
working-directory: firmware/esp32-csi-node
2541
run: |
2642
. $IDF_PATH/export.sh
43+
if [ "${{ matrix.variant }}" != "8mb" ]; then
44+
cp "${{ matrix.sdkconfig }}" sdkconfig.defaults
45+
fi
2746
idf.py set-target esp32s3
2847
idf.py build
2948
30-
- name: Verify binary size (< 1100 KB gate)
49+
- name: Verify binary size (< ${{ matrix.size_limit_kb }} KB gate)
3150
working-directory: firmware/esp32-csi-node
3251
run: |
3352
BIN=build/esp32-csi-node.bin
3453
SIZE=$(stat -c%s "$BIN")
35-
MAX=$((1100 * 1024))
54+
MAX=$((${{ matrix.size_limit_kb }} * 1024))
3655
echo "Binary size: $SIZE bytes ($(( SIZE / 1024 )) KB)"
37-
echo "Size limit: $MAX bytes (1100 KB — includes WASM runtime + HTTP client for Seed swarm bridge)"
56+
echo "Size limit: $MAX bytes (${{ matrix.size_limit_kb }} KB)"
3857
if [ "$SIZE" -gt "$MAX" ]; then
39-
echo "::error::Firmware binary exceeds 1100 KB size gate ($SIZE > $MAX)"
58+
echo "::error::Firmware binary exceeds ${{ matrix.size_limit_kb }} KB size gate ($SIZE > $MAX)"
4059
exit 1
4160
fi
4261
echo "Binary size OK: $SIZE <= $MAX"
@@ -47,14 +66,11 @@ jobs:
4766
ERRORS=0
4867
BIN=build/esp32-csi-node.bin
4968
50-
# Check binary exists and is non-empty.
5169
if [ ! -s "$BIN" ]; then
5270
echo "::error::Binary not found or empty"
5371
exit 1
5472
fi
5573
56-
# Check partition table magic (0xAA50 at offset 0).
57-
# Use od instead of xxd (xxd not available in espressif/idf container).
5874
PT=build/partition_table/partition-table.bin
5975
if [ -f "$PT" ]; then
6076
MAGIC=$(od -A n -t x1 -N 2 "$PT" | tr -d ' ')
@@ -64,14 +80,12 @@ jobs:
6480
fi
6581
fi
6682
67-
# Check bootloader exists.
6883
BL=build/bootloader/bootloader.bin
6984
if [ ! -s "$BL" ]; then
7085
echo "::warning::Bootloader binary missing or empty"
7186
ERRORS=$((ERRORS + 1))
7287
fi
7388
74-
# Verify non-zero data in binary (not all 0xFF padding).
7589
NONZERO=$(od -A n -t x1 -N 1024 "$BIN" | tr -d ' f\n' | wc -c)
7690
if [ "$NONZERO" -lt 100 ]; then
7791
echo "::error::Binary appears to be mostly padding (non-zero chars: $NONZERO)"
@@ -84,19 +98,27 @@ jobs:
8498
echo "Flash image integrity verified"
8599
fi
86100
101+
- name: Stage release binaries with variant-specific names
102+
working-directory: firmware/esp32-csi-node
103+
run: |
104+
mkdir -p release-staging
105+
cp build/esp32-csi-node.bin release-staging/${{ matrix.artifact_app }}
106+
cp build/partition_table/partition-table.bin release-staging/${{ matrix.artifact_pt }}
107+
if [ "${{ matrix.variant }}" = "8mb" ]; then
108+
cp build/bootloader/bootloader.bin release-staging/bootloader.bin
109+
cp build/ota_data_initial.bin release-staging/ota_data_initial.bin
110+
fi
111+
ls -la release-staging/
112+
87113
- name: Check QEMU ESP32-S3 support status
88114
run: |
89115
echo "::notice::ESP32-S3 QEMU support is experimental in ESP-IDF v5.4. "
90116
echo "Full smoke testing requires QEMU 8.2+ with xtensa-esp32s3 target."
91117
echo "See: https://github.com/espressif/qemu/wiki"
92118
93-
- name: Upload firmware artifact
119+
- name: Upload firmware artifact (${{ matrix.variant }})
94120
uses: actions/upload-artifact@v4
95121
with:
96-
name: esp32-csi-node-firmware
97-
path: |
98-
firmware/esp32-csi-node/build/esp32-csi-node.bin
99-
firmware/esp32-csi-node/build/bootloader/bootloader.bin
100-
firmware/esp32-csi-node/build/partition_table/partition-table.bin
101-
firmware/esp32-csi-node/build/ota_data_initial.bin
122+
name: esp32-csi-node-firmware-${{ matrix.variant }}
123+
path: firmware/esp32-csi-node/release-staging/
102124
retention-days: 90

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [v0.6.2-esp32] — 2026-04-20
11+
12+
Firmware release cutting ADR-081 and the Timer Svc stack fix discovered during
13+
on-hardware validation. Cut from `main` at commit pointing to this entry.
14+
Tested on ESP32-S3 (QFN56 rev v0.2, MAC `3c:0f:02:e9:b5:f8`), 30 s continuous
15+
run: no crashes, 149 `rv_feature_state_t` emissions (~5 Hz), medium/slow ticks
16+
firing cleanly, HEALTH mesh packets sent.
17+
18+
### Fixed
19+
- **Firmware: Timer Svc stack overflow on ADR-081 fast loop**`emit_feature_state()` runs inside the FreeRTOS Timer Svc task via the fast-loop callback; it calls `stream_sender` network I/O which pushes past the ESP-IDF 2 KiB default timer stack and panics ~1 s after boot. Bumped `CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH` to 8 KiB in `sdkconfig.defaults`, `sdkconfig.defaults.template`, and `sdkconfig.defaults.4mb`. Follow-up (tracked separately): move heavy work out of the timer daemon into a dedicated worker task.
20+
- **Firmware: `adaptive_controller.c` implicit declaration** (#404) — `fast_loop_cb` called `emit_feature_state()` before its static definition, triggering `-Werror=implicit-function-declaration`. Added a forward declaration above the first use.
21+
22+
### Changed
23+
- **CI: firmware build matrix (8MB + 4MB)**`firmware-ci.yml` now matrix-builds both the default 8MB (`sdkconfig.defaults`) and 4MB SuperMini (`sdkconfig.defaults.4mb`) variants, uploading distinct artifacts and producing variant-named release binaries (`esp32-csi-node.bin` / `esp32-csi-node-4mb.bin`, `partition-table.bin` / `partition-table-4mb.bin`).
24+
1025
### Added
1126
- **ADR-081: Adaptive CSI Mesh Firmware Kernel** — New 5-layer architecture
1227
(Radio Abstraction Layer / Adaptive Controller / Mesh Sensing Plane /
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.6.1
1+
0.6.2

0 commit comments

Comments
 (0)