How to convert . Ino(Arduino) code to . Hex?

Asked

Viewed 1,757 times

-1

How to convert my Arduino code (.Ino) to .hex. I don’t want to use the IDE (Arduin). There is a way to do this?

  • 1

    But what is the intention of doing this?

  • Avrdude uploads data to the Arduino platform in this format.

  • But he doesn’t send the compiled code there?

  • In fact, he sends the information to copied EPROM, but before "turning" it into binary it uses the code. Hex .

  • Clarify better, please: You want to take an Arduino file (*.Ino) and generate a *.Hex from that file without using the Arduino IDE, right? In other words, you want to continue using the Arduino libraries, but want to compile everything via command line, right?

  • @Cantoni, that’s exactly it.

  • see: https://blog.arduino.cc/2018/08/24/announcing-the-arduino-command-line-interface-cli/

Show 2 more comments

2 answers

1

Yes there is, but it won’t be quite simple due to the number of bookstores and things that should connect.

The best way to view the process will be to connect the build details in the Arduin IDE (file->preferences->show detailed messages during the build)

note that Arduino IDE will copy the file . Ino to a file . cpp somewhere in a temporary folder and work from there.

However the process shown by the Arduine IDE can be simplified a bit, but it will always be a tough nut.

P.S. revolvi complement my reply, as eventually the user does not want to generate "manually" the code but only an alternative to the Rduine IDE, in which case there are other Ids that can use the same Oards and the Rduine framework, such as https://platformio.org/

0

You can generate the . Hex and . bin file in the Arduino IDE, simply type in the code, and on time to compile go to: Sketch -> Export Compiled Binary.

The code will be compiler and in the same folder where the file is saved. Ino, two more files will be generated. Hex . One of them is with the Arduino bootloader, and the without this bootloader.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.