On Wed, 05 Apr 2000 10:28:53 -0400, George France wrote:
> I will agree that printk's work great when you are into the 'c' code. I find
> the logic analyzer is most useful when I am in the 'S' code of the boot
> loader or the initialization files of the kernel. The other place the logic
> analyzer is extremely helpful is in debugging device drivers like PCI, USB,
> SCSI, PCMCIA and Ethernet.
'S' debugging can be done very well with an onboard LED, a scope, and
knowledge about the target being debugged.
Just start writing a piece of 'S' code that traps the reset vector,
initializes the I/O ports, and goes into an endless loop that blinks the
LED. The LED will blink at several MHz, so you should check it with a
scope. Add some extra "nop" instructions in the loop to see if it
influences the LED. After that it gets as simple as Russell described:
program the serial port, write some routines to print out strings, hex
characters, etc. Now set up a proper stack and call the first C function,
and before you know it, you'll have a complete boot loader.
That's how we did it with the LART: one LART, one (approximately) 20 year
old Tektronix scope, one SA-1100 manual, and a gcc tool chain.
Erik
--
Yes, it works sometimes. If you need something that "works sometimes"
use Windows! -- Victor Khimenko on linux-kernel
unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]
++ Please use [EMAIL PROTECTED] for ++
++ kernel-related discussions. ++