The pin can be connected to the debug probe with the standard debug connector and used with the SWD interface (not JTAG). SWO is a single pin interface designed by ARM for Cortex-M3,M4, and M7 devices. Additionally the semihosting implementation is debugger dependent, and applications which use semihosting might not run without a debugger connected.Īnd then there are ARM’s SWO trace port and SEGGER’s Real Time Transfer (RTT). Therefore semihosting can simply not be used for applications which require real time behaviour, such as communication stacks. The debugger needs to realize that the target has stopped execution, reads registers and memory, writes memory, and can then restart the CPU. This means the target CPU does not run for this period of time. Printing one message can take anywhere from several milliseconds to more than one hundred milliseconds, as it is an expensive operation. With semihosting, the CPU halts to print output and is restarted “behind the scenes” by the debugger. The first software solution is semihosting. But a UART may already be used by the application and CDC requires a USB stack and a USB connector on the target hardware. Since the early days of embedded systems, there have been hardware dependent solutions like using a UART or USB CDC. There are different methods to get debug output from the target application. This inspired me to write a more general post on debug output (“printf”) implementations on embedded target, including SWO and RTT. Erich Styger recently posted a great tutorial on how to add console functionality using Single Wire Output (SWO) on ARM Cortex-M targets.
0 Comments
Leave a Reply. |