AnsweredAssumed Answered

How can I get printf output and vprintf output to go the same place during debugging?

Question asked by Stephen Munnings on Nov 26, 2013
Latest reply on Dec 20, 2013 by David E Seymour

Environment:

  Tower kit using twrk60d100m processor board

  Using MQX 4.0.2 and CW 10.5.

  Using J-Link or on-board (USB) JTAG

 

Problem:

   The application has printf statements and also vprintf statements in it.

   printf output shows up on the debug console

   vprintf output disappears

 

My research results so far:

  printf ends up using a routine that writes to the console (and uses SEMIHOSTING SWI) to send characters - these appear on the debug console under CW debug

  vprintf tries to use the kernel table->active task->stdout file pointer (which is NULL) and because of a test for NULL, throws away all the output.

 

My question:

  How can I get the vprintf output to show up on the debug console?

  Failing that, how can I get the printf and vprintf output to show up in the same place?

Outcomes