cancel
Showing results for 
Search instead for 
Did you mean: 

How to redirect std::cout to ITM port 0

Xxoyo.1
Associate III

Hi everyone, I have successfully used the following code to redirect the printf output to SWD, ITM View

/* USER CODE BEGIN 4 */
int __io_putchar(int ch) {
    ITM_SendChar(ch);
    return ch;
}
/* USER CODE END 4 */

Now I am working with C++ and would like to use redirect the outputs

example

   std::cout << "Hello world" <<  std::endl ;

How to achieve this? Thanks!

0 REPLIES 0