Invalid file type

Only .elf and .out files are supported.

INVALID_FILE_TYPE

Symptoms

  • The file is rejected the moment you drop it, before any upload starts.
  • The build succeeded and the file flashes fine, but MCUHex will not read it.

Likely causes

  • A .hex or .bin was selected. Those carry only the bytes written to flash — the debug information is stripped out when they are generated.
  • A build byproduct was picked instead of the linked image (.map, .o, .a, .su, .lst).
  • The extension is neither .elf nor .out, even though the file is a valid ELF.

How to fix it

  1. Find the linked image in your build output

    Every ARM toolchain writes an ELF next to the .hex/.bin it derives from it. Look for the one matching your project name.

    STM32CubeIDE   Debug/<project>.elf
    Makefile/CMake build/<project>.elf
    PlatformIO     .pio/build/<env>/firmware.elf
    Zephyr         build/zephyr/zephyr.elf
    Arduino CLI    <sketch>.ino.elf
  2. Rename a valid ELF that has another extension

    Some toolchains emit .axf or no extension at all. If readelf recognises it, renaming to .elf is enough — MCUHex checks the extension before uploading.

    arm-none-eabi-readelf -h firmware.axf | head -3
  3. Confirm the file actually carries debug info

    An ELF built without -g is accepted for upload but yields no symbols. Check for DWARF sections before you upload.

    arm-none-eabi-readelf -S firmware.elf | grep debug