Offline
Jr. Member
Karma: 0
Posts: 76
|
 |
« on: July 30, 2012, 10:40:44 pm » |
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
Faraday Member
Karma: 33
Posts: 3619
@ssh0le
|
 |
« Reply #1 on: July 30, 2012, 10:45:31 pm » |
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
|
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 76
|
 |
« Reply #2 on: July 30, 2012, 11:38:27 pm » |
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
Faraday Member
Karma: 19
Posts: 3118
|
 |
« Reply #3 on: July 31, 2012, 02:02:27 am » |
Enable verbose mode in Preferences in the IDE to see all the commands used to compile and upload a sketch. 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
Faraday Member
Karma: 41
Posts: 5166
CMiYC
|
 |
« Reply #4 on: July 31, 2012, 10:16:49 pm » |
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
|
|
|
|
|
SE USA
Offline
Faraday Member
Karma: 33
Posts: 3619
@ssh0le
|
 |
« Reply #5 on: July 31, 2012, 11:01:12 pm » |
AVRDUDE -p atmega328p -c arduino -P COMx -b 19200 -U flash:w:filename.hex http://www.ladyada.net/learn/avr/avrdude.html
|
|
|
|
|
Logged
|
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 76
|
 |
« Reply #6 on: August 01, 2012, 02:49:46 pm » |
Thanks Osgeld. That's straight forward enough for an Arduino weenie like me.
|
|
|
|
|
Logged
|
|
|
|
|
|