I sell on Tindie
Grand Prize Winner
(Dec 2012)
Second Prize Winner
(July 2012)

DefendLineII. Building firmware

Building firmware is pretty much similar to building bootloader described in the previous article. Assuming that you have WinAVR and SVN already installed, your DefendLineII PCB has bootloader flashed and avrdude can communicate with the board so you are ready for the procedure.

Download source code for DefendLineII project if you have not done it yet by entering the following command line in Command Prompt:

svn co https://defendline2.svn.sourceforge.net/svnroot/defendline2 defendline2

The source files will be located in \defendline2\CPP\DLII_Main\ folder and make file will be in \build subdirectory. In Command Prompt change current directory to \defendline2\CPP\DLII_Main\build and type make without parameters, in case of success there will be the output similar to this:

Compiling DefendLineII

The file we are after is DefendLineII.hex, it will be located in /build directory along with many others generated by building procedure. Connect your board with USB cable to PC and type the following command (com4 should be replaced with com1…com3 depending on your virtual COM port configuration):

avrdude -p m1280 -c avrisp -P com4 -b 57600 -U flash:w:DefendLineII.hex

Immediately after issuing the command power up the board while holding SB1 button until the flashing process starts. While flashing green LED will be blinking fast as an indication of board-host data exchange. After flashing process red and blue LED will be blinking repeatedly, it means that the procedure was successfully completed and main program block is up and running.

Next step will be checking if your board communicates via terminal program. Standard Windows HyperTerminal can be used but it is not very convenient tool, we recommend to download Tera Term Open Source project. Set up your terminal to open the right virtual COM port with 115200 bps baud rate, 8 bit data, none for parity, 1 stop bit and none for flow control. Type ‘help’ in the terminal window and the board should respond with its name and list of possible commands:

DefendLiniII Terminal Window

Congratulations! Your board is ready for experiments. Next article will give a detail description of the board’s terminal commands.

Previous article: DefendLineII. Flashing bootloader;

Next article: DefendLineII. Terminal commands;

Additional info: DefendLineII Kit;