STM32 IAR does not output ITM trace unless printf is included in the code

I have a small project where I added my own debugging functionality so that I have additional functionality. They work great and use the following method to send data:

while(*bp)
  ITM_SendChar(*bp++);

      

I finally got to switching all printf statements to use my own function and all the output just stopped. Play around a bit and I realized that so far I have one printf function, no matter where ITM_SendChar works right out of the gate.

It would seem there is some functionality compiled in the case where printf is used in a project that allows ITM_SendChar to work.

It's not a huge deal, but I'm pretty curious as to why it is. Maybe there is another way to initialize an ITM (Macrocell Inspection System) system without having to insert a dummy printf file?

+3


source to share





All Articles