Quick Start Guide

The current version of the source will not be publicaly available until the beta-release milestone is complete.


Installing the Toolchain

You can install the toolchain for either:
- Linux Install Guide
- OS-X Install Guide
- Windows (under cygwin) Install Guide.
- Virtual Machine Install Guide (older VirtualBox Install Guide)
- Eclipse Setup Guide

Once you have installed the toolchain from the above link, you can download the latest release snapshot of the source from our Downloads page.

To use the micaZ you will need to install uisp for the MIB510 or MIB520. See micaZ-quick-start page for instructions.


Checking out the Source

Users can checkout a development copy of the code from subversion by typing:

svn checkout svn://nanork.org/srv/svn/repos/nano-RK

or go to our releases page for code snapshots.


Testing the board

Once everything is installed, try compiling and downloading a project.
  • Change Directories to the project you want to compile
    cd nano-RK/projects/examples/basic_task
    
  • Set the platform type in the makefile
    # Platform name  cc2420DK, firefly, firefly2, firefly2_2, micaZ
    PLATFORM = firefly3
    
  • Compile the code
    make clean
    make
    
  • You can also set the NODE_ADDR #define that will be passed to your C code. If no value is provided, it defaults to 0.
    make clean
    make NODE_ADDR=5
    
  • You should see something like this if it compiles correctly:
    Size after:
    main.elf  :
    section     size      addr
    .data        194   8388864
    .text      13918         0
    .bss         992   8389058
    .stab      36204         0
    .stabstr   15067         0
    Total      66375
    
    Errors: none
    Platform: firefly2
    -------- end --------
    
  • Programming
    • For first time users running on a bare-metal atmel processor, follow instructions here: bootloader-and-fuses
      • Most users will already have a configured Firefly board and can skip this step)
    • Connect the FireFly board to USB
    • In linux type "dmesg", you should see something like this:
      [ 5587.274417] ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected
      [ 5587.274446] usb 2-1: Detected FT232RL
      [ 5587.274448] usb 2-1: Number of endpoints 2
      [ 5587.274449] usb 2-1: Endpoint 1 MaxPacketSize 64
      [ 5587.274451] usb 2-1: Endpoint 2 MaxPacketSize 64
      [ 5587.274452] usb 2-1: Setting MaxPacketSize 64
      [ 5587.278358] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0
      
    • This shows that the serial port has been loaded at /dev/ttyUSB0
    • In windows, check in the device manager to see if the programming board loaded as two COM ports
    • To program a compiled image run:
      make program
      

      or to explicitly specify the programming port in case it changed:
      make program PROGRAMMING_PORT=/dev/ttyUSB0
      
  • You should see something like this if the code downloads correctly:
    avrdude: Device signature = 0x1e9702
    avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed         
    To disable this feature, specify the -D option.
    avrdude: erasing chip
    avrdude: reading input file "main.hex" 
    avrdude: input file main.hex auto detected as Intel Hex
    avrdude: writing flash (14108 bytes):
    
    Writing | ################################################## | 100% 7.07s
    
    avrdude: 14108 bytes of flash written
    
    avrdude: safemode: Fuses OK
    
    avrdude done.  Thank you.
    
  • Open up a terminal program like Minicom (see Minicom page for help)
  • Configure the program for:
    • /dev/ttyUSB0 as the port path
    • Set the baudrate to 115200 8N1 with no Hardware / Software Flow Control
  • You should see something like this:
    My node's address is 5
    Task1 PID=1
    Task1 cnt=0
    Task1 cnt=1
    Task2 cnt=1
    Task3 cnt=1
    Task1 cnt=2
    Task4 cnt=1
    ...