Loading...
Pages: [1]   Go Down
Author Topic: Loading .hex files in Windows  (Read 372 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'd like to integrate loading of hex files created from sketches in Arduino 1.0 IDE via USB into a Windows Forms Application.  I've read a lot about AVRDUDE, but it isn't clear to to me if this utility can do that, or if it's only for burning AVR's with a hardware programmer.

Is there by chance any native Windows C/C++ source code available?  I suppose I could use the Windows ShellExecute() command  to execute AVRDUDE, but I prefer to write native or managed code as part of my app.

I appreciate any guidance.
Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 33
Posts: 3619
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

AVRDUDE can write to an avr using a bootloader, its what arduino uses to upload sketches

and you can find the source code

http://www.nongnu.org/avrdude/

Logged


Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you.  Can you give me a command line example that would upload a hex program to an ATmega328-based Arduino?  Right now, I use Nano's, but I will eventually make my own discreet Arduinos on a circuit board with ATmega328 DIPs and FT232RL chips.

I also wondered if AVRDUDE and/or Arduino IDE can be used to burn Arduino Bootloader into an ATmega 328 processor.  Can this be done over USB, or is an EEPROM programmer required?  If so, what unit could program the DIP package and might be reasonably priced and easy to use?
« Last Edit: July 30, 2012, 11:46:15 pm by renniejohnson » Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 19
Posts: 3118
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Enable verbose mode in Preferences in the IDE to see all the commands used to compile and upload a sketch.

Quote
I also wondered if AVRDUDE and/or Arduino IDE can be used to burn Arduino Bootloader
http://arduino.cc/en/Tutorial/ArduinoISP
Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 41
Posts: 5166
CMiYC
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Can you give me a command line example that would upload a hex program to an ATmega328-based Arduino?
Enable verbose output in the preferences and you'll see the exact command line used by the Arduino IDE.
Logged

www.cmiyc.com - A guide to being an Enginerd

SE USA
Offline Offline
Faraday Member
**
Karma: 33
Posts: 3619
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

AVRDUDE -p atmega328p -c arduino -P COMx -b 19200 -U flash:w:filename.hex

http://www.ladyada.net/learn/avr/avrdude.html
Logged


Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Osgeld.  That's straight forward enough for an Arduino weenie like me.
Logged

Pages: [1]   Go Up
Print
 
Jump to: