问题
I have configured a Freescale Kinetis MQX BSP to use the "iodebug:" semihosting device with an IAR IDE and J-Link debugger. The configuration "works" in that text appears in the IDE console window. The output is jerky and slow - Maybe 5 seconds to output a 16x64 block of text. During output operations the CPU appears to be stalled for long periods of time, ie. operations with strict timing requirements go off into the weeds.
Is this typical performance for semihosting, or am I missing something?
回答1:
1) Options -> General Options -> Library Options -> enable Buffered terminal output. With out this the Host is forced to rad one byte at a time.
2) Options -> General Options -> Library Configurations enable Semihosted.
回答2:
Semihosting uses a debug trap (SVC/BKPT with magic numbers) to communicate with the debugger. I don't know how IAR implemented it, but if it uses one trap per character then the numbers you quote are not surprising, especially considering the latency of the USB protocol.
来源:https://stackoverflow.com/questions/10503680/use-of-arm-semihosting