wiki:windows-install

Nano-RK Windows Toolchain Installation Guide

This document breifly describes how to install avr-gcc for Windows XP.

1) Download and Install Cygwin with the following modules

  • make
  • svn (subversion)
  • open-ssl
  • gcc-core
  • bison (required to compile avrdude)
  • flex (required to compile avrdude)

2) Download and Install the latest WinAVR installer

  • Double-Click on Installer to run

3) Download and Install avrdude for cygwin (the follow instructions are for FireFly 2.2 and should no longer be required, just use latest avrdude)

  • Download and Install  avrdude-5.1-cygwin patched for cygwin
  • Unzip into c:/cygwin/home/<user-name>
  • Open Cygwin Bash Shell
  • cd avrdude-5.1-cygwin
  • In Cygwin Shell Type:
    cp /usr/include/usb.h /tmp
    
  • In Cygwin Shell Type:
    ln -s /usr/lib/libusb.dll.a /usr/lib/libusb.a
    
  • In Cygwin Shell Type:
    ./configure CFLAGS=-I/tmp CPPFLAGS=-I/tmp
    
  • In Cygwin Shell Type:
    make
    
  • In Cygwin Shell Type:
    make install
    
  • Move config file to the correct default location by typing:
    cp avrdude.conf /cygdrive/c/WinAVR-20071221rc1/bin/.
    

4) Download and Install  FTDI USB Driver

5) Open Cygwin and type "cd C:" to get to your C drive. Move to any directory of your choice and checkout the nano-RK code using Subversion.

  • In Cygwin Shell Type:
    svn checkout svn://nanork.org/srv/svn/repos/nano-RK
    

6) Find the programmer COM port and change it to be less than COM5

The second (higher) COM port loaded by the FTDI2232 driver is used for programming the node. avrDUDE may not work with COM ports greater than COM6, so you may need to lower the default com port. This can be done by doing the following:

  • Control Panel->System->Hardware->Device Manager

finding the port in windows

  • Go down to Ports(COM & LPT), right click and select "Properties" for the COM port you wish to change
  • Go to "Advanced" tab and change the COM port. You can overwrite an "in-use" port as long as you know you aren't using it at the same time as the downloader.

setting device manager options in windows

7) Go into your project and change the following line in the makefile from:

PROGRAMMING_PORT = /dev/ttyUSB1 # programmer connected to serial device

to:

PROGRAMMING_PORT = COM2 # programmer connected to serial device (port you previously changed)

Attachments