Error: L6915E

调试stm32程序出现错误: .\Objects\GPRS_Washer.axf: Error: L6915E: Library reports error:

调试stm32程序出现错误:
.\Objects\GPRS_Washer.axf: Error: L6915E: Library reports error: __use_no_semihosting was requested, but time was referenced
参考
解决办法:
在usart.c文件中

#if 1
#pragma import(__use_no_semihosting)      
//标准库需要的支持函数           
struct __FILE 
{ int handle; 
}; FILE __stdout;       
//定义_sys_exit(int x)  以避免使用半主机模式
_sys_exit(int x) 
{ x = x; 
} 
//重定义fputc函数
int fputc(int ch, FILE *f)
{      while((USART2->SR&0X40)==0);//循环发送,直到发送完毕USART2->DR = (u8) ch;      return ch;
}
#endif 

1、可以注释掉//#pragma import(__use_no_semihosting)
2、在代码

_sys_exit(int x) 
{ x = x; 
} 

后添加

_ttywrch(int ch)
{
ch = ch;
}

解决我出现错误的方法是1