The GATOR Plus+ board is fully compatible with Linux. It uses an FTDI USB interface which is supported by the ftdi_sio kernel module built-in to all recent kernels. The board appears as a standard serial port and can communicate with terminal emulator programs such as minicom, cutecom, and seyon.

Although we don’t yet have a GUI interface program for the GATOR Plus+ board, you still have access to all of its functionality.

  • You can use the open-source Arduino GUI development system to develop and download custom programs.
  • You can install your own applications using the open-source AVRDUDE program.
  • With a terminal emulator program you can use our ready-to-run applications over a command-line interface built-in to each application.
  • Since the board appears as a standard serial port device you can create your own custom interfaces.

Device Name and Permissions

The easiest way to identify your device is to look at the bottom of the /var/log/messages file as you plug your board in:

    sudo tail -f /var/log/messages

Among the log messages you should see one that looks like:

FTDI USB Serial Device converter now attached to ttyUSB0

This means that your GATOR Plus+ board is accessible as /dev/ttyUSB0. Specify this file name when configuring your terminal emulator program.

If you get a ‘Permission denied’ message when you try to connect to your board, it means that your user identity does not have read/write permission for the /dev/ttyUSB0 file. Either connect to your board as root or change the permissions on the file:

    sudo chmod a+rw /dev/ttyUSB0

If, however, the /dev/ttyUSB0 file is not an actual device file but a link to the real device file, the above won’t work and you’ll have to find the name of the real device:

    ls -l /dev/ttyUSB0

The target of the link (could be something like /dev/tts/USB0) is the actual device file which must be given read/write permission:

    sudo chmod a+rw /dev/tts/USB0

This solution is only temporary, until you disconnect your board. The next time you connect your board you will have to change the permissions again. More permanent solutions include:

  1. Always connect to your board as root (not recommended)
  2. Add your user identity to the group owner of the device file
  3. Configure the udev subsystem to set read/write permission for all users when the board is plugged in

To implement the second option, note the group owner of the file when you run the ‘ls -l’ command. You will see a listing like:

    crw-rw---- 1 root, uucp 188, 0 May 25  2008 /dev/tts/USB0

The above indicates the device file’s owner is root and the group is uucp. Both owner and group have read/write access, but no other users do. If you add yourself to the uucp group, you will always have read/write access to the device. You can add yourself to the uucp group by editing the /etc/groups file (as root) and adding your user ID to the list of users for that group. Type ‘man 5 group’ for more details.

To implement the third option, you will have to edit the udev rules file, most likely in /etc/udev/rules.d. As root, edit the file named 50-udev.rules and find the line which has ‘ttyUSB’ on it. It may appear something like this:

  KERNEL=="ttyUSB[0-9]*",NAME="tts/USB%n",SYMLINK+="%k",GROUP="uucp",MODE="0660"

Change the MODE value from “0660” to “0666” to give all users read/write permission.

Development Tools

The open-source GCC compiler includes support for the AVR microcontrollers. The AVR-LIBC library also includes much of the standard C library and helper functions. Some Linux distributions (like Ubuntu) already provide pre-compiled packages for AVR development. For example, on an Ubuntu system you need only install the following packages:

  • gcc-avr
  • avr-libc
  • avrdude

If packages are not available for your distribution, you can compile the GCC compiler and AVR-LIBC library from their source code following these instructions.

You can also download our own statically-built version of the development tools compiled with:

  • GCC 4.2.0
  • AVR-LIBC 1.6.2

To install, download avr-gcc4.2.0-libc1.6.2.tar.bz2 to the /tmp directory and type:

    sudo su
    cd /
    tar -xjf /tmp/avr-gcc4.2.0-libc1.6.2.tar.bz2
    chmod -R a+rX /usr/local/avr
    exit

You will have to add the /usr/local/avr/bin directory to your PATH environment variable. If you are using bash, edit the .bashrc file in your home directory and add the following line at the end:

    export PATH ; PATH=/usr/local/avr/bin:$PATH

Test it out by running your .bashrc file then checking the compiler’s version:

    source ~/.bashrc
    avr-gcc --version

If this command prints a ‘command not found’ error, then your PATH is not yet correctly set up. You may have edited the .bashrc file for the root user instead of your regular user.

To uninstall, just remove the /usr/local/avr directory.

Installing Applications with AVRDUDE

You will first need to install AVRDUDE. Version 5.6 or later is recommended.

Once you have built your application and obtained a HEX file, you can install your application into the GATOR Plus+ board by pressing the reset button then typing:

  • avrdude -p m324p -c arduino -P /dev/ttyUSB0 -b 38400 app.hex

Replace /dev/ttyUSB0 with the name of the device on your system, and replace app.hex with the HEX file name of your application.

AVRDUDE versions older than 5.6 need a slightly different command:

  • avrdude -p m324p -c stk500v1 -F -P /dev/ttyUSB0 -b 38400 app.hex

The bootloader installed on the GATOR Plus+ waits up to 3 seconds for AVRDUDE to connect before running any application already installed. This means that unless you can type the above command line in 3 seconds, it won’t work. Do it like this:

  • Type the AVRDUDE command line above but don’t press the ENTER key
  • Press the reset button on your board and wait for the LED to stop blinking
  • Press the ENTER key

Copyright © 2013 Rugged Circuits LLC