How to upload compiled hex files in Arduino boards easily....

Uploading hex compiled binary files in Arduino boards is an easy task. You need only the Arduino IDE installed and make some simple editing steps, as follows.
Run the Arduino IDE then open the Preferences window and check the upload option in "Show verbose output during:".


Close the Preferences window, set the Board type and Board's port parameters in the IDE, load one example Arduino's script (classic blink.ino is ok) and click on the Upload button. This is just to have the command line output available in the IDE output window. Copy this output line (see snapshot below) in a text editor.


Using the text editor, save this text file in a folder of your choice (for me C:\temp) as, for example, upload.bat.
Place the hex file you want to upload in the same directory.
Add some ^ line break characters and newlines to make the line more readable.
Replace the path name of the just compiled example.hex file at the end of the command line with the name (and path) of the hex file you want to upload (for me Stackduino-G3_ProMini.exe).
Add " (double quotes) characters in case you got paths that have spaces in between.


Open a DOS shell command prompt in the folder you choose. Write upload.bat (or any name you give to the text batch file) and hit Enter.


Done.


pierluigi.giorgi@gmail.com

May 2019