Hi:
I'm working on a LPC1768 board with MDK-4.11 and RTX-4.11, I sent some debug messages to Debug(printf) viewer window simply by ITM_SendChar(), it works well before I use RTX. but when I use this function in a RTX task, the execution hang in HardFault_Handler of startup_LPC17xx.s. I can show this with following code snippet from the Keil example RTX_Blinky. Somebody pls help out, Thx a lot.
int main (void) { SystemInit(); /* Initialize the MCU clocks */ LED_init (); /* Initialize the LEDs */ GLCD_Init(); /* Initialize the GLCD */ GLCD_Clear(White); /* Clear the GLCD */ /*! debug test begin */ ITM_SendChar('M'); /* Here,"M" disply in viwer correctlly before RTX init */ /*! debug test end */ os_sys_init(init); /* Initialize RTX and start init */ } __task void phaseA (void) { for (;;) { os_evt_wait_and (0x0001, 0xffff); /* wait for an event flag 0x0001 */ LED_On (LED_A); signal_func (t_phaseB); /* call common signal function */ LED_Off(LED_A); /*! debug test begin */ ITM_SendChar('A'); /* Here,"A" doesn't appear in viewer, program hangup in HardFault_Hander*/ /*! debug test end */ } }
View all questions in Keil forum