where in the file system can I find the compiled binary, and how can I just upload it to the board (without a new compile) ?
Background: I basicly only have linux, but due to this gcc-avr compiler bug under linux for the Serial ports on the AT Mega, I now have managed to start a virtualbox, installed the windows-arduino in there, and compiled my sketch. But as I have no access to the board from within the virtualbox, I have to transfer the compiled binary back to the linux-arduino installation. (Btw: I could not compile the fixed 4.6.1 gcc, as my system is too old/incompatibel for it. Btw2: In wine the arduino pulldowns were completely corrupted. Ohh you innocent windows users, sometimes I could get jealous.)
I think if you hold down Shift while selecting the Verify button, the IDE will go into verbose mode, and you can scroll back thru that output to find the temporary folder where the .hex is dumped.
You can find the binary from the applet-directory below the sketch directory, like sketchbook/Blink2/applet/Blink2.hex. However, you need to uncheck the option "Delete previous applet or application folder on export" in the preferences. You can use the following command to upload the sketch from the command line:
perl -MDevice::SerialPort -e 'Device::SerialPort->new("/dev/ttyUSB0")->pulse_dtr_on(1000)'; \
./hardware/tools/avrdude -Chardware/tools/avrdude.conf -q -q -pm328p -cstk500v1 -P/dev/ttyUSB0 -b57600 -D -Uflash:w:/home/pekka/sketchbook/Blink2/applet/Blink2.hex;
The perl command reset the Arduino before the downloading starts.
Btw, which linux version do you use? I have used the Arduino on several Ubuntu versions without any problems. There's really no need to boot Windows for the Arduino and certainly no reason the envy the poor Windows uses ;)
Ahh - good replies!
The "shift" hint from CrossRoads is very helpfull. The .hex goes to /tmp on linux (I thought I had checked this before :-/ ), and the path on win I don't even want to bother to mention.
For uploading, I just copied the win-hex over the linux-hex. Something uploaded, but I cannot verify if it really was the win-hex after all. Tomorrow will show.
However, if it doesn't work this way, I will try the perl version - many thanks for this, too!
Btw, which linux version do you use? I have used the Arduino on several Ubuntu versions without any problems.
I have debian squeeze. It uses gcc 4.3.5, and so are the versions of the stuff, the gcc needs to get compiled. Therefore I cannot compile the gcc 4.6.
There's really no need to boot Windows for the Arduino and certainly no reason the envy the poor Windows uses ;)
Unfortunately there is:
The register 20 in the mega is double used by some gcc-avr crosscode. The whole story is here:
And the bugfix is here:
Ok, I though that by "AT Mega" you referred to atmega uCs in general, but you really meant mega1280 or the Arduino Mega board. Atmega328 boards work with avr-gcc on Linux. I am using Ubuntu Lucid / avr-gcc 4.3.4. I hope the fix you mentioned finds it way soon into the Linux distros so that people can compile also for Mega1280 on Linux.
Btw, forgot to say that you need to run the command in the arduino directory (you probably realized that yourself) and it uses the avrdude that comes with the Arduino. I have used it only with arduino-015, but I don't see any reasons why it wouldn't work with the newer versions as well.