From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27628 invoked by alias); 17 Jan 2012 12:02:35 -0000 Received: (qmail 27619 invoked by uid 22791); 17 Jan 2012 12:02:34 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,T_FILL_THIS_FORM_SHORT X-Spam-Check-By: sourceware.org Received: from smarthost.idnet.net (HELO smarthost.idnet.net) (212.69.40.140) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 17 Jan 2012 12:01:46 +0000 Received: from localhost (unknown [127.0.0.1]) by smarthost.idnet.net (Postfix) with ESMTP id 24D71236F76 for ; Tue, 17 Jan 2012 11:51:43 +0000 (UTC) Received: from smarthost.idnet.net ([127.0.0.1]) by localhost (smarthost.idnet.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id kXseVi55X9S3 for ; Tue, 17 Jan 2012 11:51:41 +0000 (GMT) Received: from smarthost.idnet.net (localhost.localdomain [127.0.0.1]) by smarthost.idnet.net (Postfix) with ESMTP id D10ED236F78 for ; Tue, 17 Jan 2012 11:51:41 +0000 (GMT) Received: from mail.idnet.net.uk (mail.idnet.net.uk [212.69.36.63]) by smarthost.idnet.net (Postfix) with ESMTP id CA18D236F7A for ; Tue, 17 Jan 2012 11:51:41 +0000 (GMT) Received: from [91.135.5.64] by mail.idnet.net.uk (GMS 15.02.3689/NU3963.00.7ca42f0c) with ESMTP via TLS id nwdfyvca for gdb@sourceware.org; Tue, 17 Jan 2012 12:01:44 +0000 Subject: Re: GDB on development board! From: Jeremy Bennett Reply-To: jeremy.bennett@embecosm.com To: Sergio Durigan Junior Cc: mak visp , gdb@sourceware.org Date: Tue, 17 Jan 2012 12:02:00 -0000 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Message-ID: <1326801702.13799.156.camel@laria> Mime-Version: 1.0 X-AuthenticatedSender: jeremy.bennett.embecosm.com@idnet.net.uk X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-01/txt/msg00057.txt.bz2 On Mon, 2012-01-16 at 20:19 -0200, Sergio Durigan Junior wrote: > On Monday, January 16 2012, mak visp wrote: > > > I am new to the GDB stuff. I am using my ARM based custom board in > > that I wanted to debug my code on ARM. Can I do it without JTAG only > > with GDB connected over serial port? Also is it possible to do it > > without any OS running on board (I am in starting phase, so no OS > > yet)? I read the user manual, but could not make out. Any pointer to > > the material is a great help. > > > Hello, > > For other ways of using GDB remotely (without JTAG), have you considered > gdbserver yet? Take a look at: > > http://sourceware.org/gdb/current/onlinedocs/gdb/Remote-Debugging.html#Remote-Debugging > > and > > http://sourceware.org/gdb/current/onlinedocs/gdb/Server.html#Server > > As for the question regarding running GDB on a system without OS, others > can correct me if I'm wrong but I don't think it's possible because GDB > uses many OS-specific features (such as ptrace, and glibc functions). Hi Sergio, Mak, You can run GDB from a host workstation into a remote native board over JTAG using the GDB Remote Serial Protocol (RSP). You will need to write a RSP server that drives the JTAG interface of your target board. For a standard ARM board you will likely find a RSP server already exists. It will be hardware specific. This approach is used for many targets. If you find you have to write your own RSP server, an example that you might find useful is the OpenRISC 1000. Its remote serial protocol server can be downloaded from the OpenCores website (www.opencores.org) and is an example of a program that drives JTAG through a FTDI 2232C USB interface. There are a number of Embecosm application notes that help explain this. In particular "EAN4: Howto: GDB Remote Serial Protocol: Writing a RSP Server" (http://www.embecosm.co.uk/download/ean4.html) and "EAN7: Integrating the GNU Debugger with Cycle Accurate Models" (http://www.embecosm.co.uk/download/ean7.html) may prove instructive. HTH, Jeremy -- Tel: +44 (1590) 610184 Cell: +44 (7970) 676050 SkypeID: jeremybennett Email: jeremy.bennett@embecosm.com Web: www.embecosm.com