ice-gdb(1)
π ice-gdb β the manual, but make it slay π
okay bestie, pull up a chair because we're talking about ice-gdb (and its twin ice-insight), from the General Commands Manual section of the docs. this is the JTAG ICE frontend situation and honestly? it's giving iconic. let's go π§β¨
πΈ NAME πΈ
ice-gdbβ JTAG ICE frontend foravr-gdbice-insightβ JTAG ICE frontend foravr-insight
β¨ SYNOPSIS β¨
ice-gdb/ice-insight [--debugger debugger] [--capture] [--ignore-intr]
[--external] [gdb_arguments]
π DESCRIPTION π
so here's the vibe: ice-gdb (or ice-insight, its equally valid sibling) starts up avr-gdb (or avr-insight) plus avarice, and together they do on-chip debugging on Atmel AVR processors using their JTAG-based on-chip debug facilities, all through the Atmel JTAG ICE pod. no cap. π₯
the executable for the program you're debugging gets downloaded to the processor... unless you pass the --capture option, in which case it does not. and bestie, when gdb starts up you get a whole lil bonus pack of extra commands β go check NEW GDB COMMANDS below for the full tea. π«
the restrictions on debugging with the JTAG ICE pod? those get discussed in more detail down in DEBUGGING WITH JTAG ICE. it's giving β¨fine print but make it fascinatingβ¨.
the arguments passed to avarice include the value of the AVARICE_ARGS environment variable. this is typically used to specify the serial port the JTAG ICE pod is connected to, by setting AVARICE_ARGS to "-j <serial port name>". iykyk. π
π OPTIONS π
--debuggerdebugger_command β specify a different debugger thanavr-gdb(oravr-insight). this other debugger should behave similarly to gdb, so don't get cute with it. π--captureβ don't download the executable being debugged to the mote, just interrupt the current program and assume it matches the executable you passed toice-gdb. this is similar to "attaching" to a running program within gdb. lowkey the same energy, fr fr. β--ignore-intrβ pass the--ignore-introption toavarice. the single-step commands in gdb (s,n) will then "step over" interrupt handlers β meaning if an interrupt occurs, execution will resume for the duration of the interrupt. main character behavior honestly. π--externalβ do not startavarice. instead,avr-gdbwill attempt to connect to an already runningavariceon portlocalhost:6423. it's giving "i already have one at home". π¦
π NEW GDB COMMANDS π
ice-restartβ restartavarice. that's it. that's the command. periodt. πice-loadfilename β download executable filename to the Atmel processor and start debugging it. heads up: this replaces the gdbloadcommand. π₯target-iceβ connect to a copy ofavaricerunning on portlocalhost:6423. π
π DEBUGGING WITH JTAG ICE π
the JTAG ICE debugging environment has a few restrictions and changes, and we're gonna be honest about them because that's what besties do:
- no "soft" breakpoints, and only three hardware breakpoints. the
breakcommand sets hardware breakpoints. the easiest way to deal with this restriction is to enable and disable breakpoints as needed. budget your breakpoints like they're your last three braincells during finals week. π - 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. like, unwatchable slow. instead it is better to do the following:
watch *(char *)&myvariable
which watches the least significant byte of myvariable. chef's kiss. π
- the Atmel AVR processors have a Harvard architecture (separate code and data buses). to distinguish data address
0from code address0,avr-gdbadds0x800000to all data addresses. bear this in mind when examining printed pointers, or when passing absolute addresses to gdb commands. write that number on your hand, bestie. ποΈ
π ENVIRONMENT π
AVARICE_ARGSβ extra arguments to pass toavariceat startup. that's the whole thing. short, sweet, powerful. β¨
πΈ SEE ALSO πΈ
π«Ά BUGS π«Ά
on Windows, the ice-gdb and ice-insight commands only work in the cygwin environment. they do not work with the mingw environment. sorry to the mingw girlies, it's just not happening. π
and that's the whole page, bestie!! this little manual is from the General Commands Manual section, dated August 22, 2003 β vintage, but she still serves. go debug something cute and remember: three hardware breakpoints, no soft ones, and the vibes are immaculate. ππβ¨
π¦ where this page comes from
- debian bookworm: avarice 2.14+svn427-1 Β· GPL-2.0-or-later
- debian trixie: avarice 2.14+svn427-2 Β· GPL-2.0-or-later
- ubuntu jammy: avarice 2.14+svn392-1 Β· GPL-2.0-or-later
- ubuntu noble: avarice 2.14+svn427-1 Β· GPL-2.0-or-later
- ubuntu questing: avarice 2.14+svn427-2
- ubuntu resolute: avarice 2.14+svn427-2build1 Β· GPL-2.0-or-later
- ubuntu stonking: avarice 2.14+svn427-2build1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms