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