Downloading and Debugging linux / programs via BDM
I am fairly new to embedded Linux.
I am attempting to load Linux and the compiled program to an MBX board via the BDM port. The host machine is an x86 running RH Linux 7.0 and I am using the tools provided with the RH EDK along with the BDM dongle and software from Macraigor Systems.
I have cross compiled a kernel and a test program that was successfully downloaded and run via the serial port; however, it is more desirable to run and debug programs from the BDM as our user interface uses the serial port. The primary program will not require kernel debugging, but there are some device drivers that may need to be debugged.
What is the procedure for getting Linux downloaded to the board (via BDM) and started, then getting my program(s) downloaded and started and attaching the debugger (ddd/gdb) to the desired program?
The initial target is a Motorola MBX board with an MPC860 ppc processor, the ultimate target is a custom board utilizing the same processor.
The system will be run out of FLASH ultimately, there is no hard disc, keyboard, or monitor.
TIA, Doug
Doug Hubbard
Software Engineer
Scientific Research Corporation
2300 Windy Ridge Parkway
Suite 400, South
Atlanta, GA 30339
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 2 lines · In message <[email protected]> you wrote:
I am fairly new to embedded Linux.
Welcome.
Quoted 2 lines
7.0 and I am using the tools provided with the RH EDK along with the BDM dongle and software from Macraigor Systems.
AFAIK the Macraigor dongle does not support the MMU; you cannot use it to debug Linux.
Quoted 3 lines
What is the procedure for getting Linux downloaded to the board (via BDM) and started, then getting my program(s) downloaded and started and attaching the debugger (ddd/gdb) to the desired program?
You should be aware that you cannot simply download a Linux kernel image to some board and run it. Linux expects a lot of hardware initialization to be done before it runs, and some parameters passed to it.
Quoted 2 lines
The initial target is a Motorola MBX board with an MPC860 ppc processor, the ultimate target is a custom board utilizing the same processor.
First, get a BDM debugger that understands to use the MMU, and that can be used in a Linux environment. My recommendation is the BDI2000 by Abatron. See http://www.abatron.ch
Then, install some Linux-friendly firmware on your board. My
recommendation is PPCBoot. See http://ppcboot.sourceforge.net and ftp://ftp.denx.de/pub/ppcboot/ . The MBX860 board is one of the standard configurations of PPCBoot and should run out of the box.
Finally, use PPCboot to load the kernel image and start it with the right parameters, and use GDB to connect to your BDI2000 and debug the running Linux kernel.
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] I have the simplest tastes. I am always satisfied with the best.
-- Oscar Wilde
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/