Go Down

Topic: Upload without recompiling (Read 1 time) previous topic - next topic

smeezekitty

Jul 04, 2011, 08:29 am Last Edit: Jul 04, 2011, 09:54 am by smeezekitty Reason: 1
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: [Select]

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

mmcp42

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!
there are only 10 types of people
them that understands binary
and them that doesn't

PaulS

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.

robtillaart


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.

Rob Tillaart

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

smeezekitty

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

retrolefty

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


CrossRoads

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)
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

robtillaart


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?
Rob Tillaart

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

smeezekitty


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

CrossRoads

Well, there's 2 data points at opposite extremes.
I only have a standard install of -0021. Have you done mods to yours?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

smeezekitty


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

CrossRoads

Data points - my 9 seconds and your 1 minute to compile Blink. I don't think it should take that long.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

smeezekitty


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

robtillaart


@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?
Rob Tillaart

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

smeezekitty



@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]
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!

Go Up