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:
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:
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:
The target of the link (could be something like /dev/tts/USB0) is the actual device file which must be given read/write permission:
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:
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:
Change the MODE value from “0660” to “0666” to give all users read/write permission.
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:
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:
To install, download avr-gcc4.2.0-libc1.6.2.tar.bz2 to the /tmp directory and type:
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:
Test it out by running your .bashrc file then checking the compiler’s 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.
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:
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:
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: