Go Down

Topic: How can I upload to my Arduino without compiling? (Read 2 times) previous topic - next topic

B3nj1771

I'm constantly forgetting to plug my USB back into my Arduino before I upload and I often get annoying avrDude not in sink messages and problems with my COM port.  Every single time I want to upload I have to wait for my code to compile, even if that exact same code has already been compiled five or six times.  Is there any way to upload my code directly to my Arduino without compiling, assuming it's already been compiled at least once and hasn't been edited since?  Just to clarify: I know you have to compile your code every time you change anything, I'm not talking about that.  I'm only talking about code that I've compiled and haven't edited since it was compiled and then uploading that to my Arduino without having to go through the compiling process again.  Thanks!

AWOL

If you haven't changed anything, why do you need to upload again?
The code is already in the Arduino.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Udo Klein

Set the IDE to verbose and have a look at how avrdude is called. Copy this to the commandline and it should upload the file again.
Check out my experiments http://blog.blinkenlight.net

James C4S

1.0.1 only recompiles necessary changes.

Of course any other process than clicking "upload" will certainly take you longer than just clicking upload and waiting the few seconds the process takes.

I don't have the world's fastest computer, but most of my Arduino compiles take less than an hour.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Tom Carpenter

Quote
...less than an hour.

Wow, that's some huge program!  :P
~Tom~

retrolefty


If you haven't changed anything, why do you need to upload again?
The code is already in the Arduino.


That is the key to the OP's question. If there are no changes to the sketch then there in no reason to upload the same sketch again into to the arduino. The sketch loaded prior is stored in flash memory on the chip which is non-volatile and does not go away or change just because you powered off and on the arduino.

Lefty

James C4S


That is the key to the OP's question.

No.  It isn't.  In fact, it has nothing to do with the original question.

The key to the OP's question is the statement:  "I'm constantly forgetting to plug my USB back into my Arduino before I upload"

Further strengthen with: "Is there any way to upload my code directly to my Arduino without compiling, assuming it's already been compiled at least once and hasn't been edited since?"

Which closed with: "I'm only talking about code that I've compiled and haven't edited since it was compiled and then uploading that to my Arduino without having to go through the compiling process again. "

So the Original Poster is talking about the sequence:

1.  Edit Code
2.  Hit Upload
3.  Realize Arduino is not connected.
4.  Connect Arduino
5.  Hit Upload again.
-->  Watch compiling process start from beginning.  They want to avoid compiling again.

In an attempt at being cute, AWOL's comment was off-topic to the original question.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

AWOL

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

retrolefty


Quote
...less than an hour.

Wow, that's some huge program!  :P


Perhaps James was just being cute?

Lefty

RPCoyle

sometimes I use the Arduino board to program multiple chips to the same script. It re-compiles each time. Fortunately it takes less than an hour... 10- 20 seconds.. to compile, annoying, but I think we can live with it.

cr0sh


sometimes I use the Arduino board to program multiple chips to the same script.


I hope you're using a ZIF socket shield or something similar to do that; DIP sockets aren't designed for constant plugging/unplugging - their contacts will eventually become weak, and poor contact will result (causing you all kinds of subtle, random and difficult to debug errors).
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

WizenedEE

Is anyone having this problem with the newest version of arduino (1.0.1)? Things should not get recompiled unless you've changed them since you last compiled.

retrolefty


Is anyone having this problem with the newest version of arduino (1.0.1)? Things should not get recompiled unless you've changed them since you last compiled.


Are you sure of that? I thought it (1.0.1) would not recompile any library source files if they haven't changed, but would still always recompile the main sketch.

Lefty

JimboZA

Maybe the OP's real question should be "How can I remember to plug the USB cable into the Arduino?"

8)

Roy from ITCrowd: Have you tried turning it off an on again?
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

WizenedEE



Is anyone having this problem with the newest version of arduino (1.0.1)? Things should not get recompiled unless you've changed them since you last compiled.


Are you sure of that? I thought it (1.0.1) would not recompile any library source files if they haven't changed, but would still always recompile the main sketch.

Lefty



That is correct.

Go Up