Developing hardware based on Arduino.

If one creates a commercial product based on the Arduino (even if that's possible), how does one offer "firmware updates"?

You would supply them with a hex file compiled with the Arduino environment. They would then use avrdude to load that hex file onto their Arduino. Maybe you would make a package that included all these files and did everything automatically.

This method assumes they have a way to hook of the hardware to their computer. If it is a real arduino with a FT232 chip... then they just plug it into their USB port. If you have built some sort of stand alone version, you would need to include a USB->serial adapter or make sure the use had a serial port on their computer.

Other methods would be using a different bootloader. A bootloader could load the program via Ethernet, SD Card, EEPROM, I2C, or pretty much any other method. But it all depends on your design.

What exactly do you mean? Updates to software you've written that's loaded onto the uC?

I assume you don't mean the Arduino bootloader, which isn't updated.

I wouldn't expect an average consumer to have the knowledge to be able to update the code themselves... You would basically do what Jeff K said, but I can't see my mom doing that... FTDI WHA?

Yes, exactly what Jeff suggested. I would like them to be able to plug either an RS232 or USB cable (depending on how I set up the board) then upload the HEX file.

With that approach in mind... how do I get the HEX file? When I compile I don't see the HEX file in the sketch directory?

Are there any examples (ideally .NET) that shows how you upload a HEX file to the arduino? Do you just send the HEX or is there some timing or handshake that needs to happen to put it into programming mode?

The Arduino IDE puts the hex file into a temp directory. If you hold the shift key when compiling the sketch, you will see some debug output that will tell you where the hex file is. There is some talk about changing this in version 1.0 to make it easier to find.

I don't work with .NET but the Arduino bootloader uses the STK500 (version 1) protocol. To load the program via the bootloader, the Arduino follows this path... Once reset, the bootloader starts. It waits for a certain amount of time (under a second I think) for some commands to come in to the serial pins. If if does not receive these commands it continues to execute the program in flash. If it does receive these commands, it stays in STK500 programming mode. You can then program the HEX file. There are a lot of libraries for the STK500 protocol so you may be able to find something for .NET. Otherwise you would need to tell .NET to run avrdude with the correct command line options (again.. shown when holding the shift key while programming).

There is plenty of info in the forums for using avrdude from the command line to program the Arduino.

Great! Thanks for the info Jeff... I'll research this a bit more, this is enough to get me started.

FYI: This doc explains the protocol: http://atmel.com/dyn/resources/prod_documents/doc2591.pdf

Would a ZIF socket and some mail envelops do the trick? If you use a ZIF, you could ask your customer to remove the uC and mail it in. You then mail them the updated chip. Here's a picture:

Look for Zero Insertion Force 28 pin DIP socket. Many electronics stores have them for a few bucks. I bought mine from a store that mails out red boxes. Some dislike the store so I'm not mentioning its name. I don't have anthing against them though.

Make sure you mention which side is which side.

Look for Zero Insertion Force 28 pin DIP socket.

0.300 inch - not 0.600 inch...

I'm trying to figure out the best method of offering firmware updates on a Mega1280 based platform. Removing the chip is not possible as it's a SMD based processor.

I'm thinking of doing it via USB and creating a "updater". Can someone explain the process of creating something like this? I would create an app that is self contained. No AVRdude or anything... is that possible? I'd like the interface to be simple, select the com port and press update, which sends HEX bytes to the board. Any more details would be helpful...

Looking for a way to create an updater... willing to open source it once I figure it out.

Danny

I'm trying to figure out the best method of offering firmware updates on a Mega1280 based platform. Removing the chip is not possible as it's a SMD based processor.

I'm thinking of doing it via USB and creating a "updater". Can someone explain the process of creating something like this? I would create an app that is self contained. No AVRdude or anything... is that possible? I'd like the interface to be simple, select the com port and press update, which sends HEX bytes to the board. Any more details would be helpful...

Looking for a way to create an updater... willing to open source it once I figure it out.

avrdude, from what I undestand, is a pretty simple and self-contained piece of software; I think both in Windows and *nix, it is a single file (perhaps dynamically linked to certain libraries that are fairly standard). You should, in theory, be able to drop it into a directory and run that specific version (with the appropriate command line) and it should just "work".

If I were doing this, I would set things up so that avrdude was in the same directory as my updater GUI; this thing would allow selection of the COM port, and show a list of updates (or maybe not), and an update button. When the port is selected, and the update, and the update button pressed, it would build the avrdude command line, and execute it as a child process (executing the avrdude in the same directory, of course), and wait until the process is completed, then report back success or error messages.

I don't really see any reason to avoid avrdude explicitly - by using it as a part of your system, that's one piece you -don't- have to write; why re-invent the wheel?

:)

I believe I found a way to do this without using AVRdude. I'll let you know after I test!

Cheers! Danny

Solution was to create a custom bootloader and an EXE to load the project without an IDE. Works like a charm!

Solution was to create a custom bootloader and an EXE to load the project without an IDE. Works like a charm!

Care to share the code with us?

Lefty