Go Down

Topic: Uploading without re-compiling (Read 567 times) previous topic - next topic


Has anyone suggested this option in the IDE as I find I often reprogram several boards with different hardware options but no changes to code and am really getting frustrated by the re-compile which takes place. Could an extra button be added to the menu bar to upload only???


Are you using Arduino IDE 1.8.6? There has been a lot of work done in recent IDE versions to reduce the amount of unnecessary re-compiling. Now only the sketch should be re-compiled after the initial compilation so it's pretty fast. There is a bug where, if you're using a hardware package that has a lot of custom options (like ESP8266) on Windows, the core library can't be cached because the cache filename contains all the options and it exceeds the stupidly low maximum filename length that Windows imposes:
That forces a full re-compile every time.

As for a new button, that would end up causing a ton of confusion for beginners ("I changed my code but them when I upload I don't see the changes"). The primary goal of the Arduino IDE is to be beginner friendly, even if that is harmful to performance. That doesn't mean performance should be ignored. However, adding a new UI element that will harm the beginner experience just for the sake of occasionally saving a few seconds of compilation is clearly a bad idea. The current approach of the IDE being smart enough to automatically skip unnecessary compilation while using the same old UI is much better.

And as for your question "Has anyone suggested this": I know this has popped up in the issue tracker in the past, though I didn't find it after a quick search through the thousands of issue reports.


It is possible to save the HEX code that gets uploaded to the Arduino and then upload that to as many boards as you like separately from the IDE. Of course that only works if all the recipient boards are identical.


Two or three hours spent thinking and reading documentation solves most programming problems.

Go Up