This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

JTAG Communication Console

I'm wanting to communicate with an LPC2103 using a kind of command line interface, but there is no serial port on this board. I believe there is a way to use the JTAG port to send messages back to the PC connected to it. If I understand correctly, SWI Semihosting is enabled by default and several library functions should automatically go to the PC. In fact in the manual I found the following:

It is not necessary to write any new functions or include files if you are using the default semihosting functionality of the library.
--http://www.keil.com/support/man/docs/armlib/armlib_cihibfib.htm

However that is in the User Manual for the Realview Library. I'm using Keil's evaluation tools so I think that includes and uses Realview Library automatically. But I'm not positive.

So I wrote a very, very simple program to test it:

    void _ttywrch(int);
    int main(void) {
        _ttywrch('X');
        while(1);
    }

I assume I have to run it in debug mode to use the JTAG for communication. But when I do it doesn't even run to main. It hangs on the following piece of code in Startup.s:

SWI_Handler     B       SWI_Handler

I assume it needs a SWI_Handler defined somewhere, but I have no idea what to do about it. Is there another file I need to include? So far I just have the Startup.s file that uVision3 put in there when I created the project and the five-line main.c that I copied and pasted above.

Is there something else I need to do to enable semihosting or JTAG communication? And even if the function did work how would I see the output? Is there someway to open a window in uVision3 just like the serial port windows or is it more difficult than that? I've seen mention of a program called RealMonitor, but I can't find any information about it on the products pages. Is this a task that I need RealMonitor for? And is it included in the evaluation version of Keil Tools or something separate?

Thanks.

0