Pages: [1]   Go Down
Author Topic: big trouble - simple answer? - where is the compiled binary?  (Read 875 times)
0 Members and 1 Guest are viewing this topic.
Munich, Germany
Offline Offline
Jr. Member
**
Karma: 0
Posts: 75
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

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

Please help.
Logged

A mouse is a device to point at the xterm you want to type in.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 534
Posts: 26963
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

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

Finland
Offline Offline
Sr. Member
****
Karma: 1
Posts: 270
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley-wink
Logged

Munich, Germany
Offline Offline
Jr. Member
**
Karma: 0
Posts: 75
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!

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

Quote
There's really no need to boot Windows for the Arduino and certainly no reason the envy the poor Windows uses  smiley-wink

Unfortunately there is:
The register 20 in the mega is double used by some gcc-avr crosscode. The whole story is here:
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=736620

And the bugfix is here:
http://gcc.gnu.org/viewcvs?view=revision&revision=174427

Logged

A mouse is a device to point at the xterm you want to type in.

Finland
Offline Offline
Sr. Member
****
Karma: 1
Posts: 270
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: