1ice-gdb(1)                  General Commands Manual                 ice-gdb(1)
2
3
4

NAME

6       ice-gdb - JTAG ICE frontend for avr-gdb
7       ice-insight - JTAG ICE frontend for avr-insight
8

SYNOPSIS

10       ice-gdb/ice-insight  [--debugger  debugger] [--capture] [--ignore-intr]
11       [--external] [gdb_arguments]
12

DESCRIPTION

14       ice-gdb (respectively ice-insight) starts  avr-gdb  (respectively  avr-
15       insight)  and  avarice  to do on-chip debugging on Atmel AVR processors
16       using their JTAG-based on-chip debug facilities, via the Atmel JTAG ICE
17       pod.
18
19       The executable for the program being debugged is downloaded to the pro‐
20       cessor unless the --capture option is specified. A number of extra com‐
21       mands  are  available within gdb when started, see their description in
22       NEW GDB COMMANDS below. Restrictions on debugging with the JTAG ICE pod
23       are discussed in more detail in DEBUGGING WITH JTAG ICE below.
24
25       The  arguments  passed to avarice include the value of the AVARICE_ARGS
26       environment variable. This is typically used to specify the serial port
27       to  which  the JTAG ICE pod is connected by setting AVARICE_ARGS to "-j
28       <serial port name>".
29

OPTIONS

31       --debugger debugger_command
32              Specify a different debugger than avr-gdb (or avr-insight). This
33              other debugger should behave similarly to gdb.
34
35       --capture
36              Don't  download  the executable being debugged to the mote, just
37              interrupt the current program and assume  that  it  matches  the
38              executable passed to ice-gdb.  This is similar to "attaching" to
39              a running program within gdb.
40
41       --ignore-intr
42              Pass the --ignore-intr option to avarice.  The single-step  com‐
43              mands  in  gdb  (s,  n) will then "step over" interrupt handlers
44              (i.e., if an interrupt occurs, execution  will  resume  for  the
45              duration of the interrupt).
46
47       --external
48              Do  not start avarice.  Instead, avr-gdb will attempt to connect
49              to an already running avarice on port localhost:6423.
50

NEW GDB COMMANDS

52       ice-restart
53              Restart avarice.
54
55       ice-load filename
56              Download executable filename to the Atmel  processor  and  start
57              debugging it (this replaces the gdb load command).
58
59       target-ice
60              Connect to a copy of avarice running on port localhost:6423.
61

DEBUGGING WITH JTAG ICE

63       The JTAG ICE debugging environment has a few restrictions and changes:
64
65       ·   No  "soft"  breakpoints,  and  only three hardware breakpoints. The
66           break command sets hardware breakpoints. The easiest  way  to  deal
67           with  this  restriction  is  to  enable  and disable breakpoints as
68           needed.
69
70       ·   Two 1-byte hardware watchpoints (but each hardware watchpoint takes
71           away  one  hardware breakpoint). If you set a watchpoint on a vari‐
72           able which takes more than one byte, execution  will  be  abysmally
73           slow. Instead it is better to do the following:
74
75             watch *(char *)&myvariable
76
77           which watches the least significant byte of myvariable.
78
79       ·   The Atmel AVR processors have a Harvard architecture (separate code
80           and data buses). To distinguish data address 0 from code address 0,
81           avr-gdb adds 0x800000 to all data addresses. Bear this in mind when
82           examining printed pointers, or when passing absolute  addresses  to
83           gdb commands.
84

ENVIRONMENT

86       AVARICE_ARGS
87              Extra arguments to pass to avarice at startup.
88

SEE ALSO

90       gdb(1), insight(1).
91

BUGS

93       On  Windows, the ice-gdb and ice-insight commands only work in the cyg‐
94       win environment. They do not work with the mingw environment.
95
96
97
98                                August 22, 2003                     ice-gdb(1)
Impressum