標(biāo)題: IAR STM8串口printf輸出 [打印本頁]

作者: 51黑黑黑    時(shí)間: 2016-2-12 19:16
標(biāo)題: IAR STM8串口printf輸出
IAR用printf輸出與keil設(shè)置不太一樣,首先當(dāng)然先要包含頭文件"stdio.h",然后改寫putchar函數(shù)int putchar(int c)  
{  
  while((UART2_SR&0x80)==0x00);
  UART2_sendchar((u8)c);
  return (c);  
}



在Options中將LibraryConfiguration改成Full


在Library Options中將Printfformatter改成Large即可。









歡迎光臨 (http://www.torrancerestoration.com/bbs/) Powered by Discuz! X3.1