|
NAMEavarice - Provides an interface from avr-gdb to Atmel's AVR in-circuit debugging toolsSYNOPSISavarice [OPTIONS]... [[HOST_NAME]:PORT]DESCRIPTIONAVaRICE runs on a POSIX machine and connects to gdb via a TCP socket and communicates via gdb's "serial debug protocol". This protocol allows gdb to send commands like "set/remove breakpoint" and "read/write memory".AVaRICE translates these commands into the Atmel protocol used to control the AVR JTAG ICE. Connection to the AVR JTAG ICE is via a serial port on the POSIX machine. Because the GDB <---> AVaRICE connection is via a TCP socket, the two programs do not need to run on the same machine. In an office environment, this allows a developer to debug a target in the lab from the comfort of their cube (or even better, their home!) NOTE: Even though you can run avarice and avr-gdb on different systems, it is not recommended because of the security risk involved. avarice was not designed to be a secure server. There is no authentication performed when a client connects to avarice when it is running in gdb server mode. Supported Devicesavarice currently has support for the following devices:at90can128
at90can32 (o) at90can64 (o) at90pwm2 (o) (+) at90pwm216 (o) (+) at90pwm2b (o) (+) at90pwm3 (o) (+) at90pwm316 (o) (+) at90pwm3b (o) (+) at90usb1287 (o) at90usb162 (o) (+) at90usb646 (o) at90usb647 (o) atmega128 atmega1280 (o) atmega1281 (o) atmega1284p (o) atmega128rfa1 (o) atmega16 atmega162 atmega164p (o) atmega165 (o) atmega165p (o) atmega168 (o) (+) atmega168p (o) (+) atmega169 atmega16hva (o) atmega16m1 (o) (+) atmega2560 (o) atmega2561 (o) atmega32 atmega323 atmega324p (o) atmega325 (o) atmega3250 (o) atmega3250p (o) atmega325p (o) atmega328p (o) (+) atmega329 (o) atmega3290 (o) atmega3290p (o) atmega329p (o) atmega32c1 (o) (+) atmega32hvb (o) (+) atmega32m1 (o) (+) atmega32u4 (o) atmega406 (o) atmega48 (o) (+) atmega48p (o) (+) atmega64 atmega640 (o) atmega644 (o) atmega644p (o) atmega645 (o) atmega6450 (o) atmega649 (o) atmega6490 (o) atmega64c1 (o) (+) atmega64m1 (o) (+) atmega88 (o) (+) atmega88p (o) (+) attiny13 (o) (+) attiny167 (o) (+) attiny2313 (o) (+) attiny24 (o) (+) attiny25 (o) (+) attiny261 (o) (+) attiny4313 (o) (+) attiny43u (o) (+) attiny44 (o) (+) attiny45 (o) (+) attiny461 (o) (+) attiny48 (o) (+) attiny84 (o) (+) attiny85 (o) (+) attiny861 (o) (+) attiny88 (o) (+) atxmega128a1 (o) (*) atxmega128a1revd (o) (*) atxmega128a3 (o) (*) atxmega192a3 (o) (*) atxmega256a3 (o) (*) atxmega32a4 (o) (*) atxmega16d4 (o) (*) atxmega128b1 (o) (*) atxmega128b3 (o) (*) atxmega64b1 (o) (*) atxmega64b3 (o) (*) o - Not supported by JTAG ICE mkI
Supported File Formatsavarice uses libbfd for reading input files. As such, it can handle any file format that libbfd knowns about. This includes the Intel Hex, Motorola SRecord and ELF formats, among others. If you tell avarice to read an ELF file, it will automatically handle programming all of the sections contained in the file (e.g. flash, eeprom, etc.).OPTIONS
HOST_NAME defaults to 0.0.0.0 (listen on any interface) if not given. :PORT is required to put avarice into gdb server mode. EXAMPLE USAGEavarice --erase --program --file test.bin --jtag /dev/ttyS0 :4242Program the file test.bin into the JTAG ICE (mkI) connected to /dev/ttyS0 after erasing the device, then listen in GDB mode on the local port 4242. This functionality is deprecated, and no longer configured by default. Use GDB's "load" command instead. avarice --jtag usb:1234 --mkII :4242 Connect to the JTAG ICE mkII attached to USB which serial number ends in 1234, and listen in GDB mode on local port 4242. DEBUGGING WITH AVARICEThe JTAG ICE debugging environment has a few restrictions and changes:
watch *(char *)&myvariable
DEBUGWIREThe debugWire protocol is a proprietary protocol introduced by Atmel to allow debugging small AVR controllers that don't offer enough pins (and enough chip resources) to implement full JTAG. The communication takes place over the /RESET pin which needs to be turned into a debugWire connection pin by programming the DWEN fuse (debugWire enable), using a normal programmer connection (in-system programming, high-voltage programming). Note that by enabling this fuse, the standard reset functionality of that pin will be lost, so any in-system programming will cease to work as it requires a functional /RESET pin. Thus it should be made absolutely sure there is a way back, like a device (as the STK500, for example) that can handle high-voltage programming of the AVR. Currently, avarice offers no option to turn off the DWEN fuse. However, avrdude offers the option to turn it off either through high-voltage programming, or by using the JTAG ICE mkII to first turn the target into an ISP-compatible mode, and then using normal ISP commands to change the fuse settings.Note that the debugWire environment is further limited, compared to JTAG. It does not offer hardware breakpoints, so all breakpoints have to be implemented as software breakpoints by rewriting flash pages using BREAK instructions. Some memory spaces (fuse and lock bits) are not accessible through the debugWire protocol. SEE ALSOgdb(1), avrdude(1), avr-gdb(1), insight(1), avr-insight(1), ice-gdb(1), ice-insight(1)AUTHORSAvarice (up to version 1.5) was originally written by Scott Finneran with help from Peter Jansen. They did the work of figuring out the jtagice communication protocol before Atmel released the spec (appnote AVR060).David Gay made major improvements bringing avarice up to 2.0. Joerg Wunsch reworked the code to abstract the JTAG ICE communication from the remainder, and then extended the code to support the JTAG ICE mkII protocol (see Atmel appnote AVR067), as well as the JTAGICE3 protocol.
Visit the GSP FreeBSD Man Page Interface. |