HEX Files?

When you use this compiler does it generate a HEX file of the compiled code?

Bob Macklin
Seattle, Wa

Yes. It then uploads the .hex to your Arduino and deletes it (unless you set the preference "export.delete_target_folder=false", I think).

Under File:Preferences, turn on the Verbose settings, you can then review them and see where the files end up.
For example, see the last couple of lines here:

(whole bunch of lines deleted)
:
:
:
C:\Arduino-1.0\hardware\tools\avr\bin\avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 C:\Users\Owner\AppData\Local\Temp\build4424429207231068704.tmp\sketch_aug24a.cpp.elf C:\Users\Owner\AppData\Local\Temp\build4424429207231068704.tmp\sketch_aug24a.cpp.eep 
C:\Arduino-1.0\hardware\tools\avr\bin\avr-objcopy -O ihex -R .eeprom C:\Users\Owner\AppData\Local\Temp\build4424429207231068704.tmp\sketch_aug24a.cpp.elf C:\Users\Owner\AppData\Local\Temp\build4424429207231068704.tmp\sketch_aug24a.cpp.hex 
Binary sketch size: 466 bytes (of a 32256 byte maximum)

OK, I found where it is putting them. Now I need to learn how to make the IDE put the HEX file where I want it.

Can I use the Arduino IDE to upload a HEX file generated with the Atmel Studio IDE?

I won't get my UNO board until the middle of the week so I cannot experiment much yet.

Bob Macklin
Seattle, Wa

"Now I need to learn how to make the IDE put the HEX file where I want it."
Not sure that's possible. They don't end up in the location you can specify under File:Preferences

"Can I use the Arduino IDE to upload a HEX file generated with the Atmel Studio IDE?"
Sure - you can use the avrdude command that you see the IDE using, put your filename there.

I guess I can stop trying to get the IDE to put the HEX file where I want it.

I will probably just use the Atmel Studio IDE to do everything. I am comfortable using it. And i do own a AVR ISP Programmer.

Thanks for the help.
Bob Macklin
Seattle, Wa

I used that also for a while. Then I get tired of the waaaaaaaiiiiiiiiiiting while it started up, and went back to the IDE.
Had to do some fooling around to get the IDE to use the winlib usb something or other driver instead of the Jungo driver.

My only real interest in the Arduino board was learning about the Atmel USB UART implementation. I have been building boards using the AVR8 or PIC chips for many years. I have a major library of service routines for both families.

But I can buy the FTID USB UART chips for less than $3.00 and no special code is needed. It's even cheaper than using an Atmel USB chip.

Bob Macklin
Seattle, Wa

$3? They seem to be $4.50 everywhere I have seen them unless buy in the hundreds.

Makes you wonder if e-bay parts are counterfeit:
http://www.ebay.com/itm/1PCS-IC-FT232RL-FT232-FTDI-SSOP-28-NEW-GOOD-QUALITY-/300950679700?pt=LH_DefaultDomain_0&hash=item46120ef094

This is the one I am going to try:

http://www.mouser.com/ProductDetail/FTDI/FT230XS-R/?qs=sGAEpiMZZMvVkErl6zY%2bqR%2b6A%2bu%2F1HB5

I hope that link works. $2.04 qty at Mouser.

Bob Macklin
Seattle, Wa

I finally found the code for the USB UART on the UNO board so I will try that one also.

Bob Macklin
Seattle, Wa

CrossRoads:
“Now I need to learn how to make the IDE put the HEX file where I want it.”
Not sure that’s possible. They don’t end up in the location you can specify under File:Preferences

There is some control if you set build.path in your preferences file.
Mine is set to \Documents\Arduino\Build. (I am using Windows 7 X64)
This is a partial directory listing from that directory after the last build:

Directory of <user home>\Documents\Arduino\Build

08/25/2013  06:01 AM    <DIR>          .
08/25/2013  06:01 AM    <DIR>          ..
08/25/2013  05:17 AM    <DIR>          EEPROM
08/25/2013  05:16 AM    <DIR>          HexDecAsc
08/25/2013  05:17 AM             1,235 CDC.cpp.d
08/25/2013  05:17 AM             2,260 CDC.cpp.o
08/25/2013  05:18 AM           321,846 core.a
08/25/2013  05:17 AM             1,241 Develope_HexDec.cpp.d
08/25/2013  05:18 AM                13 Develope_HexDec.cpp.eep
08/25/2013  05:18 AM            95,183 Develope_HexDec.cpp.elf
08/25/2013  05:18 AM            11,771 Develope_HexDec.cpp.hex
08/25/2013  05:17 AM            27,688 Develope_HexDec.cpp.o
08/25/2013  05:17 AM             1,356 HardwareSerial.cpp.d
08/25/2013  05:17 AM            33,664 HardwareSerial.cpp.o
08/25/2013  05:17 AM             1,315 HID.cpp.d
...
08/25/2013  05:18 AM               234 WString.cpp.d
08/25/2013  05:18 AM            89,940 WString.cpp.o

The two files that you would be interested in are:
proj_name.cpp.elf
proj_name.cpp.hex

This thread has some information on the build path:

There is another thread that discusses disassembling the elf file (if that would be helpful):

Is the FT230X a fairly recent part? Looks like FT232R with Less IO, No external oscillator, no Sleep, no Test.
Could even be the same die with the stuff not broken out to the world.
Even smaller package for hand soldering, 0.635mm pitch pins on the FT230XS vs 0.65mm pitch on the FT232RL.

The SSOP versions both have .025 pin spacing. I beleive the FT230 has all that is needed for a USB UART. Anyway next month I am buying a small batch and trying it. If it works I will lay out a PCB.

My only interest in the Arduino is how they did the USB UART bridge. I prefer working with the Atmel IDE.

Bob Macklin
Seattle, Wa

My only interest in the Arduino is how they did the USB UART bridge.

My favorite Arduino board was the Duemilanove, you can follow the FTDI chip use from that.
Try wiring RTS in place of DTR, supposedly both are active for USB resets, the DTR cap should allow it to appear as a pulse.

Not sure what to do about CBUS0-1-2-3 to drive the Rx/Tx activity LEDs. Maybe 0/1 will drive them same as on the FT232R.

On my development board i just have LEDs on Tx, Rx, RTS, CTS, DTR, and DSR. Works fine.

I don't plan on using the Arduion for serious development.

I use the Atmel IDE and code in assembly language.

Bob Macklin
Seattle Wa