GDB bdi2000 and mpc85xx
A message that is not in the archive (sent off-list or not yet received): [email protected]
On Saturday 03 November 2007 01:17:48, Stuart Hodgson wrote:
Quoted 35 lines
Hi,
I am attempting to get Kernel debugging working on our mpc8541 based board via a BDI2000. The various components in use are
kernel - 2.6.19.2
BDI firmware - 1.08
U-Boot - 1.2.0
ppc_85xx-gdb - from eldk4.1 (6.3.0.0-1.21_3rh)Kernel is configured with
-gin CFLAGS and not withCONFIG_BDI_SWITCH, from the information I have read around the subject this seem to be correct. I also haveMMU XLAT, andPTBASE 0xF0set in by BDI configuration file. The default value for XLAT of0xc0000000matches the kernel our kernel config.Steps that I done so far
1. Power on BDI
2. Power on the board
3. BDI> reset run
4. Enter u-boot environment to stop linux booting immediately.
5. BDI> HALT
6. BDI> BREAK HARD
7. BDI> BI0xc025a51c(this is the address ofstart_kernelfor my build)
8. BDI> GO
9. From U-boot promptbootm, kernel is copied from flash and loading begins
10. Kernel does not halt atstart_kerneland continues to the loginIf I attempt to break at an address later in the boot sequence, such as
qmx19_ata_input_data(this is the area that I am trying to investigate) I get
Quoted 6 lines
- TARGET: core #0 has entered debug mode
So from here I attempt to connect to the BDI from gdb
linux> cd ~/linux-2.6.19.2
linux> ppc_85xx-gdb vmlimux
Most of the operation could be done within gdb
BDI> reset
powerpc-unknown-linux-gnu-gdb vmlinux
(gdb) target remote bdi:2001
(gdb) ^C
(gdb) b *0x12345678
(gdb) c
...
Quoted 12 lines
"
GNU gdb Red Hat Linux (6.3.0.0-1.21_3rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "--host=i386-redhat-linux --target=ppc-linux". The target architecture is set automatically (currently powerpc:603) "
Quoted 8 lines
I noticed here that the last line does not match the e500 core I am using, but there does not seem to a change if I change this using
set architecture powerpc:e500(gdb) tar rem <bdi_ip>:2001
Remote debugging using <bdi_ip>:20010x00000000in ?? ()
Which configuration file do you use for mpc85xx? probably is the config file problem?
Quoted 11 lines
What I don't understand here is why
0x00000000is shown as the address, further on the BDI the following error is shown then the connection is made"
*** MMU: address translation for0x00000000failedStuart Hodgson
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Wang
Signature · 5 lines
Wang, Baojun Lanzhou University Distributed & Embedded System Lab http://dslab.lzu.edu.cn School of Information Science and Engeneering [email protected] Tianshui South Road 222. Lanzhou 730000 .P.R.China Tel:+86-931-8912025 Fax:+86-931-8912022
Wang,
I had a closer look at all the configuration file options to see what we had set up. We were missing
REGLIST E500
in the [TARGET] Section.
Thanks again
Stuart
Adding this solved the translation problem
Quoted 98 lines · Baojun
Quoted 35 lines · Stuart Hodgson
Hi,
I am attempting to get Kernel debugging working on our mpc8541 based board via a BDI2000. The various components in use are
kernel - 2.6.19.2
BDI firmware - 1.08
U-Boot - 1.2.0
ppc_85xx-gdb - from eldk4.1 (6.3.0.0-1.21_3rh)Kernel is configured with
-gin CFLAGS and not withCONFIG_BDI_SWITCH, from the information I have read around the subject this seem to be correct. I also haveMMU XLAT, andPTBASE 0xF0set in by BDI configuration file. The default value for XLAT of0xc0000000matches the kernel our kernel config.Steps that I done so far
1. Power on BDI
2. Power on the board
3. BDI> reset run
4. Enter u-boot environment to stop linux booting immediately.
5. BDI> HALT
6. BDI> BREAK HARD
7. BDI> BI0xc025a51c(this is the address ofstart_kernelfor my build)
8. BDI> GO
9. From U-boot promptbootm, kernel is copied from flash and loading begins
10. Kernel does not halt atstart_kerneland continues to the loginIf I attempt to break at an address later in the boot sequence, such as
qmx19_ata_input_data(this is the area that I am trying to investigate) I getQuoted 7 lines
- TARGET: core #0 has entered debug mode
So from here I attempt to connect to the BDI from gdb
linux> cd ~/linux-2.6.19.2
linux> ppc_85xx-gdb vmlimuxMost of the operation could be done within gdb
BDI> reset
powerpc-unknown-linux-gnu-gdb vmlinux
(gdb) target remote bdi:2001
(gdb) ^C
(gdb) b *0x12345678
(gdb) c
...Quoted 12 lines
"
GNU gdb Red Hat Linux (6.3.0.0-1.21_3rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "--host=i386-redhat-linux --target=ppc-linux". The target architecture is set automatically (currently powerpc:603) "Quoted 9 lines
I noticed here that the last line does not match the e500 core I am using, but there does not seem to a change if I change this using
set architecture powerpc:e500(gdb) tar rem <bdi_ip>:2001
Remote debugging using <bdi_ip>:20010x00000000in ?? ()Which configuration file do you use for mpc85xx? probably is the config file problem?
Quoted 8 lines
What I don't understand here is why
0x00000000is shown as the address, further on the BDI the following error is shown then the connection is made"
*** MMU: address translation for0x00000000failedQuoted 6 lines
Stuart Hodgson
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embeddedWang