Reply by Grant Edwards March 15, 20122012-03-15
On 2012-03-15, David Brown <david@westcontrol.removethisbit.com> wrote:
> On 14/03/2012 15:24, Grant Edwards wrote: >> On 2012-03-14, FreeRTOS info<noemail@given.com> wrote: >> >>> It is very rare, unless you work for a tools company, that you would >>> ever actually see the GDB interface, as it will be (effectively) >>> abstracted away by a higher level interface. >> >> By "see the GDB interface" do you mean look at remote protocol >> packets? Or are you saying nobody uses the GDB command line? >> >> If you mean almost nobody messes with the remote protocol packets >> directly, that's probably true. But, I think there are still plenty >> of people that use the gdb command mode. >> > > I like the gdb command line, and use it for several processors. Like > all command lines, it takes a bit longer to learn to use than a nice > gui, but for some uses it is much faster. In particular, it is good for > writing macros for repetitive tasks, or for when you need relatively > little interaction.
I too use gdb macros extensively. I can't believe that would willing people sit there and click dozens of buttons and menus and whatnot over and over again instead of typing a single command. I guess that's what happens to you if you were raised on "Windows" -- you just don't know there's a better way. I've written entire board test and programming systems using a small shell script and a handful of gdb macros. I hate to imagine somebody sitting there at a bench doing all that clicking in a GUI. -- Grant Edwards grant.b.edwards Yow! I feel like a wet at parking meter on Darvon! gmail.com
Reply by Grant Edwards March 15, 20122012-03-15
On 2012-03-15, Przemek Klosowski <przemek@tux.dot.org> wrote:
> On Wed, 14 Mar 2012 14:03:32 +0000, Grant Edwards wrote: > >> On 2012-03-14, Tim Wescott <tim@seemywebsite.please> wrote: > >>> There is trace support on every ARM chip made, through the JTAG >>> debugger port. >> >> Not true. In the past, trace support was pretty rare on low-end parts. >> Very few ARM7 parts had trace support -- they only had JTAG. >> Even on the earlier ARM9 parts, many didn't have trace support. > > Am I mistaken in believing that the D in TDMI implies trace support?
The D stands for "Debug extensions", I'm not sure exactly what that implies, but plenty of TDMI parts didn't have trace support. -- Grant Edwards grant.b.edwards Yow! I'm not an Iranian!! at I voted for Dianne gmail.com Feinstein!!
Reply by Rich Webb March 15, 20122012-03-15
On Thu, 15 Mar 2012 12:04:46 +0100, "Boudewijn Dijkstra"
<sp4mtr4p.boudewijn@indes.com> wrote:

