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.
Hi guys,
First of all, I'm using a LPC1768 development board in combination with a JLink Debugger which supports ITM-Debugging over printf. I'm using Keil MDK 4.10.
Using a direct call of ITM_SendChar() works. The character is displayed in KEIL IDE.
For using this putchar function I have to implement fputc()
int fputc(int ch, FILE *f) { return (ITM_SendChar(ch)); }
If i call printf() my prgram doesn't work. The debugger tells me that is stops at <pre 0x00000E48 BEAB BKPT 0xAB0
Can you help me that printf() works?
Thanks in advance! Best regards from Austria Robert
Thanks for help. I forgot to define stdout. stdin-debugging isn't possible over ITM. Is that right. So i don't need the declaration of stdin and implementation fgetc.
What do _ttywrch() and _sys_exit() do? I used ITM a year before and I rememeber that I don used them. I didn't use ferror() too.
regards Robert
You should retarget most of those functions to avoid semihosting.
_ttywrch(): http://www.keil.com/support/man/docs/armlib/armlib_cihefgih.htm _sys_exit(): http://www.keil.com/support/man/docs/armlib/armlib_cihcecgg.htm