Forums

JTAG

Started by Sridhar gadda April 28, 2005
Hello,

does any one read register values trough JTAG. In Blinky example (keil) UART has been used to display result of value stored in register on hyper terminal. Is it possible in same way using JTAG ??. Any example help would be greatly appreciated. I am using ULINK.

thanks,

Sridhar
__________________________________________________




An Engineer's Guide to the LPC2100 Series

The Keil can use the DCC (Debug Communications Channel) to show debug
messages in a terminal window during debugging. I wrote the following
functions to handle the DCC comminication:

static inline int DCC_TxEmpty(void)
{
int DccControl;
asm volatile("mrc\t" "14, 0, %0, c0, c0": "=r" (DccControl));
return (DccControl & 2) == 0;
}

static inline void DCC_TxData(int Data)
{
while (! DCC_TxEmpty()) { }
asm volatile("mcr\t" "14, 0, %0, c1, c0": : "r" (Data));
}

void DCC_SendString(const char *Buffer)
{
register const unsigned char *P;
P = (const unsigned char *) Buffer;

if (Buffer)
{
while (*Buffer)
{
DCC_TxData(*P);
++P;
}
}
}

static inline int DCC_RxAvail(void)
{
UINT DccControl;
asm volatile("mrc\t" "14, 0, %0, c0, c0": "=r" (DccControl));
return (DccControl & 1) != 0;
}

static inline int DCC_RxData(void)
{
int Data;
while (! DCC_RxAvail()) { }
asm volatile("mrc\t" "14, 0, %0, c1, c0": "=r" (Data));
return Data;
}
Sridhar gadda wrote:

> Hello,
>
> does any one read register values trough JTAG. In Blinky
> example (keil) UART has been used to display result of value stored in
> register on hyper terminal. Is it possible in same way using JTAG ??.
> Any example help would be greatly appreciated. I am using ULINK.
>
> thanks,
>
> Sridhar >
> __________________________________________________
> > *>.




Hi,

There is an example that does this in \ARM\Boards\Keil\MCB2100\DebugIO\
of your Keil ARM Tools installation.

Matthias

> Hello,
>
> does any one read register values trough JTAG. In Blinky
> example (keil) UART has been used to display result of value stored in
> register on hyper terminal. Is it possible in same way using JTAG ??.
> Any example help would be greatly appreciated. I am using ULINK.
>
> thanks,
>
> Sridhar >
> __________________________________________________
> > *>.