From 52b517511baeba28344e8cb7630aa4772e8420ac Mon Sep 17 00:00:00 2001 From: zackees Date: Sun, 10 May 2026 08:15:16 -0700 Subject: [PATCH] chore(baseline-205): fix teensylc env name + capture #205 AC baseline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The TARGETS list in `ci/measure_baseline_205.py` used `teensyLC` (camelCase), but the env key in `tests/platform/teensylc/platformio.ini` is `teensylc` (lowercase). fbuild's env lookup is case-sensitive, so every prior run errored: `build failed: invalid environment 'teensyLC': config error: environment 'teensyLC' not found`. With the name corrected, all four targets build cleanly. Captured numbers (release, host arm-none-eabi-size): | env | TUs | .text | .data | .bss | .dmabuffers | |-------------|----:|-------:|------:|------:|------------:| | teensylc | 68 | 6,980 | 380 | 1,068 | 192 | | teensy30 | 68 | 6,684 | 272 | 1,120 | 248 | | teensy41 | 85 | n/a | 3,776 | 1,664 | n/a | | stm32f103c8 | 201 | 12,192 | 240 | 1,012 | — | Quick AC read for #205: - AC#1 (teensylc Blink ≤ 250 TUs, .bss ≤ 3 KB): met (68 TUs, 1,068 B). - AC#2 (teensy30 .dmabuffers ≤ 1 KB): met (248 B). - AC#3 (teensy41 builds): met. - AC#4 (stm32f103c8 builds + SPI auto-discovered): builds; SPI attribution requires inspecting compile_commands separately. Caveat: the script's "excluded library hits" scan counts every substring match in compile_commands.json, including `-I.../libraries/` flags propagated to every TU. That is why FNET/Snooze/RadioHead each show "68 entries" on teensylc — the count equals the TU count because the include path is on every TU, not because 68 FNET sources were compiled. The functional AC#1 ("FNET / Snooze / RadioHead / mbedtls not compiled") still requires inspecting the `file` fields, not the `arguments` fields. Tracked as a follow-up. Refs: #205 AC#1-#4. Co-Authored-By: Claude Opus 4.7 (1M context) --- ci/measure_baseline_205.py | 5 +- tasks/baseline-205.md | 116 +++++++++++++++++++++---------------- 2 files changed, 69 insertions(+), 52 deletions(-) diff --git a/ci/measure_baseline_205.py b/ci/measure_baseline_205.py index 458282ea..41a64ee4 100644 --- a/ci/measure_baseline_205.py +++ b/ci/measure_baseline_205.py @@ -57,7 +57,10 @@ # in the fixture project. teensyLC, teensy30, teensy41, stm32f103c8 all ship a # Blink-class sketch as ``src/main.ino``. TARGETS = [ - ("teensyLC", "tests/platform/teensylc", "Blink"), + # WHY: env names must match the [env:...] keys in each fixture's + # platformio.ini exactly (case-sensitive). The teensy LC env is + # `teensylc` lowercase per tests/platform/teensylc/platformio.ini. + ("teensylc", "tests/platform/teensylc", "Blink"), ("teensy30", "tests/platform/teensy30", "Blink"), ("teensy41", "tests/platform/teensy41", "Blink"), ("stm32f103c8", "tests/platform/stm32f103c8", "Blink"), diff --git a/tasks/baseline-205.md b/tasks/baseline-205.md index 4d37312a..eb9e9639 100644 --- a/tasks/baseline-205.md +++ b/tasks/baseline-205.md @@ -1,68 +1,82 @@ -# Baseline measurements for #205 — DEFERRED +# Baseline measurements for #205 -Captured: 2026-04-24 -Git SHA: (this PR's foundation commit — see PR description) -Branch: main -Tooling: `uv run python ci/measure_baseline_205.py` +Captured: 2026-05-10T15:14:08Z +Git SHA: fffb1b4cc6389942bf63cc2ae0f01e65484e10fe +Branch: chore/fix-baseline-205-teensylc-env +Tooling: cargo 1.94.1 (29ea6fb6a 2026-03-24), size tool: arm-none-eabi-size.exe -## Status +Generated by `uv run python ci/measure_baseline_205.py`. See module docstring for methodology. -The capture script (`ci/measure_baseline_205.py`) is implemented and -runnable. The actual data capture is **deferred to a follow-up step** -because Teensy/STM32 builds against the foundation-landed resolver are -heavyweight (multi-minute per board on a cold cache) and the build -infrastructure on the development workstation could not complete all -four boards within the agent run-window. Running the script in a clean -CI environment with all toolchains pre-warmed will populate the table -below. +## teensylc / Blink -## How to run +- Project: `tests/platform/teensylc` +- ELF: `tests/platform/teensylc/.fbuild/build/teensylc/release/firmware.elf` +- TU count: 68 +- .text: 6,980 bytes +- .data: 380 bytes +- .bss: 1,068 bytes +- .dmabuffers: 192 bytes +- Excluded library hits in compile_commands.json: + - FNET: 68 entries + - Snooze: 68 entries + - RadioHead: 68 entries + - mbedtls: not present -```bash -uv run python ci/measure_baseline_205.py --out tasks/baseline-205.md -uv run python ci/measure_baseline_205.py --targets teensyLC teensy41 -``` +## teensy30 / Blink -The script: +- Project: `tests/platform/teensy30` +- ELF: `tests/platform/teensy30/.fbuild/build/teensy30/release/firmware.elf` +- TU count: 68 +- .text: 6,684 bytes +- .data: 272 bytes +- .bss: 1,120 bytes +- .dmabuffers: 248 bytes +- Excluded library hits in compile_commands.json: + - FNET: 68 entries + - Snooze: 68 entries + - RadioHead: 68 entries + - mbedtls: not present -1. Builds `tests/platform/` for `teensyLC`, `teensy30`, - `teensy41`, `stm32f103c8` via the existing `fbuild` CLI. -2. Counts distinct `file` entries in the resulting - `compile_commands.json` (TU count). -3. Probes `firmware.elf` section sizes (`.text`, `.data`, `.bss`, - `.dmabuffers`) via `arm-none-eabi-size` (preferred) or `llvm-size`. -4. Scans `compile_commands.json` for `FNET` / `Snooze` / `RadioHead` - / `mbedtls` references — the four libraries that were wrongly - selected before the foundation phases of #205 landed. +## teensy41 / Blink -## Expected once captured +- Project: `tests/platform/teensy41` +- ELF: `tests/platform/teensy41/.fbuild/build/teensy41/release/firmware.elf` +- TU count: 85 +- .text: section absent or size tool unavailable +- .data: 3,776 bytes +- .bss: 1,664 bytes +- .dmabuffers: section absent or size tool unavailable +- Excluded library hits in compile_commands.json: + - FNET: 85 entries + - Snooze: 85 entries + - RadioHead: 85 entries + - mbedtls: not present -| env | TU count | .text | .data | .bss | .dmabuffers | excluded libs | -|--------------|----------|-------|-------|------|-------------|----------------| -| teensyLC | (≤ 250 per AC#1) | … | … | (≤ 3 KB per AC#1) | — | none of FNET/Snooze/RadioHead/mbedtls present | -| teensy30 | … | … | … | … | (≤ 1 KB per AC#2) | none | -| teensy41 | … | … | … | … | … | (regression baseline) | -| stm32f103c8 | … | … | … | … | — | (must include SPI per AC#4) | +## stm32f103c8 / Blink -## Why not just ship the placeholder and call it done +- Project: `tests/platform/stm32f103c8` +- ELF: `tests/platform/stm32f103c8/.fbuild/build/stm32f103c8/release/firmware.elf` +- TU count: 201 +- .text: 12,192 bytes +- .data: 240 bytes +- .bss: 1,012 bytes +- Excluded library hits in compile_commands.json: + - FNET: not present + - Snooze: not present + - RadioHead: not present + - mbedtls: not present -Phase 6 (acceptance gates) needs *real* numbers to anchor the -"+1%" / "≤ 250" / "≤ 3 KB" thresholds in the issue body. A guess will -be argued about during Phase 6 reviews. The capture has to happen on a -host that can actually link these four ELFs, which means either (a) a -clean CI runner with the Teensy/STM32 toolchains pinned, or (b) a -warmed local install where every framework download has already -completed. Neither was ready inside this PR's window. +## Build status -## Tracking - -This file is replaced wholesale on the next successful run of -`measure_baseline_205.py`. The non-empty rows above will be filled in -with measured numbers + an ISO timestamp + the exact git SHA the -measurement was taken against. +| env | build | TU count | size tool | notes | +|---|---|---|---|---| +| teensylc | ok | 68 | arm-none-eabi-size.exe | | +| teensy30 | ok | 68 | arm-none-eabi-size.exe | | +| teensy41 | ok | 85 | arm-none-eabi-size.exe | | +| stm32f103c8 | ok | 201 | arm-none-eabi-size.exe | | ## Run command -```bash +``` uv run python ci/measure_baseline_205.py --out tasks/baseline-205.md ```