Skip to content

Commit 52b5175

Browse files
zackeesclaude
andcommitted
chore(baseline-205): fix teensylc env name + capture #205 AC baseline
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/<lib>` 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) <noreply@anthropic.com>
1 parent fffb1b4 commit 52b5175

2 files changed

Lines changed: 69 additions & 52 deletions

File tree

ci/measure_baseline_205.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@
5757
# in the fixture project. teensyLC, teensy30, teensy41, stm32f103c8 all ship a
5858
# Blink-class sketch as ``src/main.ino``.
5959
TARGETS = [
60-
("teensyLC", "tests/platform/teensylc", "Blink"),
60+
# WHY: env names must match the [env:...] keys in each fixture's
61+
# platformio.ini exactly (case-sensitive). The teensy LC env is
62+
# `teensylc` lowercase per tests/platform/teensylc/platformio.ini.
63+
("teensylc", "tests/platform/teensylc", "Blink"),
6164
("teensy30", "tests/platform/teensy30", "Blink"),
6265
("teensy41", "tests/platform/teensy41", "Blink"),
6366
("stm32f103c8", "tests/platform/stm32f103c8", "Blink"),

tasks/baseline-205.md

Lines changed: 65 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,82 @@
1-
# Baseline measurements for #205 — DEFERRED
1+
# Baseline measurements for #205
22

3-
Captured: 2026-04-24
4-
Git SHA: (this PR's foundation commit — see PR description)
5-
Branch: main
6-
Tooling: `uv run python ci/measure_baseline_205.py`
3+
Captured: 2026-05-10T15:14:08Z
4+
Git SHA: fffb1b4cc6389942bf63cc2ae0f01e65484e10fe
5+
Branch: chore/fix-baseline-205-teensylc-env
6+
Tooling: cargo 1.94.1 (29ea6fb6a 2026-03-24), size tool: arm-none-eabi-size.exe
77

8-
## Status
8+
Generated by `uv run python ci/measure_baseline_205.py`. See module docstring for methodology.
99

10-
The capture script (`ci/measure_baseline_205.py`) is implemented and
11-
runnable. The actual data capture is **deferred to a follow-up step**
12-
because Teensy/STM32 builds against the foundation-landed resolver are
13-
heavyweight (multi-minute per board on a cold cache) and the build
14-
infrastructure on the development workstation could not complete all
15-
four boards within the agent run-window. Running the script in a clean
16-
CI environment with all toolchains pre-warmed will populate the table
17-
below.
10+
## teensylc / Blink
1811

19-
## How to run
12+
- Project: `tests/platform/teensylc`
13+
- ELF: `tests/platform/teensylc/.fbuild/build/teensylc/release/firmware.elf`
14+
- TU count: 68
15+
- .text: 6,980 bytes
16+
- .data: 380 bytes
17+
- .bss: 1,068 bytes
18+
- .dmabuffers: 192 bytes
19+
- Excluded library hits in compile_commands.json:
20+
- FNET: 68 entries
21+
- Snooze: 68 entries
22+
- RadioHead: 68 entries
23+
- mbedtls: not present
2024

21-
```bash
22-
uv run python ci/measure_baseline_205.py --out tasks/baseline-205.md
23-
uv run python ci/measure_baseline_205.py --targets teensyLC teensy41
24-
```
25+
## teensy30 / Blink
2526

26-
The script:
27+
- Project: `tests/platform/teensy30`
28+
- ELF: `tests/platform/teensy30/.fbuild/build/teensy30/release/firmware.elf`
29+
- TU count: 68
30+
- .text: 6,684 bytes
31+
- .data: 272 bytes
32+
- .bss: 1,120 bytes
33+
- .dmabuffers: 248 bytes
34+
- Excluded library hits in compile_commands.json:
35+
- FNET: 68 entries
36+
- Snooze: 68 entries
37+
- RadioHead: 68 entries
38+
- mbedtls: not present
2739

28-
1. Builds `tests/platform/<board>` for `teensyLC`, `teensy30`,
29-
`teensy41`, `stm32f103c8` via the existing `fbuild` CLI.
30-
2. Counts distinct `file` entries in the resulting
31-
`compile_commands.json` (TU count).
32-
3. Probes `firmware.elf` section sizes (`.text`, `.data`, `.bss`,
33-
`.dmabuffers`) via `arm-none-eabi-size` (preferred) or `llvm-size`.
34-
4. Scans `compile_commands.json` for `FNET` / `Snooze` / `RadioHead`
35-
/ `mbedtls` references — the four libraries that were wrongly
36-
selected before the foundation phases of #205 landed.
40+
## teensy41 / Blink
3741

38-
## Expected once captured
42+
- Project: `tests/platform/teensy41`
43+
- ELF: `tests/platform/teensy41/.fbuild/build/teensy41/release/firmware.elf`
44+
- TU count: 85
45+
- .text: section absent or size tool unavailable
46+
- .data: 3,776 bytes
47+
- .bss: 1,664 bytes
48+
- .dmabuffers: section absent or size tool unavailable
49+
- Excluded library hits in compile_commands.json:
50+
- FNET: 85 entries
51+
- Snooze: 85 entries
52+
- RadioHead: 85 entries
53+
- mbedtls: not present
3954

40-
| env | TU count | .text | .data | .bss | .dmabuffers | excluded libs |
41-
|--------------|----------|-------|-------|------|-------------|----------------|
42-
| teensyLC | (≤ 250 per AC#1) ||| (≤ 3 KB per AC#1) || none of FNET/Snooze/RadioHead/mbedtls present |
43-
| teensy30 ||||| (≤ 1 KB per AC#2) | none |
44-
| teensy41 |||||| (regression baseline) |
45-
| stm32f103c8 |||||| (must include SPI per AC#4) |
55+
## stm32f103c8 / Blink
4656

47-
## Why not just ship the placeholder and call it done
57+
- Project: `tests/platform/stm32f103c8`
58+
- ELF: `tests/platform/stm32f103c8/.fbuild/build/stm32f103c8/release/firmware.elf`
59+
- TU count: 201
60+
- .text: 12,192 bytes
61+
- .data: 240 bytes
62+
- .bss: 1,012 bytes
63+
- Excluded library hits in compile_commands.json:
64+
- FNET: not present
65+
- Snooze: not present
66+
- RadioHead: not present
67+
- mbedtls: not present
4868

49-
Phase 6 (acceptance gates) needs *real* numbers to anchor the
50-
"+1%" / "≤ 250" / "≤ 3 KB" thresholds in the issue body. A guess will
51-
be argued about during Phase 6 reviews. The capture has to happen on a
52-
host that can actually link these four ELFs, which means either (a) a
53-
clean CI runner with the Teensy/STM32 toolchains pinned, or (b) a
54-
warmed local install where every framework download has already
55-
completed. Neither was ready inside this PR's window.
69+
## Build status
5670

57-
## Tracking
58-
59-
This file is replaced wholesale on the next successful run of
60-
`measure_baseline_205.py`. The non-empty rows above will be filled in
61-
with measured numbers + an ISO timestamp + the exact git SHA the
62-
measurement was taken against.
71+
| env | build | TU count | size tool | notes |
72+
|---|---|---|---|---|
73+
| teensylc | ok | 68 | arm-none-eabi-size.exe | |
74+
| teensy30 | ok | 68 | arm-none-eabi-size.exe | |
75+
| teensy41 | ok | 85 | arm-none-eabi-size.exe | |
76+
| stm32f103c8 | ok | 201 | arm-none-eabi-size.exe | |
6377

6478
## Run command
6579

66-
```bash
80+
```
6781
uv run python ci/measure_baseline_205.py --out tasks/baseline-205.md
6882
```

0 commit comments

Comments
 (0)