Skip to contentSkip to conversation

help starting

U-Boot-Users Ilan Finci 2 participants 5 messages Dec 1, 2004

lore
Share & tools
lore

Ilan Finci

author
#0 lore raw

Hi,
I'm totally new to the world of porting U-Boot (or other boot loaders) to new hardware.

I have an older version of U-Boot (0.4.5) that was ported to 2 custom made boards we have, based on the MPC5200 CPU, and the IceCube evaluation board. Both has the same U-Boot up and running.

We now have a new board, base on the same design, but with some modification.

I have BDI2000 up and running, and I can access the board's memory, flash, cpu registers etc.

When I try to run the same U-boot, it, as can be expected, fails to run, and stop very soon after startup (no message comes out on the serial console).

I've tried to connect with GDB to debug, and I manage to do it, then step few commands, and I get SIGSTOP. To make sure that this is not a problem of the new board, I've tried the same with a working board, and the U-Boot fails at the same place (right after the starting point). On the other hand, if I don't try to do a step by step debugging, but give a "cont" command, the U-boot (on the older board) does work.

So I guess I have a basic problem in understanding how to debug the U-Boot with GDB.

Any help (either specific, or pointers to guides), will be great.

Thanks,
Ilan

#1 lore raw
Quoted 3 lines · In message <[email protected]> you wrote:

So I guess I have a basic problem in understanding how to debug the U-Boot with GDB.

Did you read the "Debugging" section in the manual?

See http://www.denx.de/twiki/bin/view/DULG/DebuggingUBoot

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Uuencode/uudecode is just a mickey-mouse archiver.
                       - Doug Gwyn in <[email protected]>
author
#2 lore raw

Hi,
Yes I've read it, but when I try this (on the older board, where the u-boot is working), the gdb doesn't stop at that function, just continue (and over the serial terminal, I see the normal u-boot messages, and later auto booting into linux).

Here is the screen dump of what I've done:

U-Boot $ powerpc-linux-gdb u-boot
GNU gdb 5.3
Copyright 2002 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=i686-pc-linux-gnu --target=powerpc-linux"...
(gdb) target remote jtag2:2001
Remote debugging using jtag2:2001
_start () at /homes/ifinci/secure/work/SeeQNet/U-Boot/cpu/mpc5xxx/start.S:91
91 li r21, BOOTFLAG_COLD /* Normal Power-On

        */

(gdb) b cpu_init_f
Breakpoint 1 at 0xfff03a34: file cpu_init.c, line 53. (gdb) c
Continuing.

and I don't get the GDB prompt back unless I press CTRL+C.

Any idea?

Thanks,
Ilan

on 12/01/04 09:22 Wolfgang Denk said the following:

Quoted 14 lines
Quoted 2 lines · In message <[email protected]> you wrote:

So I guess I have a basic problem in understanding how to debug the U-Boot with GDB.

Did you read the "Debugging" section in the manual?

See http://www.denx.de/twiki/bin/view/DULG/DebuggingUBoot

Best regards,

Wolfgang Denk

#3 lore raw
Quoted 5 lines · In message <[email protected]> you wrote:

Yes I've read it, but when I try this (on the older board, where the u-boot is working), the gdb doesn't stop at that function, just continue (and over the serial terminal, I see the normal u-boot messages, and later auto booting into linux).

Is your BDI is configured to use hardware breakpoints?

Best regards,

Wolfgang Denk

Signature · 3 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Open the pod bay doors, HAL."                    - Dave Bowman, 2001
author
#4 lore raw

Apparently not :(

Setting it to use hardware BP, did the trick.

Thanks,
Ilan

on 12/01/04 13:13 Wolfgang Denk said the following:

Quoted 14 lines
Quoted 4 lines · In message <[email protected]> you wrote:

Yes I've read it, but when I try this (on the older board, where the u-boot is working), the gdb doesn't stop at that function, just continue (and over the serial terminal, I see the normal u-boot messages, and later auto booting into linux).

Is your BDI is configured to use hardware breakpoints?

Best regards,

Wolfgang Denk