AnsweredAssumed Answered

Keil uvision 4, ulink2, k61, printf to debug(printf) viewer is garbage

Question asked by Dawei Yang on Jun 25, 2014
Latest reply on Jul 4, 2014 by Radek Sestak

I am working on Keil uvision 4, ulink2, k61, cpu clock is 120 MHZ, MQX 4.0.2.

 

I want to use printf() and display the information on debug(printf) viwer. So I enable the io debug function in MQX.

#define BSPCFG_ENABLE_IODEBUG 1

#define BSP_DEFAULT_IO_CHANNEL "iodebug"

 

I also followed the instructions in "Getting Started with Freescale MQX™ RTOS and MDK-ARM Keil™ μVision® 4 Rev. 02 " to enable the ITM communication channel.

 

Now I have two questions.

 

First, when function _io_debug_itm_write_char() sends a character to ITM, nothing displayed on debug(printf) viewer window. Is there any configuration needs to be done?

 

Second, the debug(printf) viewer window keeps display garbage data. The data is not coming from printf(), because I set break point in printf(), but it is not stopped. The picture is attached. Anybody has any idea about it?

printf.jpg

 

Thanks in advance.

Outcomes