Firmware is too large to send
The image has to travel to the SDK before it can be programmed, and this one is over the 16 MB that fits in one transfer. An ELF carrying full debug symbols is usually what pushes it over — the part that gets programmed is a fraction of that.
FLASH_FILE_TOO_LARGE
Symptoms
- A file is rejected the moment it is picked, before any progress appears.
- The same project flashes fine from its .hex but not from its .elf.
Likely causes
- The ELF carries DWARF debug sections. They can be tens of megabytes while the loadable segments are a few hundred kilobytes — only the latter ever reach the chip.
- The build links in a large read-only data blob (fonts, bitmaps, lookup tables) that genuinely exceeds the limit.
- A release archive or disk image was picked instead of the firmware artifact.
How to fix it
-
Flash the .hex or .bin instead
Almost every toolchain writes one next to the ELF. It holds exactly the bytes that get programmed, without the debug sections.
-
Produce one if your build does not
Convert the ELF with objcopy — the output is the loadable image on its own.
arm-none-eabi-objcopy -O ihex firmware.elf firmware.hex -
Keep using the ELF for symbols
Debug symbols are uploaded separately and are not affected by this limit. Load the ELF there and flash the .hex here.