Debian Codegraph @

doc/ice-gdb.1

raw
1 .TH ice-gdb 1 "August 22, 2003"
2 .SH NAME
3 ice-gdb \- JTAG ICE frontend for avr-gdb
4 .br
5 ice-insight \- JTAG ICE frontend for avr-insight
6 .SH SYNOPSIS
7 .B ice-gdb/ice-insight
8 .RB [ --debugger
9 .IR debugger ]
10 .RB [ --capture ]
11 .RB [ --ignore-intr ]
12 .RB [ --external ]
13 .RI [ gdb_arguments ]
14 .SH DESCRIPTION
15 .B ice-gdb
16 (respectively
17 .BR ice-insight )
18 starts
19 .B avr-gdb
20 (respectively
21 .BR avr-insight )
22 and
23 .B avarice
24 to do on-chip debugging on Atmel AVR processors using their JTAG-based
25 on-chip debug facilities, via the Atmel JTAG ICE pod.
26
27 The executable for the program being debugged is downloaded to the
28 processor unless the
29 .B --capture
30 option is specified. A number of extra commands are available within gdb
31 when started, see their description in NEW GDB COMMANDS below. Restrictions
32 on debugging with the JTAG ICE pod are discussed in more detail in DEBUGGING
33 WITH JTAG ICE below.
34
35 The arguments passed to
36 .B avarice
37 include the value of the
38 .B AVARICE_ARGS
39 environment variable. This is typically used to specify the serial port to
40 which the JTAG ICE pod is connected by setting
41 .B AVARICE_ARGS
42 to "\-j <serial port name>".
43 .SH OPTIONS
44 .TP
45 .B --debugger debugger_command
46 Specify a different debugger than avr-gdb (or avr-insight). This other
47 debugger should behave similarly to gdb.
48 .TP
49 .B --capture
50 Don't download the executable being debugged to the mote, just interrupt the
51 current program and assume that it matches the executable passed to
52 .BR ice-gdb .
53 This is similar to "attaching" to a running program within gdb.
54 .TP
55 .B --ignore-intr
56 Pass the
57 .B --ignore-intr
58 option to
59 .BR avarice .
60 The single-step commands in gdb (s, n) will then "step over" interrupt
61 handlers (i.e., if an interrupt occurs, execution will resume for the
62 duration of the interrupt).
63 .TP
64 .B --external
65 Do not start
66 .BR avarice .
67 Instead,
68 .B avr-gdb
69 will attempt to connect to an already running
70 .B avarice
71 on port localhost:6423.
72 .SH NEW GDB COMMANDS
73 .TP
74 .B ice-restart
75 Restart avarice.
76 .TP
77 .B ice-load filename
78 Download executable filename to the Atmel processor and start debugging it
79 (this replaces the gdb
80 .B load
81 command).
82 .TP
83 .B target-ice
84 Connect to a copy of
85 .B avarice
86 running on port localhost:6423.
87 .SH DEBUGGING WITH JTAG ICE
88 The JTAG ICE debugging environment has a few restrictions and changes:
89 .IP \(bu 4
90 No "soft" breakpoints, and only three hardware breakpoints. The break
91 command sets hardware breakpoints. The easiest way to deal with this
92 restriction is to enable and disable breakpoints as needed.
93 .IP \(bu
94 Two 1-byte hardware watchpoints (but each hardware watchpoint takes away
95 one hardware breakpoint). If you set a watchpoint on a variable which takes
96 more than one byte, execution will be abysmally slow. Instead it is better
97 to do the following:
98
99 .RS 6
100 watch *(char *)&myvariable
101 .RE
102 .IP
103 which watches the least significant byte of
104 .BR myvariable .
105 .IP \(bu
106 The Atmel AVR processors have a Harvard architecture (separate code and
107 data buses). To distinguish data address 0 from code address 0,
108 .B avr-gdb
109 adds 0x800000 to all data addresses. Bear this in mind when examining
110 printed pointers, or when passing absolute addresses to gdb commands.
111 .SH ENVIRONMENT
112 .TP
113 .B AVARICE_ARGS
114 Extra arguments to pass to
115 .B avarice
116 at startup.
117 .SH SEE ALSO
118 gdb(1), insight(1).
119 .SH BUGS
120 On Windows, the
121 .B ice-gdb
122 and
123 .B ice-insight
124 commands only work in the
125 .B cygwin
126 environment. They do not work with the
127 .B mingw
128 environment.