>Op Thu, 15 Mar 2012 05:03:04 +0100 schreef Przemek Klosowski ><przemek@tux.dot.org>: >> On Wed, 14 Mar 2012 14:03:32 +0000, Grant Edwards wrote: >> >>> On 2012-03-14, Tim Wescott <tim@seemywebsite.please> wrote: >> >>>> There is trace support on every ARM chip made, through the JTAG >>>> debugger port. >>> >>> Not true. In the past, trace support was pretty rare on low-end parts. >>> Very few ARM7 parts had trace support -- they only had JTAG. >>> Even on the earlier ARM9 parts, many didn't have trace support. >> >> Am I mistaken in believing that the D in TDMI implies trace support? > >Yes. Most commercially available ARMv4T ARM7 MCU's were and are >ARM7TDMI-S where TDMI = Thumb+Debug+Multiplier+ICE. > >Apparently 'D' means it has a JTAG TAP-controller with debug extensions >(halt command, etc.) > >Apparently 'I' means the ICEBreaker or EmbeddedICE macrocell which >implements watchpoints and a communications channel.
And the -S suffix indicates that the core IP is Synthesizable (customizable by the mfgr) vice delivered as a netlist "black box." -- Rich Webb Norfolk, VA
Reply by Boudewijn Dijkstra March 15, 20122012-03-15
Op Thu, 15 Mar 2012 05:03:04 +0100 schreef Przemek Klosowski  
<przemek@tux.dot.org>:
> On Wed, 14 Mar 2012 14:03:32 +0000, Grant Edwards wrote: > >> On 2012-03-14, Tim Wescott <tim@seemywebsite.please> wrote: > >>> There is trace support on every ARM chip made, through the JTAG >>> debugger port. >> >> Not true. In the past, trace support was pretty rare on low-end parts. >> Very few ARM7 parts had trace support -- they only had JTAG. >> Even on the earlier ARM9 parts, many didn't have trace support. > > Am I mistaken in believing that the D in TDMI implies trace support?
Yes. Most commercially available ARMv4T ARM7 MCU's were and are ARM7TDMI-S where TDMI = Thumb+Debug+Multiplier+ICE. Apparently 'D' means it has a JTAG TAP-controller with debug extensions (halt command, etc.) Apparently 'I' means the ICEBreaker or EmbeddedICE macrocell which implements watchpoints and a communications channel. In ARM7/9, tracing is typically implemented by an ETM (embedded trace marcocell). -- Gemaakt met Opera's revolutionaire e-mailprogramma: http://www.opera.com/mail/ (Remove the obvious prefix to reply privately.)
Reply by David Brown March 15, 20122012-03-15
On 14/03/2012 15:24, Grant Edwards wrote:
> On 2012-03-14, FreeRTOS info<noemail@given.com> wrote: > >> It is very rare, unless you work for a tools company, that you would >> ever actually see the GDB interface, as it will be (effectively) >> abstracted away by a higher level interface. > > By "see the GDB interface" do you mean look at remote protocol > packets? Or are you saying nobody uses the GDB command line? > > If you mean almost nobody messes with the remote protocol packets > directly, that's probably true. But, I think there are still plenty > of people that use the gdb command mode. >
I like the gdb command line, and use it for several processors. Like all command lines, it takes a bit longer to learn to use than a nice gui, but for some uses it is much faster. In particular, it is good for writing macros for repetitive tasks, or for when you need relatively little interaction. I often have a "make run" makefile target that uses command-line gdb to set up the microcontroller/processor, download the code, and start it running. Another trick I've used a lot is to have some volatile variables declared in the program. A gdb script downloads the code, then puts in some breakpoints at specific places. The target code runs and stops at the breakpoint, then the debugger script changes the volatiles and re-starts the code. With some synchronisation between the gdb scripts and the code, and a little imagination, you can make automated test procedures, flash programmers, etc.
Reply by Przemek Klosowski March 15, 20122012-03-15
On Wed, 14 Mar 2012 14:03:32 +0000, Grant Edwards wrote:

> On 2012-03-14, Tim Wescott <tim@seemywebsite.please> wrote:
>> There is trace support on every ARM chip made, through the JTAG >> debugger port. > > Not true. In the past, trace support was pretty rare on low-end parts. > Very few ARM7 parts had trace support -- they only had JTAG. > Even on the earlier ARM9 parts, many didn't have trace support.
Am I mistaken in believing that the D in TDMI implies trace support?
Reply by Tim Wescott March 14, 20122012-03-14
On Wed, 14 Mar 2012 14:03:32 +0000, Grant Edwards wrote:

> On 2012-03-14, Tim Wescott <tim@seemywebsite.please> wrote: >> On Tue, 13 Mar 2012 20:42:32 -0500, premjithav wrote: >> >>> i'm a newbie in Embedded world. >>> >>> I need some clarification about the arm gdb debugging. >>> >>> 1. Is there any options to debug the board through serial port ? how? >> >> In theory, yes, if you wanted to write a debug monitor for the board >> that would talk to GDB. >> >>> 2. All search results about the arm debugging are related with some >>> kind of external hardware and JTAG why? >> >> Because it's cheap and easy. >> >>> 3. I found results about gdb stubs for some non arm architecture. is >>> there any stub for arm without a external hardware or JTAG unit. >> >> I don't know. Maybe, but you'd have to make that debug stub. >> >>> 4. How we can debug an arm board with cost effective method. >> >> JTAG. If you don't want to buy an Olimex debugger, buy a FTDI chip and >> whip one up yourself. >> >>> 5.If there is no trace port support in the board , how we can debug? >>> is there any other options , thru serial port or ethernet. >> >> There is trace support on every ARM chip made, through the JTAG >> debugger port. > > Not true. In the past, trace support was pretty rare on low-end parts. > Very few ARM7 parts had trace support -- they only had JTAG. Even on the > earlier ARM9 parts, many didn't have trace support. > > Trace support is becoming much more common, and most recent ARM9 and > Cortex parts have both JTAG and trace ports.
OK, I guess I was oversimplifying. Mostly I was trying to impress on the OP that JTAG debugging _is_ the reasonable way to go, assuming that you have a part that has JTAG debugging built in. Certainly if it's a Cortex M3 part, it's a no- brainer. -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com
Reply by Grant Edwards March 14, 20122012-03-14
On 2012-03-14, FreeRTOS info <noemail@given.com> wrote:

