Load compiled binary to arduino with xloader


Do you need to load a binary (.hex) to your Arduino? If yes, please read on. There are lot of times you may find yourself in need to load a sketch to Arduino but using Arduino IDE is either too slow or not practical, say you don’t have the libraries for the sketch properly installed. The average compile time I experienced with long project is in the order of a minute. If all you need is to load a program to Arduino, with no need to change the program, you can load a compiled binary and use xloader to Arduino. The upload speed is much faster since there is no compiling anymore. As a designer, you can also distribute firmware of your hardware to a client, all without giving away your source code. Even if you wish to give away your source code, you probably need several custom libraries and the clients may not be able to quickly install and configure the libraries to compile your code in the first place. Anyway, if you are in need to load compiled binary, you should consider xloader. Personally, I load my phi-panel firmware with this program. It’s a time saver.

The following is the home site of the xloader:


It is a very neat tool to load compiled binary. The interface is simple:

For those of you that received a binary file and want to know how to load it, skip the how to create a binary file section.

How to create a binary (.hex) file

To create a binary file, first start Arduino and compile the sketch.

Then go into your windows temp file folder, such as: C:\Users\Liu\AppData\Local\Temp

Inside this folder, you should find a build folder such as: build6341600473098683432.tmp

Inside this folder, look for your main sketch file name with a .hex extension. Say your main sketch is project1.ino, then look for project1.hex. If you noticed your project’s compiled size, this .hex file is twice as large.

Copy the project1.hex file and save it elsewhere, since all build folder content is deleted if you close Arduino.

How to load a binary(.hex) file

First, choose the hex file in the first line, then choose your arduino, the baud rate changes automatically with your device selection. Then choose com port, using the same technique, i.e. select the last port (windows machine). Then press upload and wait for the message on the bottom of the screen to say XXXX KB uploaded.