Home › ELEKTOR FORUMS › My circuit works! › ARMee Board - Using JTAG for debugging

ELEKTOR FORUMS

Please log in to post a reply or subscribe / unsubscribe to topics

Topic: ARMee Board - Using JTAG for debugging

Author Post

dadshead

1 post

Popping In
Popping In

Read post 21-06-2005 13:28

On the ARMee board K1 is connected to the primary JTAG pins of the Philips ARM. In order to use the JTAG interface on the ARMee board a few changes are needed. Here are the changes and information on some specific issues you may have when using JTAG on the ARMee board.

1. DBG Signal.
This signal is on pin 6 of K7. It is tied low by R20. In order to
enable the primary JTAG pins of the Philips ARM chip, DBG must be
high. So you need to fit a switch or jumper between the DBG pin and
3.3V.

2. nTRST Signal.
This signal is on pin 3 of K1. Philips have been a bit confusing
about this signal. In their data sheet it is called TRST or nTRST
in different places. The JTAG standard name is nTRST because it is
active low. ARM specifies this signal as driven by an open
collector output. So it requires a pullup resistor. Philips say
there is a weak pullup in the device but this is not generally
sufficient in an electrically noisy environment. Therefore it is
recommended you fit a 4k7 resistor between pins 1 and 3 of K1.

3. RTCK Signal.
This signal is on pin 11 of K1. Philips say that RTCK must be high
at reset to enable debug. However this pin is normally an output
so this can only be done with a pullup resistor. Whether you need
this resistor depends on the ICE you use. Some ICEs do not use
RTCK. Others have an internal pullup. If you have problems
debugging, this may be something to look at. ICEs that do not
support RTCK may have problems interfacing to the ARM7TDMI-S at low
clock speeds. The function of RTCK is to stop the ICE sending data
to the ARM faster than the ARM can read it (it is a handshake
signal). At low CPU clock speeds the JTAG clock rate must be slowed
down. ICEs that do not support RTCK may be used as long as their
JTAG clock speed is set slower than one sixth of the CPU clock speed.

4. ICE Power.
Some ICEs use pin 2 of K1 for their power (pin 2 is specified for
that purpose). On ARMee the 3.3V supply is provided by the
regulator on the back of the processor board. It doesn't have a
heatsink so care must be take to ensure the regulator doesn't
overheat. The simplest thing to do is plug in your ICE and feel
how hot the board gets - when it is too hot to touch, you know that
ICE is unsuitable for use with the ARMee board.

5. Stepping through code in Flash.
The ARM7TDMI-S core has 2 hardware breakpoint units so debug
software can set two breakpoints in code at any one time. Typically
more than 2 are required so one of the breakpoint units is set up to
catch a specific data value rather than a particular address and
this special data value is used to replace the breakpointed
instructions. When the ARM fetches the instruction, the breakpoint
unit recognises it and halts the core. These are called soft
breakpoints and there is no limit to the amount that can be used.
However to use this technique in Flash, the debugger has to know how
to write the Flash. Typically it cannot. The result of this is you
can only place 2 breakpoints in Flash (because there are 2 hardware
breakpoint units). By default most debuggers place breakpoints on
a number of exception vectors to catch things like data aborts.
Therefore you need to remove these 'vector catches' before there are
any breakpoints left for your code. How you do this depends on
which debugger you are using. Also stepping through code uses
breakpoints - the technique the debugger uses is to read the
instruction to be executed, decode it and work out the next PC
value, then place a breakpoint on that place. In short, if you want
to step through your code to debug it, then either load it into RAM
or load it into Flash and disable the debugger's vector catch
breakpoints.

Hope this helps everyone out there.

Dave.

maydehayes

1 post

Popping In
Popping In

Read post 14-03-2006 22:40

Hi can you tell me where i can purchase the jtag for the arm board?
Noelle

gazza2

1 post

Popping In
Popping In

Read post 14-01-2008 22:44

Check out olimex.com for ideas. I have one of their ARM-USB-OCD usb devices. Cheap and works well with Eclipse and OpenOCD.

The other thing you can look for is a MacGregor Wiggler which is a really cheap parallel port based device but works although you can easily make one yourself .

Make sure you get one with a standard 20 pin ARM7/9 connector.

Gazza2

Please log in to post a reply or subscribe / unsubscribe to topics

Spotlight

Design your own Embedded Linux Control Centre on a PC

These days a lot of options exist if you want to control home electrical appliances. This book covers a do-it-your-self system made from recycled components.