summaryrefslogtreecommitdiff
path: root/gdb/README
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/README')
-rw-r--r--gdb/README80
1 files changed, 80 insertions, 0 deletions
diff --git a/gdb/README b/gdb/README
new file mode 100644
index 0000000000..751fb22946
--- /dev/null
+++ b/gdb/README
@@ -0,0 +1,80 @@
1--------------------------------------------------------------------
2 __________ __ ___.
3 Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 \/ \/ \/ \/ \/
8 $Id$
9
10 Copyright (C) 2002 by Linus Nielsen Feltzing
11
12--------------------------------------------------------------------
13
14Debugging the Archos Jukebox
15----------------------------
16
17To debug using the serial port on the Jukebox, you need to do the following:
18
191) Connect the serial port to the PC. This is best done with the "serial
20 port mod" described on the home page, along with a serial port converter
21 for the 3V signals from the Jukebox.
22
232) Build or download a GDB SH1 cross debugger
24
253) Compile the GDB stub from the CVS "gdb" archive
26
274) Copy the newly built ARCHOS.MOD to the Jukebox.
28
295) Start the Jukebox and fire up the GDB with the elf file you want to debug
30 as an argument along with the baud rate:
31
32 # sh-elf-gdb -b 38400 test.elf
33
346) In GDB, type:
35
36 (gdb) target remote /dev/ttyS0
37
38 /dev/ttyS0 is the serial port you want to use. I guess Windows users
39 would type COM1 or something like that.
40
41 GDB should answer with a message like:
42
43 Remote debugging using /dev/ttyS0
44 0x090014b6 in ?? ()
45 (gdb)
46
477) Load the code from the elf file you specified on the command line:
48
49 (gdb) load
50
51 GDB should answer like this:
52
53 Loading section .text, size 0x6b00 lma 0x9018000
54 Loading section .data, size 0x738 lma 0x901eb00
55 Start address 0x9018290, load size 29240
56 Transfer rate: 11696 bits/sec, 102 bytes/write.
57 (gdb)
58
598) You're set. Now try to set a breakpoint and run:
60
61 (gdb) b 22
62 Breakpoint 1 at 0x90182c6: file led.c, line 14.
63 (gdb) c
64 Continuing.
65
66 Breakpoint 2, main () at led.c:15
67 15 SSR1 &= ~(SCI_RDRF | SCI_ORER | SCI_PER | SCI_FER);
68 (gdb)
69
70 Good luck!
71
72
73Technical details:
74
75 As for now, the GDB stub occupies the memory from 0x900000 up to
76 0x9018000. This will change.
77
78 Compile and link your test program at 0x9018000 and up, and it will work.
79
80 The baud rate is 38400, and the settings are 8N1.