compiling usart.c...
..\SYSTEM\usart\usart.c(41): error: #260-D: explicit type is missing ("int" assumed)
..\SYSTEM\usart\usart.c: 0 warnings, 1 error
分析:
#if 1
#pragma import(__use_no_semihosting)
Struct __FILE
{
int handle;
};
FILE __stdout;
{
x = x;
}
int fputc(int ch, FILE *f)
{
while((USART1->SR&0X40)==0);
USART1->DR = (u8) ch;
return ch;
}
#endif
解决办法:应该写成void