circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

February 2006, Issue 187

Robust Bootloader for FPGAs


by Colin O'Flynn


LOADING THE LUB

Before you start using the LUB, you need to get all the code into the AT45DB041B. The process is straightforward.

First, load the main LUB file into the AVR directly and program the fuses to use the internal oscillator. When the AVR resets, it will calibrate the internal oscillator and attempt to communicate with the PC.

Next, use the lubloader software to load the main LUB file into the main and backup spaces in the AT45DB041B. The proper data is now in the DataFlash, but there’s no way to load it from the AT45DB041B into the ATmega88.

Now, program the tinyloader file into the AVR directly. Program the fuses to jump to the bootloader at reset and the proper bootloader size. Run the lubloader program with no arguments to check if the system works and force the ATmega88 to load the code from the AT45DB041B.

You should now have a working bootloader system. The lubloader program’s verbose outputs are extremely useful when things aren’t working right.