~ubuntu-branches/ubuntu/dapper/simulavr/dapper

« back to all changes in this revision

Viewing changes to README.gdb

  • Committer: Bazaar Package Importer
  • Author(s): Shaun Jackman
  • Date: 2004-04-10 13:54:17 UTC
  • Revision ID: james.westby@ubuntu.com-20040410135417-zywapjyz252y65se
Tags: upstream-0.1.2.1
ImportĀ upstreamĀ versionĀ 0.1.2.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
##
 
2
## $Id: README.gdb,v 1.5 2003/09/19 19:59:20 troth Exp $
 
3
##
 
4
 
 
5
This README file discusses the issues involved with using the simulator
 
6
remotely from gdb.
 
7
 
 
8
First off, you will need to compile gdb >= 5.2.1 with the avr target support.
 
9
 
 
10
Once you've built and installed gdb for avr, you need to know how to use it to
 
11
debug a remote program. It's an easy, two step process.  First, you need to
 
12
start up simulavr in gdbserver mode as such:
 
13
 
 
14
    $ simulavr --gdbserver [other options]
 
15
 
 
16
Second, just start up avr-gdb with an avr elf program, connect to the remote
 
17
target, and load the program into the sim with these commands:
 
18
 
 
19
    $ avr-gdb myprog.elf
 
20
    (gdb) target remote localhost:<port>
 
21
    (gdb) load
 
22
 
 
23
where <port> is the port number that simulavr is listening on. You need to
 
24
have the simulavr running before giving gdb the target command. In most cases,
 
25
you'll be running simulavr on the same host as gdb, thus the "localhost"
 
26
part. You must use the same port number for simulavr and in the gdb target
 
27
command. If you feel the need to run simulavr on another host, just change
 
28
localhost to the name of the host that simulavr will be running on.
 
29
 
 
30
After gdb has connected to the remote target, you should be able to use gdb
 
31
just as if you were debugging a program natively.
 
32
 
 
33
For more detailed information, see the documentation in the doc subdirectory.
 
34