We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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.
Rather then using semihosting (which is more complicated) you should consider using Real-Time Agent.
Check the following links: http://www.keil.com/support/docs/3297.htm www.keil.com/.../ulink2_realtime_agent.htm
It has also other features beside Terminal Emulation.
There are also quite some examples in the MDK installation in the folder "Keil\ARM\RT Agent".
Wow, I that's exactly what I needed. That's the most help I've ever gotten in three sentences. I spent hours trying to find some kind of resource to explain semihosting or ICE, but it took less than five minutes to get that working. Thank you.