File: ice-gdb.1

package info (click to toggle)
avarice 2.13%2Bsvn347-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,880 kB
  • sloc: cpp: 22,872; sh: 4,129; ansic: 1,134; makefile: 92
file content (128 lines) | stat: -rw-r--r-- 3,425 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
.TH ice-gdb 1 "August 22, 2003"
.SH NAME
ice-gdb \- JTAG ICE frontend for avr-gdb
.br
ice-insight \- JTAG ICE frontend for avr-insight
.SH SYNOPSIS
.B ice-gdb/ice-insight
.RB [ --debugger
.IR debugger ]
.RB [ --capture ]
.RB [ --ignore-intr ]
.RB [ --external ]
.RI [ gdb_arguments ]
.SH DESCRIPTION
.B ice-gdb
(respectively
.BR ice-insight )
starts
.B avr-gdb
(respectively
.BR avr-insight )
and
.B avarice
to do on-chip debugging on Atmel AVR processors using their JTAG-based
on-chip debug facilities, via the Atmel JTAG ICE pod.

The executable for the program being debugged is downloaded to the
processor unless the
.B --capture
option is specified. A number of extra commands are available within gdb
when started, see their description in NEW GDB COMMANDS below. Restrictions
on debugging with the JTAG ICE pod are discussed in more detail in DEBUGGING
WITH JTAG ICE below.

The arguments passed to
.B avarice
include the value of the
.B AVARICE_ARGS
environment variable. This is typically used to specify the serial port to
which the JTAG ICE pod is connected by setting
.B AVARICE_ARGS
to "\-j <serial port name>".
.SH OPTIONS
.TP
.B --debugger debugger_command
Specify a different debugger than avr-gdb (or avr-insight). This other
debugger should behave similarly to gdb.
.TP
.B --capture
Don't download the executable being debugged to the mote, just interrupt the
current program and assume that it matches the executable passed to
.BR ice-gdb .
This is similar to "attaching" to a running program within gdb.
.TP
.B --ignore-intr
Pass the
.B --ignore-intr
option to
.BR avarice .
The single-step commands in gdb (s, n) will then "step over" interrupt
handlers (i.e., if an interrupt occurs, execution will resume for the
duration of the interrupt).
.TP
.B --external
Do not start
.BR avarice .
Instead,
.B avr-gdb
will attempt to connect to an already running
.B avarice
on port localhost:6423.
.SH NEW GDB COMMANDS
.TP
.B ice-restart
Restart avarice.
.TP
.B ice-load filename
Download executable filename to the Atmel processor and start debugging it
(this replaces the gdb
.B load
command).
.TP 
.B target-ice
Connect to a copy of
.B avarice
running on port localhost:6423.
.SH DEBUGGING WITH JTAG ICE
The JTAG ICE debugging environment has a few restrictions and changes:
.IP \(bu 4
No "soft" breakpoints, and only three hardware breakpoints. The break
command sets hardware breakpoints. The easiest way to deal with this
restriction is to enable and disable breakpoints as needed.
.IP \(bu
Two 1-byte hardware watchpoints (but each hardware watchpoint takes away
one hardware breakpoint). If you set a watchpoint on a variable which takes
more than one byte, execution will be abysmally slow. Instead it is better
to do the following:

.RS 6
watch *(char *)&myvariable
.RE
.IP
which watches the least significant byte of
.BR myvariable .
.IP \(bu
The Atmel AVR processors have a Harvard architecture (separate code and
data buses). To distinguish data address 0 from code address 0,
.B avr-gdb
adds 0x800000 to all data addresses. Bear this in mind when examining
printed pointers, or when passing absolute addresses to gdb commands.
.SH ENVIRONMENT
.TP
.B AVARICE_ARGS
Extra arguments to pass to
.B avarice
at startup.
.SH SEE ALSO
gdb(1), insight(1).
.SH BUGS
On Windows, the
.B ice-gdb
and
.B ice-insight
commands only work in the
.B cygwin
environment. They do not work with the
.B mingw
environment.