Skip to content

No-op incremental build omits the Flash:/RAM: percentage lines, so size-parsing tooling sees no report #1277

Closed

Description

@stevenmunn312-tech

On fbuild 2.5.15, a build where nothing changed prints no Flash: / RAM: percentage lines — presumably because the linker didn't re-run. Reasonable behaviour on its own, but it makes those lines unreliable as a size source for tooling, since the common case once a debounce settles is a no-op build.

Repro

Build twice in a row with no source changes.

First (clean) build:

   0.00 Memory: 31.50KB Flash, 2.00KB RAM
  35.88 Flash: 16.19KB / 31.50KB (51.4%)
  35.88 RAM:   1.82KB / 2.00KB (90.9%)
build succeeded in 35.9s (flash: 16580 bytes, ram: 1862 bytes)

Second (no-op) build:

   0.00 Memory: 31.50KB Flash, 2.00KB RAM
build succeeded in 0.3s (flash: 16580 bytes, ram: 1862 bytes)

The Flash: / RAM: lines are gone; the summary line and the Memory: line remain.

Impact

Design Studio for FastLED shows a live controller-capacity meter driven by a compile-only build while the user edits a graph. Parsing Flash:/RAM: meant a settled no-op build silently produced no reading at all, so we fall back to reading fbuild's own .fbuild/build/<env>/release/.firmware_size_cache.json — which works, but couples us to an internal file.

Possible resolutions, in preference order

  1. Reprint the cached size report on a no-op build. The numbers are known — the summary line already carries them.
  2. Document Memory: + build succeeded (...) as the stable pair. Both are printed on every build, and together they give used bytes and the limit, which is everything needed for a percentage:
    Memory: 31.50KB Flash, 2.00KB RAM              <- limits
    build succeeded in 0.3s (flash: 16580 bytes, ram: 1862 bytes)   <- used
    
    If that pairing is intended to be stable, we'd happily parse those instead and drop the cache-file dependency entirely.
  3. A --size-report / machine-readable flag, if one is planned — fbuild symbols --json already covers the per-symbol case nicely, but it needs an ELF and is heavier than a headline figure.

Option 2 costs nothing if those lines are already contractual; a one-line note in the docs would be enough for us to switch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions