Go Down

Topic: Upload without recompile (Read 882 times) previous topic - next topic

johndg

A search led me to a suggestion in an old thread from 2011 (@CrossRoads had some input on the thread).

It's a bit frustrating, especially when there are problems uploading and it sometimes takes several attempts, to have to wait for a recompile (with no code changes) before the upload. Was the suggestion followed up? Is there a checkbox or button in the IDE that I've missed?

ballscrewbob

SEVERAL attempts with a non changed sketch suggests deeper issues than just the IDE !

As is usual the devil is in the details which you have not really provided.

Could you also take a few moments to Learn How To Use The Forum.

Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.


It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google (who would have thunk it ! ) or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

johndg

What have I said or done wrong/in the wrong place this time? Surely it's a reasonable request, even if every upload is successful. 1) Click [Verify] - sketch compiles 2) Click [Upload] - sketch compiles again before uploading. Waste of time and electrons.
I have already discussed the problems of uploading to these cheapo Nanos at some length in another topic.

ballscrewbob

#3
Dec 11, 2020, 02:50 pm Last Edit: Dec 11, 2020, 02:54 pm by ballscrewbob
You have done nothing particularly wrong but with so many posts under your belt I would have expected a certain level of detail by this point.

None of which is evident !



It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google (who would have thunk it ! ) or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

johndg

I don't understand what detail is necessary here. OK, I should have omitted all mention of multiple upload attempts, which I only included to emphasise my frustration at the wasted time (I'm old and don't have too much left!), and which seems only to have muddied the issue.

So to amend my OP:

A search regarding uploading without recompiling led me to a suggestion in an old thread from 2011 (@CrossRoads had some input on the thread).

It's a bit frustrating to have to wait for a recompile (with no code changes) before the upload.

Was the suggestion followed up? Is there a checkbox or button in the IDE that I've missed?

Seems like a pretty straightforward question.

ballscrewbob

Now that is cleared up thankfully.

No there is no button to disable a second compilation.
However only any changes are RE-COMPILED as the first compilation is cached.
That is why a second pass is so much quicker..

If you are getting extremely long compile times then there is a strong chance that may be caused by other issues such as Antivirus slowing it down or age / type of computer hardware.

All details that are omitted from posts so far.
Not being awkward here BTW but you really, really need to read those links I provided.

Bob.





It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google (who would have thunk it ! ) or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

johndg

If you are getting extremely long compile times ....
Not really, just being picky. I'm used to compiling programs of 1000s of lines spanning dozens of files in comparable times. (FYI I'm currently using a low-spec newish (mid-2020) laptop with only a 1.1 GHz clock and 4GB RAM, Win10, so not too surprising that it' rather on the slow side). But it's not really the length of time that I'm fussing about. That said, if it did it in milliseconds the question wouldn't have arisen.

Not being awkward here BTW but you really, really need to read those links I provided.
I have. Several times.

pert

The .ino file(s) of the sketch are compiled every time, but, when using the modern IDE versions, all other source files should be cached and only recompiled if they have been modified or you change to a different board.

I think the reasoning for always recompiling the sketch is that it was not worth the effort to set up caching for it, since the user will most often have made a change since the last compilation. I guess the one time that is not the case is when you have a failed upload, but hopefully that's not happening too often.

I recommend using the latest version of the Arduino IDE and making sure all your installed boards platforms are updated in Tools > Board > Boards Manager. The reason is that the caching system has improved over time, as well as the boards platforms configuration to enable the caching to work fully.

The ability to upload without recompile is provided by the official Arduino CLI tool. The `arduino-cli upload` command only does an upload, meaning you must explicitly run the `arduino-cli compile` command first to generate the binaries (though there is an `arduino-cli compile --upload`option that provides the same combo procedure as the Arduino IDE.

johndg

#8
Dec 12, 2020, 01:36 am Last Edit: Dec 12, 2020, 01:38 am by johndg
I recommend using the latest version of the Arduino IDE and making sure all your installed boards platforms are updated in Tools > Board > Boards Manager.
Thanks - but I'm up-to-date on both. Don't think I'll go the CLI route - the one-click operation is so very convenient. But thanks for the info.

[Bob - ignore this: pert - I think my remaining intermittent upload problems probably stem from sub-standard USB cables. Mini USB's are becoming hard to find (at reasonable cost). The cables supplied with the boards appear to work reliably, but they're too short (300mm) to use for the projects I'm currently working on.]

ballscrewbob

I find thrift / second hand stores to be an awesome supply of cables and power supplies at a fraction of the cost.
Even down to the odd device that is worth tearing down for just the parts such as motors etc.

Ignoring the thinner cables or the clearly cheapo ones and going for the thicker ones or even the very thick extension types has proved very fruitful here.

Chinese cables do tend to fail more often than perhaps they should and even though some appear to be shielded I tore one apart to find it was just a pattern in the sheath here.

It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google (who would have thunk it ! ) or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

microsan84

here is a Arduino IDE "plugin" that changes the
default upload "button" (compile->upload) functionality with a one without the compile


https://github.com/manicken/arduinoUploadOnly


Custom menu at mainManuBar-Extensions-"Manicken Upload Only"
that contains:
Activate() - activates the Upload Only Button
Deactivate() - deactivates the Upload Only Button and restores the original functionality


note. the button is only replaced by the "plugin" at startup when activated
and if the plugin is removed or disabled the original button functionality is restored.

blnkjns

Good suggestion, which would also be usefull to program say 10 Arduino's in a row.

pert

If you're programming 10 Arduinos in a row you should definitely be using Arduino CLI.

Go Up