基于STM32的多种printf用法,你都知道吗?

https://www.sohu.com/a/322868919_505803

https://blog.csdn.net/ybhuangfugui/article/details/94378276

 

在IAR中使用 printf() 在IO terminal中打印的方案:

1、使用JTAG模式。使能半主机,不要重写fput()

 

 

2、使用SWD模式(SWO(TDO/TRACESWO)线需要连接),使用SWO,重写fput()

int fputc(int ch, FILE *f)
{
return (ITM_SendChar(ch));
}

 

 

posted on 2021-01-25 10:57  lh03061238  阅读(432)  评论(0编辑  收藏  举报

导航