Suggestion: debug Linux in general

Sep 07, 2004 4 Replies

Hi, I am trying to boot Linux on my development board and it stucks somewhere, -- I do not see log in prompt on my Hyper Terminal. I am new to embedded Linux stuff, and not sure how to debug this.



In standalone mode, I usually start GDB to trace the software and see on which code is the problem, but how should I do for Linux? I was told briefly that Linux turns on MMU in the very early stage which makes it very difficault to debug kernel. How true is it?



I wonder if there are very good book/tutorial about Linux debug in this booting phase? I checked out "Building Embedded Linux", it mentions some linux debug using GDB, but not in details and seems only for application.



Any suggestion is higjly appreciated.



Thanks.


Are you sure you want to debug lots of software you didn't write yourself ? Wouldn't it be quicker to get someone that fixes your problem ?

Rene

try kgdb for debugging the kernel u can insert a breakpoint pretty early using this

-SIGTERM amit

John Black wrote:

new

was

makes

in

mentions

It is true that Linux enables the MMU very early, and it is true that many of the tools from traditional RTOS vendors don't work well then.

Your options depend on the target architecture. On x86, you're more or less stuck with kgdb - that's a fine and powerful tool, but it requires that some parts of the system are still running.

On ARM, MIPS and PowerPC you can use a BDM / JTAG debugger; the de-facto standard tool is the BDI2000 by Abatron, which understands how to doeal with the MMU, and which has an interface to GDB, so you can still use your well known toolchain.

See

formatting link
for a start.

Hope this helps.

Best regards,

Wolfgang Denk

Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Web: www.denx.de The only person who always got his work done by Friday was Robinson Crusoe.

Just for curiousity, how does SOFTICE do on debugging Linux? I have no idea.

"I'm a war president. I make decisions here in the Oval Office in foreign policy matters with war on my mind." - Bush. "If I knew then what I know today, I would still have invaded Iraq. It was the right decision" - G.W. Bush, 2004-08-02

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required