12.07.2015 Views

ARM DS-5 Getting Started with DS-5 - ARM Information Center

ARM DS-5 Getting Started with DS-5 - ARM Information Center

ARM DS-5 Getting Started with DS-5 - ARM Information Center

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>ARM</strong> <strong>DS</strong>-5 tutorials3.10 Debugging a loadable kernel moduleYou can use <strong>DS</strong>-5 to develop and debug a loadable kernel module. Loadable modules can bedynamically inserted and removed from a running kernel during development <strong>with</strong>out the needto frequently recompile the kernel.<strong>DS</strong>-5 provides an example of a simple character device driver, modex.c that you can compile,run, and debug on your target. Pre-built image binaries are provided for Windows users thatmatch the Linux distribution project provided by <strong>DS</strong>-5. Alternatively, see the readme.htmlprovided <strong>with</strong> the kernel_module example for more information on how to compile the kerneland the module.3.10.1 PrerequisitesBefore you can debug the module you must ensure that you:• Unpack kernel source code and compile the kernel against exactly the same kernel versionas the target• Compile the loadable module against exactly the same kernel version as the target.NoteEnsure that you compile both images <strong>with</strong> debug information. The debugger requires run-timeinformation from both images when debugging the module.3.10.2 ProcedureTo debug the loadable module, modex.c:1. Connect the debugger to the target. The device driver example provides a preconfiguredlaunch file:a. Select Debug Configurations... from the Run menu.b. Expand the <strong>DS</strong>-5 Debugger the configuration tree.c. Select the kernel-module-beagle-example entry.d. The Connection tab contains most of the connection settings <strong>with</strong> the exception ofthe Debug Hardware Address field. Enter the IP address or name for the connectionbetween the debugger and the debug hardware agent.<strong>ARM</strong> DUI 0478M Copyright © 2010-2012 <strong>ARM</strong>. All rights reserved. 3-19ID120712Non-Confidential

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!