This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Slow printf on a DK-TM4C123G development board [IAR EW]

Other Parts Discussed in Thread: SEGGER

Hello,

I have a question regarding the printing speed to the stdout of the printf function. I use the semihosted implementation using the TI Stellaris debugger (via ICDI) and SWD interface. I have no problem printing the actual data, yet the speed of printing is very low - I am getting <10 chars peer second. The odd part is, that once I somehow managed to get much better performance (roughly 5x faster rate). Unfortunately it lasted only until I reconnected the USB cable. Obviously, I tried all the USB ports on my device yet was unable to repeat the behavior. 

I'd appreciate any hints or suggestions about what that might have caused this strange behavior as well as any tips for speeding up the printing.

PS: As I was digging about this a lot I know that the performance of semihosting is not great, yet I think <10 chars/s seems very low to me (and I've seen it running much faster).

Thanks for any help regarding this problem. Please ask for any additional info you may require.

Jan

  • Hello Jan

    "Slow print", but where. Do you mean on the display or on the Serial Console? What is the project that you are using: one of the example code or is it your own application code?

    Regards
    Amit
  • As you're under IAR - and SWD - have you fully/properly enabled SWO?

    Segger has an App Note & code details - I believe such effort will increase your output rate...

    [edit] Whoops - dawns that my firm uses J-Link - thus SWO may not be available via (lesser) connection links...

  • Hello Amit,

    Thanks for your reply. I meant the output to the Terminal I/O console in IAR. Sorry for the confusion. As for the project I am using - it is my application code, however the startup code (startup_ewarm.c) is taken from one of the examples provided and altered a bit (basically only putting ISRs into the vector).

    Jan
  • Hello,

    I have not found any instructions on how to configure SWO in the TM4C123G datasheet. Hence I assumed there is no need for it and it will work automatically. Felt a bit odd, yet I couldn't find any procedures or any library functions that would alter the behavior of SWO.

    Jan
  • Jan Prasek said:
    I have not found any instructions on how to configure SWO in the TM4C123G datasheet

    And that was well known - this vendor's (rather limited - sole maker) IDE remains "behind the times" in failing to fully/properly support SWD.  (thus SWO)  All "pro/serious" IDEs have long supported SWD - as well as multiple vendor's MCUs!

    Instead - you were directed to Segger's site (maker of the most popular J-Link JTAG/SWD pod) to find & review their App Note regarding SWO.  (such direction remains "in play.")