Pages: [1] 2   Go Down
Author Topic: How can I upload to my Arduino without compiling?  (Read 2130 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 290
Posts: 25816
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

"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.

0
Offline Offline
Faraday Member
**
Karma: 23
Posts: 3470
20 LEDs are enough
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Check out my experiments http://blog.blinkenlight.net

Austin, TX
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6134
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Leeds, UK
Offline Offline
Edison Member
*
Karma: 78
Posts: 1719
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
...less than an hour.
Wow, that's some huge program!  smiley-razz
Logged

~Tom~

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6134
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 290
Posts: 25816
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't do "cute".
Ask anyone who knows me.
Logged

"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.

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
...less than an hour.
Wow, that's some huge program!  smiley-razz

Perhaps James was just being cute?

Lefty
Logged

Santa Fe
Offline Offline
Full Member
***
Karma: 1
Posts: 201
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 39
Posts: 5557
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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).
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Offline Offline
Edison Member
*
Karma: 19
Posts: 1041
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Johannesburg. UTC+2
Offline Offline
Faraday Member
**
Karma: 82
Posts: 3855
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

 smiley-cool

Logged

The Elders of the Internet know who I am.....
Get me on LinkedIn: za.linkedin.com/in/jimbrownza/

Offline Offline
Edison Member
*
Karma: 19
Posts: 1041
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1] 2   Go Up
Jump to: