|
Debugging
Embedded Linux with JTAG and Debugger
This section contains
information to help you
debug the embedded Linux kernel with Debugger. If you are interested
in debugging installable modules, please refer to the
section entitled: “DEBUG
LINUX-LOADABLE MODULES AND
DEVICE DRIVERS”.
General Principles
Debugging the Linux kernel
requires that the
debug environment is aware of the MMU translation scheme used by the
Linux
kernel. The JTAG and Debugger are fully aware
of Linux MMU translation. To debug the Linux kernel:
- Make sure that MMU
translation is turned on in your initialization (.DEF) file.
- Build the Linux kernel
with debug symbols enabled. (Use the “-g”
switch in your make file)
- Build the Linux kernel
with pipelining disabled.(Use the “-fno-schedule-insns
-fno-schedule-insns2” switch in your make file)
Steps
to Follow
Once
you have verified these changes, you are ready to begin debugging. At
this
point use a boot loader (U-BOOT is used in this example) to load the
kernel to
your target and start it running. Here
are the typical steps you should follow:
- Start a Minicom session
or Windows Hyper Terminal (serial link to your target)
- Start Debugger
- Load an
Debugger configuration that:
- loads kernel
symbols only (example: vmlinux.elf).
- connects to your target
and lets you load symbols manually via Load
command in the File
menu (vmlinux.elf
for example)
- Verify you have symbol
information in the Debugger Function Browser
window by selecting a kernel module and after pressing the right mouse
button select and select Show this function (“start_kernel”
is a good example to use)
- Use the Right Mouse menu
to set a hardware break point in “start_kernel”
- Reset and start
your target running from within Debugger
- Verify that your target
monitor is up and running
- Load the
Linux kernel from your monitor
- Once Linux is up and
running, the kernel stops at the breakpoint and program execution is
halted
- Source code for
“start_kernel”
is displayed in an Debugger source window
|
Products
»Embedded Tools Introduction
»Debugger
Introduction
»JTAG
Introduction
Processor
Support
»AMCC PowerPC Debug
Tools
»Freescale Debug
Tools
»IBM PowerPC Debug
Tools
»Intel XScale Debug
Tools
»ARM
Debug Tools
»MIPS Debug Tools
»Complete Processor
List
Technology
»JTAG Emulators
»Hardware Board
Bring-Up
»Boot Loader
(U-Boot) Debug
»Embedded LINUX
Debug
»C/C++ Source Level
Debug
»JTAG FLASH Programming
»JTAG Connector Pin
Outs
|