Printf debugging
AN4989
68/118
AN4989 Rev 3
7 Printf
debugging
Printf debugging is one of the most straight-forward and used solution in order to start
investigating a non-working system.
This chapter is a getting started guide to quickly setup a printf data path through
semihosting, USART or SWO, benefiting from facilities offered by STMicroelectronics
hardware kits and ecosystem tools.
7.1
STM32 Virtual COM port driver
STM32 Virtual COM Port Driver (VCP) is a feature supported by ST-LINK/V2-B embedded
in most of recent hardware kits (refer to
Section 2.1: Hardware development tools on
). It is a RS232 emulation through ST-LINK USB connection.
On the PC side, this requires driver software package (STSW-STM32102) included in ST-
LINK driver (STSW-0009).
Once the target is connected, it is seen as a serial port on the PC. An example is presented
in
.
Figure 47. Virtual COM port on Windows
®
PC