-
Notifications
You must be signed in to change notification settings - Fork 3
AVR Raven
The ATAVRRZRAVEN 2.4 GHz Evaluation and Starter Kit has two Ravens and one USB stick, five 50 mil headers you will need to solder in for reprogramming, and a 50 mil adapter to the more common 100 mil programmer plug. AVR Studio (for Windows OS only) has the documentation and schematics under the help menu, and has a simulator to test the code before writing it to the device.
- Atmel Raven
- Atmel Jackdaw
- MCU Programmer
Some contiki examples will compile for the ATMega1284p (TARGET=avr-raven) although many will fail because the MCU has no buttons, LEDs, or sensors. The Jackdaw (TARGET=avr-ravenusb) is normally just a repeater for network traffic which does not contain the uip stack (any needed uip6 routines are included in fakeuip.c). However the full stack can be included by modifying the makefile. In this case RAM will become a constraint!
avr-gcc and the avr toolchain are included in Instant Contiki. For Windows installs use WinAVR which is usually up to date (these devices are relatively new). For Linux try this avr-gcc and toolchain.
On Windows the examples will build in cygwin or cmd windows. PERL is trickier to get running in cmd windows.
- /examples/hello-world
$make TARGET=avr-raven will make hello-world.avr-raven which is actually the .elf file. $make TARGET=avr-raven hello-world.elf will make the hello-world.elf file for flashing with some programmers $make TARGET=avr-raven hello-world.hex will extract a .hex file for flashing with most programmers $make TARGET=avr-raven hello-world.u will invoke avrdude programming after a successful build.
- /examples/webserver-ipv6-raven
Makes with compatible AVR platforms are possible, for example the atmega128rfa1 is basically the atmega1284p with an internal RF231 radio. The RF230 radio driver will automatically select appropriate radio driver code (extended io space writes for the atmega128rfa1, software SPI for the mulle platform). Since the raven 1284p has no peripherals (other than the UART0 serial link to the 3290p, which will not hang anything if there is no response) such ports are relatively easy to make. In the /examples/webserver-ipv6raven directory, try
$make TARGET=avr-atmega128rfa1
- /examples/ravenusbstick
- /platform/avr-ravenlcd
The Raven and Jackdaw both have UART outputs for debugging. These need to be level shifted for RS232 using a MAX232 or similar chip. The level converters on the STK500 can be used for the conversion, however many computers no longer have a true serial port and a serial to USB converter would also be needed. Hapsim will connect to the AVR Studio 4 simulation (simulator 1 only) and provide terminal emulation. Hapsim does not (yet) work with AVR Studio 5; a workaround is to direct debug prints to a memory buffer under watch and then break the CPU. Debug messages can be directed through the Jackdaw USB interface but are likely to slow down packet transfers and a burst of messages will be lost. The Jackdaw menu allows turning off the RS232 output to allow it to run at full speed.
Much webserver debugging can be done on the minimal-net target of webserver6, then transferring the code to webserver-ipv6-raven.
There are several options for on-chip debugging. AVR Studio 4 and 5 supports various programmer/debuggers (Dragon, JTAG-ICEmkII, etc.) through the same graphical interface as the simulator. AVaRICE together with a JTAG-ICEmkII or Dragon can act as a GDB or insight server, see this tutorial for setting it up on Windows. The WinAVR installation includes a native avr-gdb.exe and avr-insight.exe which do not require cygwin for operation. Emacs can also connect to the avr-gdb server in the usual way.
Raven motes can be emulated in COOJA (the 1284p and radio). See AVR motes in COOJA