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





 

February 2006, Issue 187

Robust Bootloader for FPGAs


by Colin O'Flynn


GETTING THE BOOTLOADER

The entire LUB project is released under the GNU General Public License. If you distribute the binary code, you must distribute the source code. Remember, this just means the bootloader sources and changes to the PC program. The application you load isn’t connected to the bootloader in any way. So, there is no worry about using it in a commercial application for which you wouldn’t want to release the source code.

When you download the source code, you’ll find it in two folders: PC and AVR. The latter folder is separated into the LUB and tinyloader folders. The AVR targets will compile with any AVR-GCC package such as WinAVR for Windows. To change target AVRs, change both the LUB and tinyloader make files. The rest should be automatic. If you change the make files, be sure to perform a “make clean” and then “make” of the project. Otherwise, the changes might not take.

The PC target should compile with any GCC package in either Windows or Linux. To change the target, you’ll have to change the code slightly. There’s a hard-coded warning that will come on if the AVR code is bigger than the expected target size. This is likely to change in the future.