- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to export the binary file of a code in Arduino IDE
Sometimes, you need to export the compiled binary of your code for sharing with colleagues, or for programming your board using some other programmers like ISP programmer, or for OTA (Over-The-Air update) purposes. This exported binary (actually hex file for Arduino boards) will contain not only your application code, but also the source code of the dependencies in the hex format. The way to export this binary is the following −
Go to Sketch -> Export Compiled Binary
Now, navigate to the folder containing your sketch (your .ino file). You can use Sketch -> Show Sketch Folder for navigating to the sketch folder.
You will see two hex files in that folder.
Basically, these are the files that Arduino generates every time you compile/upload your sketch. By clicking on 'Export Compiled Binary', you specifically request Arduino to save these files for you to access/ share later on.
A word of caution if you are using the hex files to program the Arduino board separately, outside of Arduino IDE: Please note that if you are uploading to the Arduino board using an ISP programmer, it is preferred to choose the hex file with bootloader. If you choose the one without bootloader, then in some cases, it may overwrite the bootloader and you may not be able to program your board again. See the discussion here: https://forum.arduino.cc/index.php?topic=513626.0. All this is anyway for advanced users. If you are new to Arduino, better to stick to programming the board using the Arduino IDE.
- How to compile code using Arduino IDE
- Auto-format code in Arduino IDE
- How to program a board using Arduino IDE
- How to change programmer in Arduino IDE
- How to increase the font size of text in Arduino IDE?
- How to show line numbers in Arduino IDE?
- How to use the Autocomplete feature in Arduino IDE 2.0?
- Download a new library in Arduino IDE
- How to download and install Arduino IDE 2.0?
- How to Use a Serial Monitor with Arduino IDE 2.0?
- Structure of Arduino Code
- See inbuilt examples in Arduino IDE
- Change board selection in Arduino IDE
- Installing a new library in Arduino IDE 2.0
- Arduino IDE 2.0 – Using the Boards Manager