STM32 printf() 重定向到串口UART

1,重定义 fputc 函数

2,包含头文件 #include "stdio.h"

3,代码中即可使用 printf() 打印

✳ 如果编译没有报错但是串口工具没有接收到打印,检查下有没有勾选 MicroLIB

原文地址:https://www.cnblogs.com/pmboat/p/15217035.html