Pages: [1] 2   Go Down
Author Topic: Upload without recompiling  (Read 1488 times)
0 Members and 1 Guest are viewing this topic.
Washington
Offline Offline
God Member
*****
Karma: 38
Posts: 789
Firefox & Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I know it would seem fairly useless at first thought to have the IDE upload without recompiling but, there are various legitimate reasons especially since compiling is quite slow. Here is a non-exhaustive list of reasons I can think of:
Code:
* Uploading the exact "sketch" to multiple Arduinos
* Re-uploading if the Arduino looses the "sketch" somehow
* If you do low level compiler twiddling on the command line and you do not want to fool with AVRDUDE directly
* Debugging upload trouble without waiting for full compilation each time
* You accidentally hit the "Verify" button and you don't want to wait again  :smiley-mr-green:
* It would also allow more rapid switching between two "sketches" if they are already compatable
That said, I would think a(n) "Upload without compilation" should be added, even on the menu bar.


-edit: fixed title
« Last Edit: July 04, 2011, 02:54:03 am by smeezekitty » Logged

Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

Leighton Buzzard, UK
Offline Offline
Edison Member
*
Karma: 21
Posts: 1339
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I agree
I have more sketches than Arduinos
often just want to (re)load another sketch

Also
I often, while developing, "compile" (verify) while making changes
once I'm happy I just want to upload, not compile again

so - gets my vote too!
Logged

there are only 10 types of people
them that understands binary
and them that doesn't

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hold down the shift key when you press Upload sometime. You'll see that a temporary directory is used to hold the object files and hex files that are involved in the compilation process. Those files are deleted when the upload completes.

Quote
* Uploading the exact "sketch" to multiple Arduinos
Legitimate reason...

Quote
* Re-uploading if the Arduino looses the "sketch" somehow
If this happens, you need a new Arduino. The Arduino doesn't just randomly loose sketches.

Quote
* If you do low level compiler twiddling on the command line and you do not want to fool with AVRDUDE directly
Well, now, how are you going to do the first part without doing the second part? If you are comfortable doing the first part, you should be able to do the second part.

Quote
* Debugging upload trouble without waiting for full compilation each time
Either the Arduino is plugged in or it isn't. Either it is connected to the specified port or it isn't. How much troubleshooting does it take? If it takes much, use a smaller sketch with no libraries.

Quote
* You accidentally hit the "Verify" button and you don't want to wait again
Yeah, OK. Been there, done that.

Quote
* It would also allow more rapid switching between two "sketches" if they are already compatable
What does compatable mean? Every sketch is different.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Quote
That said, I would think a(n) "Upload without compilation" should be added, even on the menu bar.

Google the AVRdude command, it can do just that. hold the shift key when uploading to see the details of the command.

Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Washington
Offline Offline
God Member
*****
Karma: 38
Posts: 789
Firefox & Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Let me clarify. The GCC port to windows is SLOW. Compiling blink takes 60 seconds and bigger sketches longer. No there is nothing wrong with the computer. It has dual core and 2GB ram. MingW gcc is very slow as well. No excessive CPU consumption, just slow. Adding a upload button with would trivial by not deleting the hex file and running the avrdude command. It could be hidden on the pull down menu.
Logged

Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

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

Quote
Those files are deleted when the upload completes.

Deleted when upload completes, or when the IDE is closed? I could swear I dug down once using the temp folder path with windows file explorer and found the hex file that I had just uploaded?

Lefty

Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 524
Posts: 26427
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Compiling Blink takes 60 seconds for you!  Whoa!
My Sony Vaio/Vista with Core 2 Duo T6400, 2 GHz,does it in 9 seconds while playing MP3s.
You have some funny settings turned on or something?

Even this sketch only took 17 seconds:

Binary sketch size: 13836 bytes (of a 14336 byte maximum) (168 Deumilanove selected)

Binary sketch size: 13836 bytes (of a 30720 byte maximum) (327 Duemilanove selected)
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


You can download the hexfile after uploading it with AVRdude too ........

Quote
Let me clarify. The GCC port to windows is SLOW.
Try ubuntu as second OS ... ?
Is it faster?
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Washington
Offline Offline
God Member
*****
Karma: 38
Posts: 789
Firefox & Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Compiling Blink takes 60 seconds for you!  Whoa!
My Sony Vaio/Vista with Core 2 Duo T6400, 2 GHz,does it in 9 seconds while playing MP3s.
You have some funny settings turned on or something?

Even this sketch only took 17 seconds:

Binary sketch size: 13836 bytes (of a 14336 byte maximum) (168 Deumilanove selected)

Binary sketch size: 13836 bytes (of a 30720 byte maximum) (327 Duemilanove selected)

I just timed it with a stop watch. Compiling blink took 56s and uploading took 8s.
CPU usage at the time was ~70% and ram usage ~49%.
When uploading sketches that take 25K+ (Audio file encoded in it for playing), it took well over 3 min.
Also, the hex files and objects are NOT deleted until you close the IDE making this very plausible and trivial to add.
Logged

Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 524
Posts: 26427
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, there's 2 data points at opposite extremes.
I only have a standard install of -0021. Have you done mods to yours?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Washington
Offline Offline
God Member
*****
Karma: 38
Posts: 789
Firefox & Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, there's 2 data points at opposite extremes.
What two data points? The two sketches or the upload and compile?
Quote
I only have a standard install of -0021. Have you done mods to yours?
No "mods" but it is installed in a non-default directory.
Logged

Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 524
Posts: 26427
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Data points - my 9 seconds and your 1 minute to compile Blink. I don't think it should take that long.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Washington
Offline Offline
God Member
*****
Karma: 38
Posts: 789
Firefox & Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Data points - my 9 seconds and your 1 minute to compile Blink. I don't think it should take that long.
Definitely not. But a upload without compile could still be useful at these speeds.
Logged

Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


@smeezekitty

Can you check in the taskmanager if the compiler starts swapping memory to disk and back?

What other apps do you run simultaneous with the IDE?

How much memory has your computer?
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Washington
Offline Offline
God Member
*****
Karma: 38
Posts: 789
Firefox & Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


@smeezekitty

Can you check in the taskmanager if the compiler starts swapping memory to disk and back?
How whould I know?
Quote
What other apps do you run simultaneous with the IDE?
Firefox + taskmanager + calculator + windows (file) explorer. but 116 processes.
Quote
How much memory has your computer?
Two gigabytes. Usually sits around half used.

CPU usage when idle = 33% 65-80% when compiling
Memory when idle = 51% 55-60% when compiling
The computer is fairly fast running things other then compiling and is usable during compiling.
[/quote]
Logged

Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

Pages: [1] 2   Go Up
Jump to: