Skip to content

Instantly share code, notes, and snippets.

@K4zuki
Last active August 29, 2015 14:20
Show Gist options
  • Save K4zuki/b16115fff381cf833c11 to your computer and use it in GitHub Desktop.
Save K4zuki/b16115fff381cf833c11 to your computer and use it in GitHub Desktop.
automatic hex2bin run on KEIL for ARM Cortex-M processor

THIS MIGHT NOT WORK ON SOME MICROCONTROLLERS

  • ARMCC has binary converter "fromelf" command like "objcopy" command in GCC

  • some Cortex-M microcontroller vendor requires binary file, instead of ihex forat, for their binary downloader

  • tested with Keil uVision5 free(32kB) version:

    • open ""Options for Target"" window
      • [User] Tab
        • [Run User Programs After Build/Rebuild] section
          • check [Run #1] marked and input :
            fromelf --bincombined --output [output file name] [input armelf filename] where [input armelf filename] would be specified under [Output] tab.
          • http://www.keil.com/support/man/docs/uv4/uv4_ut_elfdwt.htm for NXP
          • --bin option instead of --bincombined crates folder if the chip have nolenear memory sections
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment