Upload without recompiling

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:

* 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  :grin:
* 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

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!

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.

  • Uploading the exact "sketch" to multiple Arduinos

Legitimate reason...

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

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

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

  • You accidentally hit the "Verify" button and you don't want to wait again

Yeah, OK. Been there, done that.

  • It would also allow more rapid switching between two "sketches" if they are already compatable

What does compatable mean? Every sketch is different.

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.

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.

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

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)

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

Let me clarify. The GCC port to windows is SLOW.

Try ubuntu as second OS ... ? Is it faster?

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)

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.

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

CrossRoads: Well, there's 2 data points at opposite extremes.

What two data points? The two sketches or the upload and compile?

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.

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

CrossRoads: 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.

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

robtillaart: @smeezekitty

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

How whould I know?

What other apps do you run simultaneous with the IDE?

Firefox + taskmanager + calculator + windows (file) explorer. but 116 processes.

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]

My computer at home runs in the low 30's on processes and the one I am sitting at is at 49. You have a lot of add-ons running or something to be show above 100!

Mark

  • sounds not like too much apps or so, although firefox can be a killer app
  • disk usage is not extreme either.

Do you have a virusscanner in the background?

which version of the IDE?

robtillaart:

  • sounds not like too much apps or so, although firefox can be a killer app

Yes. Firefox is the reason the CPU is not 1%

Do you have a virusscanner in the background?

Yes

which version of the IDE?

0021

If this happens, you need a new Arduino. The Arduino doesn't just randomly loose sketches.

The Arduino Uno bootloader shipped with the first batch can cause arduino boards to not remember their sketch but that just means you need to load the new bootloader.

I think that an 'upload from hex' could be quite useful - Yes we can do it with another program but that's not the point.

And of course a better location for the hex would be good too.

@mowcius, any thoughts on smeezekitty's really slow compile times? See Replys #8,9 in this thread. 56 seconds to compile "blink" sketch?