Nanduino » Programming

Install The AVR Toolchain

In this section we will use the AVR port of the GCC toolchain. I will assume you're using Windows so you can just grab the installer from SourceForge, but it's pretty straightforward to install on other platforms too.

Try Loading Some Code

You can download a simple test project from here:

test.zip

This will help verify the operation of your Nanduino and your tooling installation. Unpack it somewhere and build it with make. When you're ready to upload the code to your Nanduino, make sure FLIP is not running, and your Nanduino is connected and running the bootloader, then run make flash (note that make is installed by the WinAVR installer).

You will hear the characteristic "beep-boop" of a USB device being disconnected, and if you check the levels of port B using an oscilloscope or voltmeter, you will see PB7 alternating between 0v and 5v once every four seconds or so, PB6 alternating twice as fast, PB5 alternating twice as fast again, and so on. If you have already made an AVR:LED board, you can connect it as shown on the Nanduino main page, and get visual feedback of the operation of the code.

If you also have an S-AVR:Serial board, you can connect it up too, and see the code running on a terminal window:

Once you have programmed the device, it will execute that application on startup. To get back to the bootloader so you can load a new revision of your code, you must hold down the HWB pin whilst cycling the RESET pin low. You will hear the familiar "boop-beep" of a USB device being connected.


Leave a comment

You can use TWiki syntax in your comment