avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-chat] avr-gdb_emacs_in windows xp?


From: Joerg Wunsch
Subject: Re: [avr-chat] avr-gdb_emacs_in windows xp?
Date: Thu, 21 Jun 2007 21:25:23 +0200 (MET DST)

Glen Jackson <address@hidden> wrote:

> How can i rewrite my Makefile to run avr-gdb in the shell of Emacs?

My very personal opinion on this: this is not a typical job for "make"
at all.  What I'm doing is to use make up to the "make program" stage
to reflash the target AVR.  Then, when I want to debug the target, I
start the avarice command manually in a separate terminal window.  In
Emacs, I use the "gud" (grand unified debugger) module to run GDB in
it.  Once avarice has been started, I connect to it using the usual
"target remote :<portnr>" command.  After debugging, the debugger
detaches from avarice, and for the next debugging session, I simply
restart avarice using the shell history, i.e. <cursor up> <enter>.

The gud/GDB interface is started by M-x gdb in Emacs.  It then offers
you a command-line to start GDB with, edit the "gdb " into "avr-gdb ",
and append the name of the ELF file to run AVR-GDB on.  Normally, you
can keep that gud window running in Emacs as long as you need it; GDB
will automatically notice (based on the timestamp) if the ELF file
changed, and re-read the symbolic debugging information from it if
necessary.  So for the next session, you simply have to run the
"target remote" command again (possibly from withing gud's history).

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]