Go Down

Topic: how to precompile project and then directly upload it to dozen of boards (Read 410 times) previous topic - next topic


Hello, I am pretty new to arduino but I fell in love with it.
I have dozens of the same esp boards and I wrote program for them. When I want to upload sketch to all my boards it takes a lot of time. I found out, that every time step of "compiling sketch" runs from start again and again and it takes the longest part of time before upload starts.

But I have the same program for all boards (the same boards) so I want to speed things up and ideally "pre-compile" my program and then just upload it directly to all boards (as I think it should be able to precompile it and not run new "compiling skettch" step again and again as it compiles the same code).

How to do it please?
(short tutorial would be highly appreciated)


Is your IDE version relatively recent?  Because these days a bunch of the intermediate files are cached, so the 2nd and subsequent "upload" should proceed much faster than the first.

However, there is also an "Export Compiled Binary" option in the "sketch" menu that will put a "blink.ino.bin" or similar in the sketch directory.  There isn't actually a command in the IDE to upload from that, but if you turn on "verbose" upload diagnostics in the preferences panel, you can see the command that it uses, and duplicate that in a batch file or whatever:

/Applications/Arduino-1.8.5.app/Contents/Java/portable/packages/esp8266/tools/esptool/0.4.13/esptool -vv -cd ck -cb 115200 -cp /dev/cu.wchusbserial3140 -ca 0x00000 -cf blink.ino.bin


I am using Arduino IDE 1.8.5.
Perfect! That commnand seems to be what I need. I will try it. Many thanks!


There have been multiple problems with both the ESP8266 package and arduino-builder that cause caching to not work. I believe the last of these has now been resolved, but there has not been a release of the ESP8266 package since they made the necessary fix.

Go Up