Übersetzungen dieser Seite:

Contiki AVR


Debian Lenny

Jetzt werden die AVR-Tools installiert:

apt-get install  avr-libc binutils-avr gcc-avr gdb-avr simulavr 

Installation des Programmers ATAVRDRAGON

apt-get install avrdude avrdude-doc

Contiki installieren

dowload contiki;a=tree

entpacke Contiki in dein Home Verzeichniss

Contiki with uIPv6 and SICSlowpan support on Atmel RAVEN hardware

cd ~/contiki/examples/webserver-ipv6-raven
make TARGET=avr-raven
cd ~/contiki/platform/avr-ravenlcd
cd ~/contiki/examples/ravenusbstick

so jetzt spielen wir die Firmware in die Hardware

todo (habe is mit windows mit AVR Studio überspielt)

avr-objcopy -O ihex -j .eeprom ravenusbstick.elf ravenusbstick-eeprom.hex
avr-objcopy -v -O ihex -R .eeprom -R .fuse ravenusbstick.elf ravenusbstick.hex
avrdude -u -p usb1287 -c dragon_jtag -v -P usb -Uefuse:w:0xFF:m -Uhfuse:w:0x99:m -Ulfuse:w:0xE2:m -Ueeprom:w:ravenusbstick-eeprom.hex -Uravenusbstick.hex

avrdude -p m8 -c dragon_isp -P usb -e -U flash:w:flash.hex

(you need root privileges to access the usb port)

# Here's the breakdown of the options:
-p m8
tells avr dude it an atmega8 we are trying to program.
-c dragon_isp
tells it we are using the avr dragon and its isp programming mode
-P usb
tells it that the dragon is connected to usb (defaults to parallel port usually??)
erases the microcontroller prior to putting the hex file on it.
-U flash:w:flash.hex
this is the meat and two veg (or qourn if your veggie) of the operation, it tells ' avrdude to write the hex file to the AVR's  memory

Debin interfaces anpassen:

# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
allow-hotplug usb0
auto usb0
iface usb0 inet dhcp

Als nächstes installieren wir den RAD-Demon:

aptitude install radvd

Jetzt passen wir die Configdatei an /etc/radvd.conf:

interface usb0
  AdvSendAdvert on;
  AdvLinkMTU 1280;
  AdvCurHopLimit 128;
  AdvReachableTime 360000;
  MinRtrAdvInterval 100;
  MaxRtrAdvInterval 150;
  AdvDefaultLifetime 200;
  prefix AAAA::/64
      AdvOnLink on;
      AdvAutonomous on;
      AdvPreferredLifetime 4294967295; 
      AdvValidLifetime 4294967295; 

Demon Starten:

ip -6 address add aaaa::1/64 dev usb0
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
/etc/init.d/radvd restart

Hetzt können wir pingen:

ping6 aaaa::0011:22ff:fe33:4455

oder surfen:



de/contiki.txt · Zuletzt geändert: 2011/08/01 11:19 von wikisysop