Skip to content

Fix field-test findings in zoom layout and from-elf - #6

Merged
iharhl merged 1 commit into
mainfrom
bugfix/field-test-findings
Nov 8, 2026
Merged

iharhl merged 1 commit into
mainfrom
bugfix/field-test-findings

Conversation

@iharhl

@iharhl iharhl commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Fixes from a field test of memmap against datasheet memory maps and real firmware ELFs.

Layout

  • Address-ordered stacks. Detail columns stacked in one lane are ordered by where they attach on the source column, so fan lines no longer cross (RP2040 case). Stacked columns keep a 36 px gap so both end addresses fit (STM32F103 case).
  • Routing around columns. A zoom whose detail column is two or more lanes to the right of its source now bends its fan lines around the columns in between, moving the detail column up or down as needed (new memmap/layout/routing.py). New W107 reports lines that still run through a column. describe --json lists each connector's line points.
  • Stretched overviews. A column that zooms into a much taller stack is stretched to that height, up to 5×, so its fan lines don't start crammed. Sources are processed right to left, so chained zooms measure against already-grown columns.
  • Lift. A stack of zooms that would run past the bottom of the drawing moves up to the header row, unless a column in it has an explicit offset.

from-elf

  • Keil armlink: RW and ZI sections that share one name get (RW) / (ZI) suffixes. Compressed RW data is detected without mistaking alignment padding or another section for it. Stored copies get a "copied to" or "compressed, unpacked to" note.
  • Pico SDK: non-allocated (COPY) sections (RAM vector table, heap, stacks) are drawn with a note.
  • IAR: section names lose their surrounding blanks.

Tests and docs

  • tests/test_routing.py covers the routing geometry.
  • Layout regression tests cover ordering, detours, W107, stretch (including chains), lift, and the offset and title cases.
  • New armlink, IAR and (COPY) import tests.
  • Two new real-firmware snapshots and goldens: stm32l4_keil_rfe_master (Keil, compressed RW) and rp2040_pico_rom (Pico SDK (COPY) sections).
  • Every snapshot now records section alignment.
  • AGENTS.md (W107, layout behaviour, connectors) and docs/from-elf.md are updated.

Golden changes

Three existing goldens change, all reviewed visually:

  • example_f303, column_titles: +12 px from the wider stack gap. The end addresses no longer crowd.
  • r52_zephyr_philosophers: shorter. The zooms hang beside their sources, with no empty band at the bottom.

docs/examples.svg (README composite, assembled by hand) still shows the old 12 px tighter F303 panel.

Checks

uv run pytest (599 passed), uv run mypy, uv run ruff check.

🤖 Generated with Claude Code

Layout:
- Order detail columns stacked in one lane by where they attach on the
  source, so their fan lines do not cross, and keep a wider gap between
  them for both end addresses.
- Bend the fan lines of a zoom two or more lanes to the right around the
  columns in between, moving the detail column up or down as needed. New
  W107 reports lines that still run through a column; `describe` lists
  the points of each connector.
- Stretch a column that zooms into a much taller stack (up to 5x), from
  the right so chained zooms measure against grown columns.
- Move a stack of zooms that runs past the bottom up to the header row,
  unless a column in it has an offset.

from-elf:
- Keil armlink: suffix RW/ZI sections that share a name, detect
  compressed RW data without mistaking padding or another section for
  it, and note stored copies.
- Draw the Pico SDK's non-allocated (COPY) sections with a note.
- Strip the blanks IAR leaves around section names.

Tests and docs: routing unit tests, layout regressions, two new
real-firmware snapshots (Keil STM32L4, Pico SDK RP2040), section
alignment in every snapshot, and AGENTS.md / docs/from-elf.md updates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@iharhl
iharhl merged commit cda0cd7 into main Nov 8, 2026
3 checks passed
@iharhl
iharhl deleted the bugfix/field-test-findings branch November 8, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant