Compare Flash and RAM between firmware builds

A successful link tells you that a build fits its linker layout. Comparing it with a fixed baseline tells you how much it grew. FW Mem Guard checks the total and growth budgets you choose.

1. Check the host and input formats

The published 0.3.7 pre-release runs in VS Code on Windows x64 and macOS Apple Silicon or Intel (declared macOS 15+). Guided WSL inputs run through the Windows host. Linux x64 uses the separate CLI/CI package; there is no Linux VSIX.

Each build needs a complete GNU ld MAP and its matching ARM ELF32 little-endian linked executable. Both builds must use the supported, unchanged memory layout: explicitly selected non-overlapping Flash/RAM banks, with aggregate and per-bank budgets. A board, compiler brand or firmware operating system alone does not establish compatibility. Review the full compatibility boundary before trying another configuration.

2. Preserve two completed builds

Finish the baseline build, then copy its MAP and ELF to a separate baseline directory. Finish your changed build and keep its matching pair at current-build paths. Do not overwrite the baseline when rebuilding. Record the source revision, board, toolchain and build flags so you can explain the difference later.

Select pairs from completed builds. Structural agreement between MAP and ELF is useful validation, but does not prove that the files came from the same build or provide an atomic snapshot during a rebuild.

3. Set up the saved project

  1. Open a folder you control and trust. In the Command Palette, run FW Mem Guard: Set Up / Update Project.
  2. Select baseline MAP + ELF, then current MAP + ELF.
  3. Confirm regions that cover the required Flash load and RAM run addresses in both builds. A region alias is not automatically an additional active memory bank.
  4. Enter all four limits: Flash total, Flash growth, RAM total and RAM growth. Choose limits that reflect your project requirements.
  5. Select Validate and Save and save a new .fwmg.json project. Review the comparison in Output.

4. Interpret and repeat

PASS means all configured aggregate and per-bank checks passed. BUDGET_EXCEEDED is a valid comparison with one or more exceeded limits. ERROR means there is no valid result for that operation.

After another completed rebuild, run Compare Builds or Repeat Last Comparison. Current input bytes are read again. Keep the baseline fixed unless you deliberately update it. Use Open Project after reopening VS Code.

Start with a reproducible reference

The MicroPython F411 example grows Flash by 8,240 bytes and RAM by 4,096 bytes. Its download includes original firmware, rebuild instructions, licenses, section references and raw verification evidence. Rebuilding checks allocated section addresses and sizes; it does not claim byte-identical ELF output.

Next: Choose and test memory budgets · First comparison · Troubleshooting.

This guide describes published 0.3.7 behavior. The results panel includes section changes and conservative object/archive attribution. No automatic upload or telemetry.