No-IDE Arduino Programming! Hex/Bin File upload from Command Line - AVR/ESP8266/ESP32

preview_player
Показать описание
Need to program 1000 boards quickly? or maybe you want to upload a pre-compiled binary/hex file? Well, this might be the solution for you! Might be common knowledge for some people, but just in case you didn't know about this, here you go!

Thanks to all the Patrons for dropping a few bucks in the tip jar to help make these videos happen!

For inquiries or design services:
Рекомендации по теме
Комментарии
Автор

One video just answers questions i spent days trying to solve. thanks.

dtecdynosystems
Автор

Useful little tip. I like the approach of simply copying what the IDE does rather than try and figure the tools out from scratch. Nice thinking! Some windows folks might appreciate this too. Stick it in a file with a .bat extension (replacing the echo command with the flash command) and run it. That way you only have to keep whacking space every time you connect a new device to flash.

@echo off
:here
echo "put your flasher command here"
pause
goto here

WistrelChianti
Автор

Easiest to follow directions I've found for this - Thanks!!!

billjuv
Автор

That was super helpful!
It's really beginner-friendly and well detailed.
Thank you for sharing this ;)

RADICAL
Автор

If you needed to load many many boards, then you should write a shell script. On Mac and Linux, a bash shell script. The simplest one is:
while true; do <insert avrdude command here>; done
When you've done your last board, hit control-c a few time until you get here your command prompt back.

The only problem is synchronizing each call to avrdude with the act of disconnecting each complete board and reconnecting the next one. The simplest way to handle that is to have the script block for user input between each call to avrdude, like this:

while true; do <insert avrdude cmd>; read x; done

Now you have to press enter after you connect each new board to be programmed. That isn't a whole lot better than pressing up arrow and enter. So another idea is have the script beep and sleep a few seconds:

while true; do <avrdude cmd>; echo <control-v><control-g>; sleep 5; done

Where it says <control-v><control-g>, you hold control key and press v at the same time, release them both, then hold control key again and press g at the same time, then release both. When the script runs, this will make a beep. Now you have 5 seconds (or whatever number of seconds you want) to remove the competed board. I believe that as long as there is no board on the programmer, then avrdude will block until one is detected. If I am wrong about that, then this sleep method may not be suitable.

Check out the man page for avrdude, as it may have command line options to assist with automation and scripting.

On Windows, you could do an equivalent power shell script, I suppose. Powers hell is nice to have as an option, but I never look forward to using it.

Nono-hkis
Автор

Just had this though few weeks before and here we are with this video. Thanks a lot man.

JenishJain
Автор

Super helpful. Only listened to the first 3 minutes before I got my answer ;-). Thanks for a simple solution. Now to make a just need to make a GUI for batch programming, also including support for ESP32 encryption (not that hard, actually) and ESP32 Sketch Data all in 1 step...a true "batch programming" method. I know Arduino is slated to the DIY guy, not us development people...but that just means there's still room for improvement ;-).

sidlori
Автор

Wow... what a wonderful tutorial, thanks a lot bro for sharing such a good piece of information.

soovui
Автор

Very cool and just what I was looking for. Many thanks from an old man ;-)

michaelboldt
Автор

Perfect -- exactly the info I was looking for! Thanks for posting it 🙂

ivandzombak
Автор

I could have used this tutorial a few weeks ago, thank you for taking the time to do it.

TheDefpom
Автор

You saved my Project, thank you very much!

MarVtec
Автор

love your videos. Informative and right to the point.

Thanks Kevin !

AzCcc
Автор

Do you have a video on pushing the bin/hex through WiFi to use the Esp8266 as a master for programming some slave uC?

brenthiggins
Автор

Great stuff! I was glad to learn this. Will be looking forward to a video explaining more of what's going on in verbose output.

AJRobinson
Автор

Again and also - Thanks for doing these!

hellmag
Автор

Short and to the point thanks for posting

anullhandle
Автор

In ESP32, if you flash .hex instead of .bin file, will the procedure change? Do I change the address? Do I still need to flash the bootloader along with it or just the .Hex one? Or do I just need to change .bin to .hex in the program file an flash?

daltonduarte
Автор

Hey Kevin that's so kool. Thanks for sharing this.

rfdave
Автор

I made a little Arduino device for my daughter who lives on the other side of the country (in Seattle). I'd like to update her device without having to ship it here and back. Is there an easy way for me to do this? We both have Macs, but she's not technical. The current version of Arduino IDE (2.3.3) does not appear to use avrdude. At least it's not listed when I compile and upload.

tommorrison