-->
Page 1 of 2

Upload Arduino Sketch from Console

PostPosted: Wed Sep 20, 2017 9:47 am
by SolveEtCoagula07
Does anyone know how to upload a precompiled Arduino Sketch to an ESP8266 by using a command and not going through the Arduino IDE?

I would like to create a program that I can basically select the .bin file and hit upload. My board design (breadboard at the moment) is set up to use the NodeMCU reset method.

Re: Upload Arduino Sketch from Console

PostPosted: Wed Sep 20, 2017 10:04 am
by martinayotte
Turn ON the verbosity checkbox in ArduinoIDE, you will see that IDE is in fact calling a command line tool named "esptool", then you can do the same thing in your application.

Re: Upload Arduino Sketch from Console

PostPosted: Wed Sep 20, 2017 10:07 am
by SolveEtCoagula07
I saw other posts that mentioned that and I gave it a try with command prompt, but it did nothing. I'm not sure what is going on with the .elf file among other things that are happening with that command. It looks like several different commands are being performed. I even tried to execute them individually but had no luck.

Re: Upload Arduino Sketch from Console

PostPosted: Wed Sep 20, 2017 10:10 am
by martinayotte
"esptool" is called twice, one time for the linkage phase using the elf to produce the bin, and a second time for the upload phase which take the bin and push it into the ESP. So, it is this second phase you should look at ...