Firmware file is empty

The file has no contents, so there is nothing to program. A build that failed often leaves a zero-byte artifact behind where the firmware should be.

FLASH_FILE_EMPTY

Symptoms

  • The file is refused as soon as it is picked, with no progress at all.
  • The artifact shows 0 bytes in Finder or Explorer.

Likely causes

  • The build failed after creating the output file but before writing to it — the linker error is the real problem.
  • The file was still being written when it was picked.
  • objcopy ran against a target that produced no loadable sections.

How to fix it

  1. Read the build log

    A zero-byte artifact is a symptom; the linker or objcopy error above it is the failure to fix.

  2. Rebuild from clean

    Remove the output directory and build again so a stale empty file cannot be picked up.

  3. Check the file has contents

    Confirm the artifact is a sensible size for your firmware before flashing it.

    ls -l build/firmware.hex