Double bootloader for AVR

Bootloader is a handy piece of software residing in AVR boot section. It allows uploading/updating firmware without special programmer – only a link to PC or other memory device. Take Arduino – it is programmed using USB cable. This is so easy because of bootloader program which starts after MCU is powered up and waits for some data on serial line. If there is no data it waits a little and then starts your normal application. OK this is clear up to this point. But what if we need more options to update firmware. Check out a different bootloader solution maintained by thseiler. He decided to make a dual bootloader that still fits the 2kb limit. Bootloader is still capable to work with serial port (stk500v1 as in Arduino) but most interesting it can also boot software from SD/MMC card.

When booted from SD card, program looks for specially named *.hex file and loads it in to memory. It supports FAT16 formatted cards up to 2GB. What are conditions to make it boot from SD? First of all there has to be flash card connected to AVR using SPI port. And second condition condition is that there should be a board name written in to end of EEPROM. If you have an AVR projects running on field and don’t want to mess with computers and wires this might be a great choice to do convenient updates of your software.