title: Converting from *.hex to *.bin for ARM on Linux
body: <p>I want to upload program to my STM32F4 Discovery board using <code>st-flash</code> command.
  Problem is when I try to upload *.hex or *.elf file it is just not working.
  I tried many ways ( like using xxd ) of converting from *.elf or *.hex to *.bin but it is still not working when I upload it. And yes, I tried uploading hex file from other Windows computer and it works.</p>
  
  <p>Sample ( first three lines, just to show you how it looks inside ) of hex file:</p>
  
  <pre><code>:020000040800F2
  :100000000000022099020008A1020008A5020008D1
  :10001000A9020008AD020008B102000800000000BB
  </code></pre>
  
  <p>My OS is Ubuntu 14.04 LTS.</p>
  
  <p>Thanks for help!</p>