I did some searches but could not find anything that directly guides me to a solution that fits my need.
I created a program/firmware using the windows IDE, All is good there and it is installed and running just fine right now.
However I gave the units to users that now want updates, Of course the update code was easy, and tested at my house just fine. So how do I update the users units. I could load the whole IDE and cut and past the code into it. But that does not work on a Mass update process where I have many to do.
I know that there programmers out there, But then each user needs to have one and the proper harness, So that does not work.
What I am looking for is something that will allow me to create a Hex file or the sort from either my code or a programmed device, Then a command line tool that loads the file into the device via the USB port.
FWIW I am using the Arduino Nano 3.0 (ATmega328)
The users will be windows XP -> windows 8
I'll bet there is a link describing how to do this, but I just did not find it
That's certainly achievable using AVRDUDE and a script file or windows exe. If you know that users will only have a single Arduino connected then you can identify the COM port from the registry - otherwise, you could provide instructions to plug the Arduino in at the appropriate point in the process and see what new COM port appears.
OK, found the temp directory that stores the Hex file, No problem there
My client app that talks to the device already searches usb ports and finds the device, I can easily have that app create a batch file with all command line values including the USB port number.
I downloaded a version of AVRdude from source forge, it had a GUI and command line version of the app.
Now I am stuck The gui had tons of options, and the command line version gave me a missing error "missing usb0.dll"
Is there a better source for the AVRdude and any help files for command line args etc....
highflier:
OK, found the temp directory that stores the Hex file, No problem there
My client app that talks to the device already searches usb ports and finds the device, I can easily have that app create a batch file with all command line values including the USB port number.
I downloaded a version of AVRdude from source forge, it had a GUI and command line version of the app.
Now I am stuck The gui had tons of options, and the command line version gave me a missing error "missing usb0.dll"
Is there a better source for the AVRdude and any help files for command line args etc....
Sorry this is taking me so much time to understand,
I found that AVRdude is included with the IDE, and also found the PDF doc. on AVRDUDE, but there is many things that are not clear to a newbe with AVRDUDE.
I know the usb port that the device is installed in, (lets just say USB port 9 for now.
I have the hex file update.hex. So All I need to do it get the proper command line.
I am unsure about what several of the options should be including programmer, fuse etc...
I found this example, however I did not find a option for the -p command for the 328 part of the Nano
Also I would need to use the mkii programmer I guess for usb?
Example
avrdude -p m128 -c stk500 -e -U flash:w:update.hex
My guess at what I would need, can anybody verify and correct what I have wrong, Of course the part num is just a guess as docs did not list the nano part
avrdude -p m328 -c avrispmkII -P9 -e -U flash:w:update.hex
Highflier
PS. I am considering writing a program to report the command line parameters and replaceing the AVRDUDE.exe with it, just ot see if I can steel the parameters that the IDE is using, As it does appear to use the AVRDUDE.exe file to do the upload.
Turn on the IDE option for verbose output during the upload, and you can see exactly what commands the IDE runs to invoke the compiler and then invoke AVRDUDE to upload it. The IDE is just a pretty front end which calls other tools to compile and upload the sketch and they are all freely available for you to use directly.
Thanks, I had looked for verbose but gave up to early when I have just missed it on the screen, I was even searching inside the preference.txt file.
This line Seems to work, Now I just want to simplfy it to a easy directory structure, Make the Com14 dynamic to what ever the setting should be. of course I will also take a peek inside the avrdude.conf to make sure there is no directory references or at least if there is fix them to what will be appropriate