I've seen sketches to upload bootloaders via ISP automatically without a computer.
Does anyone know if someone has written a sketch that will upload .hex files (ex, off an SD card) over serial through an STK500 bootloader?
The point here is that I want something I can connect to the 6-pin FTDI header, press a button, and have it attempt to upload a hex file that over serial. This is a test rig for testing that an ICSP-installed optiboot bootloader and the autoreset circuit and all on a board works. Doing it without the computer is a big help, because I'll be doing this to dozens of boards at a time.
If I had something that would handle the serial upload, even if it was designed for a specific board or something, I could handle modifying it to identify the chip and pick the appropriate hex file to upload, and have the SD card with a .hex file for every supported board. So I'd just connect to board, press button, verify that the LED blinks (it would just be blink sketches), then move to the next board.
For that matter, if anyone can refresh my memory about where that sketch to upload bootloaders automatically is, that would be sick, though I suspect this one I can find without much effort.
does it work for Arduino Mega with original bootloader?
Optiloader only does optiboot; one of its limitations is that the code being programmed has to fit in RAM of the program (so, probably 1k max, even with modifications. As written it assumes 512bytes.)
I think Nick's and Adafruit's both store the images in flash and decode a page at a time (or don't need decoding), so they can handle arbitrary bootloaders. But they're not set up with the Mega Bootloader by default.
So ideally, you're looking for something that connects to both ISP and Serial ports, detects the cpu type and uploads the correct bootloader, and then tests to make sure that the bootloader and associated stuff is working by uploading a test pattern over the serial port. And I guess it'd be nice if you could add additional bootloaders "on the fly"...