mdk5.14改C99模式后串口重定向问题:\usart\usart.c(54): error: #260-D: explicit type is missing (“int“ assumed)

对应代码段:在函数前加void

//定义_sys_exit()以避免使用半主机模式    
_sys_exit(int x) 
{ 
	x = x; 
} 

如果遇到错误:..\OBJ\PCA9685.axf: Error: L6915E: Library reports error: __use_no_semihosting was requested, but _ttywrch was referenced

需要在

void _sys_exit(int x) 

    x = x; 

后加一个函数

//__use_no_semihosting was requested, but _ttywrch was 
void _ttywrch(int ch)
{
ch = ch;
}

部分参考于:(10条消息) MDK—— Error: L6915E: Library reports error: __use_no_semihosting was requested_誓约胜利之舰的博客-CSDN博客

你可能感兴趣的:(c语言,开发语言)