AnsweredAssumed Answered

printf over JTAG is painfully slow (BF548 using HPUSB-ICE)

Question asked by ecg on Sep 30, 2011
Latest reply on Nov 1, 2011 by ecg

When calling printf in an application to send output to VisualDSP++, it takes many seconds to print a single line of output (several hundred milliseconds per character).  We don't believe that this is a hardware limitation, because this slowness did not always occur.  I understand the context switches required when using the primio device, and don't expect printf to perform quickly... I just expect it perform "reasonably", as it used to.


The problem we're having may be similar to what is described here:, but it seems much worse.


The problem occurs when on multiple machines using VDSP 5.0 Update 9.  It is possible that the slowdown is correlated to Update 9, but I haven't yet tried downgrading to see if it gets better.  We typically run the HPUSB-ICE at either 10 or 50MHz, and increasing the JTAG speed does not result in an increase in the speed of the printf message.  I haven't identified a code change associated with the decreased printf speed, but that doesn't mean that some seemingly-unrelated part of the code didn't affect this.


The following line generates the output.  Interrupts are disabled when this function is called.


printf("ERROR_system %x %d %x %x %x %x (%x, %x) %s\n",

     (source << 24) | type, line, stackTrace[0],


     param1, param2, msg);


I've attached a video of the VisualDSP output window that illustrates this problem.  For this example, JTAG is running at 50MHz.


Any ideas?