1、打开电脑桌面的STM32CubeMX软件。
2、点击“Pinout&Configuration”类目中的“System Core”。
3、点击“SYS”。
4、点击“Debug”。
5、选择“Serial Wire”。
6、具体如下图所示。