12.07.2015 Views

ARM DS-5 Using the Debug Hardware Configuration Utilities

ARM DS-5 Using the Debug Hardware Configuration Utilities

ARM DS-5 Using the Debug Hardware Configuration Utilities

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Configuring debug hardware for GDB9.12 Connections to a target OS using gdbserver (GDBserver)If your target application requires TCP/IP communication with <strong>the</strong> debug host, you mustconnect to <strong>the</strong> target using bridged E<strong>the</strong>rnet. Connections of this type are referred to asGDBserver connections. This method is an extension to that used for connections to a targetrunning an application with a GDB stub. The following figure shows an example:<strong>Debug</strong> hostGDBBridged E<strong>the</strong>rnet(IP)<strong>Debug</strong> unit<strong>Configuration</strong>MechanismVirtualE<strong>the</strong>rnetSet up JTAGscan chainDCC(IP over DCC)TargetOSGDBserverApplicationFigure 9-4 GDBserver connectionsIn this method, IP packets can be carried over <strong>the</strong> same link alongside <strong>the</strong> normal GDB protocol.9.12.1 GDBserver ScenarioUse <strong>the</strong> GDBserver connection method to debug an application on a target that has an embeddedOS, such as Linux, that supports independent processes. In this case you can run GDB server(gdbserver) instances. The GDB server can have TCP/IP connections to <strong>the</strong> debug host that isrunning GDB. The DCC driver is available as a Linux OS download from <strong>the</strong> <strong>ARM</strong> web site.9.12.2 PrerequisitesTo use <strong>the</strong> GDBserver connection method:• On <strong>the</strong> GDB connection to <strong>the</strong> target, you must enable DCC and Virtual E<strong>the</strong>rnet/TTYmode before starting <strong>the</strong> processor.• The target OS must be running a TCP/IP stack and gdbserver.• debug hardware acts as a network bridge between <strong>the</strong> target processor and <strong>the</strong> host PCusing a virtual E<strong>the</strong>rnet link. The target must have its own IP address that is ei<strong>the</strong>r fixedor obtained from a DHCP server, and that appears on <strong>the</strong> virtual E<strong>the</strong>rnet as anindependent host.9.12.3 ProcedureIf your application uses an IP stack, it can communicate over DCC through a bridged E<strong>the</strong>rnetconnection.To debug an application using a GDBserver connection:1. Power-up your target hardware and debug hardware unit.2. Download and boot <strong>the</strong> target using <strong>the</strong> rviload utility.3. When <strong>the</strong> Linux kernel has finished booting, start <strong>the</strong> gdbserver as follows:~ # gdbserver localhost:portnum filename<strong>ARM</strong> DUI 0498F Copyright © 2010-2012 <strong>ARM</strong>. All rights reserved. 9-17ID021112Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!