Atmel STK500 on Linux

From Klaus' wiki
Revision as of 10:54, 21 January 2013 by Klaus (Talk | contribs)

Jump to: navigation, search

In order to develop on the STK500 beginners board on a Fedora (in this case 17) follow these instructions.

Eclipse

Inspired by [this] link.

Install Eclipse CDT in its latest version. Remember to choose the 32 or 64 bit edition that suits your OS. Place it in a separate directory in order to keep it clean of all other plugins you are using.

Start eclipse and in the Help menu select Install new software. In the Work with enter http://avr-eclipse.sourceforge.net/updatesite/ and press enter. Select the AVR plugin and install it. Takes a while, be patient.

Bin-utils

Using yum install support for the AVR devices,

$ yum install avrdude avr-gcc* avrice avr-binutils avr-gdb avra avrdude uisp

Attach your USB2serial converter (assuming that there is no serial port on your brand new laptop).

To detect which tty the port is assigned to issue:

$ ll /dev/ttyU*

typical output are

$ ll /dev/ttyU*
crw-rw----. 1 root dialout 188, 0 Jan 21 11:22 /dev/ttyUSB0

Because of the default access rights an ordinary user cannot access the port. There are two solutions to this. Change the access rights issuing:

$ chmod 666 /dev/ttyUSB0

if you are root - otherwise prepend with a sudo.

This have to be done everytime you connect the USB2serial converter.

The other option is to become a member of the dialout group. This is a permanent solution.

Invalid language.

You need to specify a language like this: <source lang="html4strict">...</source>

Supported languages for syntax highlighting:

4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, algol68, apache, applescript, apt_sources, arm, asm, asp, asymptote, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_loadrunner, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, coffeescript, cpp, cpp-qt, csharp, css, cuesheet, d, dcl, dcpu16, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, f1, falcon, fo, fortran, freebasic, freeswitch, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, haxe, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, j, java, java5, javascript, jquery, kixtart, klonec, klonecpp, latex, lb, ldif, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, nagios, netrexx, newlisp, nsis, oberon2, objc, objeck, ocaml, ocaml-brief, octave, oobas, oorexx, oracle11, oracle8, oxygene, oz, parasail, parigp, pascal, pcre, per, perl, perl6, pf, php, php-brief, pic16, pike, pixelbender, pli, plsql, postgresql, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, pys60, python, q, qbasic, rails, rebol, reg, rexx, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, spark, sparql, sql, stonescript, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, upc, urbi, uscript, vala, vb, vbnet, vedit, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xorg_conf, xpp, yaml, z80, zxbasic


$  usermod -a -G dialout <your-loginname>

Now connect the serial cable to the RS232 CTRL connector on the STK500 board. Attach power. Remember do it like this in the future; the STK board can be very sensitive to connecting and disconnecting cables while powered.

Issue this command to test the connection to the board (only the first line is the command, the rest is the output):

$ avrdude -c stk500 -p m32 -P /dev/ttyUSB0
 
avrdude: AVR device initialized and ready to accept instructions
 
Reading | ################################################## | 100% 0.01s
 
avrdude: Device signature = 0x1e9502
 
avrdude: safemode: Fuses OK
 
avrdude done.  Thank you.

Configuring Eclipse