summaryrefslogtreecommitdiffstats
path: root/gdb
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-04-15 13:26:40 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-04-15 13:26:40 +0000
commit6de97875e8eb9a1c2fbb18ffa1a0009997bb6710 (patch)
treec84bbde89a47c5b56f89f4ad1871019f4878dc6c /gdb
parent89bec764225e557d71ceff1e268466ea93434a4a (diff)
downloadrockbox-6de97875e8eb9a1c2fbb18ffa1a0009997bb6710.tar.gz
rockbox-6de97875e8eb9a1c2fbb18ffa1a0009997bb6710.tar.bz2
rockbox-6de97875e8eb9a1c2fbb18ffa1a0009997bb6710.zip
*** empty log message ***
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@96 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'gdb')
-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 @@
+--------------------------------------------------------------------
+ __________ __ ___.
+ Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ \/ \/ \/ \/ \/
+ $Id$
+
+ Copyright (C) 2002 by Linus Nielsen Feltzing
+
+--------------------------------------------------------------------
+
+Debugging the Archos Jukebox
+----------------------------
+
+To debug using the serial port on the Jukebox, you need to do the following:
+
+1) Connect the serial port to the PC. This is best done with the "serial
+ port mod" described on the home page, along with a serial port converter
+ for the 3V signals from the Jukebox.
+
+2) Build or download a GDB SH1 cross debugger
+
+3) Compile the GDB stub from the CVS "gdb" archive
+
+4) Copy the newly built ARCHOS.MOD to the Jukebox.
+
+5) Start the Jukebox and fire up the GDB with the elf file you want to debug
+ as an argument along with the baud rate:
+
+ # sh-elf-gdb -b 38400 test.elf
+
+6) In GDB, type:
+
+ (gdb) target remote /dev/ttyS0
+
+ /dev/ttyS0 is the serial port you want to use. I guess Windows users
+ would type COM1 or something like that.
+
+ GDB should answer with a message like:
+
+ Remote debugging using /dev/ttyS0
+ 0x090014b6 in ?? ()
+ (gdb)
+
+7) Load the code from the elf file you specified on the command line:
+
+ (gdb) load
+
+ GDB should answer like this:
+
+ Loading section .text, size 0x6b00 lma 0x9018000
+ Loading section .data, size 0x738 lma 0x901eb00
+ Start address 0x9018290, load size 29240
+ Transfer rate: 11696 bits/sec, 102 bytes/write.
+ (gdb)
+
+8) You're set. Now try to set a breakpoint and run:
+
+ (gdb) b 22
+ Breakpoint 1 at 0x90182c6: file led.c, line 14.
+ (gdb) c
+ Continuing.
+
+ Breakpoint 2, main () at led.c:15
+ 15 SSR1 &= ~(SCI_RDRF | SCI_ORER | SCI_PER | SCI_FER);
+ (gdb)
+
+ Good luck!
+
+
+Technical details:
+
+ As for now, the GDB stub occupies the memory from 0x900000 up to
+ 0x9018000. This will change.
+
+ Compile and link your test program at 0x9018000 and up, and it will work.
+
+ The baud rate is 38400, and the settings are 8N1.