> It is very rare, unless you work for a tools company, that you would > ever actually see the GDB interface, as it will be (effectively) > abstracted away by a higher level interface.
By "see the GDB interface" do you mean look at remote protocol packets? Or are you saying nobody uses the GDB command line? If you mean almost nobody messes with the remote protocol packets directly, that's probably true. But, I think there are still plenty of people that use the gdb command mode. -- Grant Edwards grant.b.edwards Yow! I demand IMPUNITY! at gmail.com
Reply by Grant Edwards March 14, 20122012-03-14
On 2012-03-14, Tim Wescott <tim@seemywebsite.please> wrote:
> On Tue, 13 Mar 2012 20:42:32 -0500, premjithav wrote: > >> i'm a newbie in Embedded world. >> >> I need some clarification about the arm gdb debugging. >> >> 1. Is there any options to debug the board through serial port ? how? > > In theory, yes, if you wanted to write a debug monitor for the board that > would talk to GDB. > >> 2. All search results about the arm debugging are related with some >> kind of external hardware and JTAG why? > > Because it's cheap and easy. > >> 3. I found results about gdb stubs for some non arm architecture. is >> there any stub for arm without a external hardware or JTAG unit. > > I don't know. Maybe, but you'd have to make that debug stub. > >> 4. How we can debug an arm board with cost effective method. > > JTAG. If you don't want to buy an Olimex debugger, buy a FTDI chip and > whip one up yourself. > >> 5.If there is no trace port support in the board , how we can debug? >> is there any other options , thru serial port or ethernet. > > There is trace support on every ARM chip made, through the JTAG > debugger port.
Not true. In the past, trace support was pretty rare on low-end parts. Very few ARM7 parts had trace support -- they only had JTAG. Even on the earlier ARM9 parts, many didn't have trace support. Trace support is becoming much more common, and most recent ARM9 and Cortex parts have both JTAG and trace ports. -- Grant Edwards grant.b.edwards Yow! OVER the underpass! at UNDER the overpass! gmail.com Around the FUTURE and BEYOND REPAIR!!
Reply by Grant Edwards March 14, 20122012-03-14
On 2012-03-14, premjithav <premjithav@n_o_s_p_a_m.gmail.com> wrote:
> i'm a newbie in Embedded world. > > I need some clarification about the arm gdb debugging. > > 1. Is there any options to debug the board through serial port?
Yes.
> how?
Install a gdb stub on your board.
> 2. All search results about the arm debugging are related with some kind of > external hardware and JTAG why?
* Almost all ARM parts have JTAG interfaces. * JTAG interfaces are dirt cheap ($20 and up). * JTAG doesn't require any software be installed on the board (nor any working memory for that matter), and can be used to not only debug software but also to troubleshoot and bring up new boards.
> 3. I found results about gdb stubs for some non arm architecture. is > there any stub for arm without a external hardware or JTAG unit.
Yes.
> 4. How we can debug an arm board with cost effective method.
JTAG.
> 5.If there is no trace port support in the board , how we can debug? is > there any other options , thru serial port or ethernet.
Trace and debug are two different things. You can debug via JTAG even without a trace port. -- Grant Edwards grant.b.edwards Yow! Was my SOY LOAF left at out in th'RAIN? It tastes gmail.com REAL GOOD!!