title: How to generate a hex file in RISC-V
body: <p>Now, I'm implemented an ASP (Application Specific Processor) and I want to develop it with an RISC-type architecture. Reading a bit on the web, I concluded that the best option is to use RISC-V.</p>
  
  <p>The idea is to develop a design in Verilog so that it can run the RISC-V ISA. And the software application that the processor should run is very simple, only a few arithmetic operations. For this reason as it is only one application it is not necessary that the processor supports an operating system.</p>
  
  <p>I'm thinking of generating a hex file from my C application and loading the file into a ROM memory. But I could not find how I can generate the hex file from my code in C?</p>
  
  <p>I built correctly my program with <strong>riscv64-unknown-elf-gcc</strong> </p>
  
  <h2>$ riscv64-unknown-elf-gcc -o hello hello.c</h2>
  
  <p>But I don't know how to generate a hex file.</p>
  
  <p>Could someone tell me how can I create this file?</p>