0

compiling programs
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

compiling programs

by dragonuv on Mon Apr 27, 2009 5:00 pm

what do i need to do in order to get the .hex file and the .elf file of the program ?

thanks.
dragonuv
 
Posts: 235
Joined: Tue Dec 04, 2007 1:22 pm

Re: compiling programs

by westfw on Mon Apr 27, 2009 5:29 pm

After using the arduino upload command (assuming that the compile works, but whether or not there is a board connected that you can upload to), you should see a sub-directory named "applet" appear in the sketch directory, and it will contain the various binaries including .elf and .hex files. (Exact location is OS dependent...)

(if you use the "verify" button instead, these will be built off in some temporary directory instead. /tmp/build_<procnum> on my mac. This is deleted when you exit the Arduino Environment, so using the upload button is a better idea...)

westfw
 
Posts: 1603
Joined: Fri Apr 27, 2007 1:01 pm
Location: SF Bay area

Re: compiling programs

by dragonuv on Tue Apr 28, 2009 5:04 am

what i did is upload though the usbtiny, but when i upload directly to the arduino it creats the binary files, thanks :)
dragonuv
 
Posts: 235
Joined: Tue Dec 04, 2007 1:22 pm

Re: compiling programs

by mtbf0 on Tue Apr 28, 2009 8:03 am

are you using a makefile? if so, try
Code: Select all | TOGGLE FULL SIZE
make foo.elf
assuming, you know, that your program's called foo. a lot of makefiles seem to delete the elf file but it will probably be retained if you specify it as the target. i tend to use modified versions of the minipov3 makefile for all my projects and suffer from this excessive tidiness.
"i want to lead a dissipate existence, play scratchy records and enjoy my decline" - iggy pop, i need more
User avatar
mtbf0
 
Posts: 1645
Joined: Sat Nov 10, 2007 12:59 am
Location: oakland ca

Please be positive and constructive with your questions and comments.