Hi,
is there an option to stop recompiling everything every time
- I click on verify, it already builds the code
- I click upload, it does it again while I did not change anything
is there a setting to avoid this nonsense ?
thanks
Hi,
is there an option to stop recompiling everything every time
is there a setting to avoid this nonsense ?
thanks
Why do you click on upload if nothing has changed ?
I dont know. This recompiling was more than likely implemented to prevent newbies from forgetting to compile and complaining that the code change that they made did not have any effect. It has been implemented ad long sd I can remember.
Your topic has been moved to the dedicated IDE2.0 section of the forum.
That's not how i understand the question. Compile sketch, next upload which compiles the sketch again.
If I want to upload to a second board? I do this all the time if I upload to a board on the workbench to test my code then if I am happy, I upload to the production board. It also annoys me that the program has to recompile again. (And some of my projects are pretty large).
if you use gcc it knows the files to compile has they have been modified and only compiles those files before linking them
if no files are modified gcc does not do anything
so it makes no sense the ide recompiles everything if nothing has changed
[I compile a small project on an nodemcu, it takes some time, so it is really annoying to wait for a FULL COMPILATION while I just verified(compiled) the code]
Did you know you can just upload the binary from the commandline?
arduino upload bin from commandline at DuckDuckGo
Surely you can write a batch file to perform this on your behalf.
good idea, I already done that a while ago
but as a UX, the ide sucks in that matter
this should at least be an option, hence my question
Opinions abound here
Copy 'n Paste Arduino Firmware - Community / Exhibition / Gallery - Arduino Forum
I dont mean that in a bad way, there is no reason the ide forces compilation unless the devs dont feel confident about the compilation of the code in the "verify" use case
it's just a waste of time
No, actually it is a "best practice"...
IMO, "production" should not be uploaded from the IDE.
The binary should be captured in a separate filespace, and a script should be utilized. But that is just my opinion. The IDE just affords too many opportunities to screw something up...
I agree in theory
in practice it's like "ugh come on I just compiled everything"
then 50x in a row it's useless nuisance
Read my explanation in post #3.
The first thing to understand is that Arduino IDE caches compiled files. It only recompiles them if the source code has changed or you selected a different board configuration.
You can verify this by checking the box next to the "Show verbose output during: ☐ compilation" preference in the File > Preferences dialog and then examining the contents of the "Output" panel after a compilation. There you will see messages for each of the cached compiled files that were used, with prefixes like:
Using cached library dependencies for file: ...
Using previously compiled file: ...
Using precompiled core: ...
The exception is the .ino
files of the sketch (even the .cpp
, .c
, .S
files of the sketch are cached). These are recompiled every time.
Maybe the recompilation of the sketch files seems inefficient, but how often does the user really need to compile the same sketch multiple times without making a modification?
I see mention of users doing a "Compile" operation and then an "Upload" operation in Arduino IDE. If you are planning to upload to the board, why not just skip over that "Compile" operation and go straight to the "Upload" operation instead? Maybe your code will fail to compile, but then there was no harm done by choosing "Upload" instead of "Compile" because the "Upload" operation is terminated when the compilation fails. Fix the error in the code and then attempt another "Upload" operation. So maybe instead of hoping for a change in Arduino IDE, it is better to adjust your use pattern instead?
As for flashing the same program to many boards, as already mentioned Arduino IDE is not intended to be used for this purpose
I don't know why it recompiles every time you upload even though nothing has changed from the last compile. All I know is that it is the ide's normal behavior.
Yes, the option is never to click on verify if you intend to upload the program if the verify succeeds.
I only ever use verify if I am not going to upload anything and I am just checking for any syntax errors.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.