use no semihosting was requested,but sys exit was referenced,这个怎么解决呀
#if 1
#pragma import(__use_no_semihosting)
//标准库需要的支持函数
struct __FILE
{
int handle;
/* Whatever you require here. If the only file you are using is */
/* standard output using printf() for debugging, no file handling */
/* is required. */
};
/* FILE is typedef’ d in stdio.h. */
FILE __stdout;
//定义_sys_exit()以避免使用半主机模式
void sys_exit(int x)
{
x = x;
}
//重定义fputc函数
int fputc(int ch, FILE *f)
{
while((USART1->SR&0X40)==0);//循环发送,直到发送完毕
USART1->DR = (u8) ch;
return ch;
}
#endif
//end
//////////////////////////////////////////////////////////////////
*** Using Compiler 'V5.06 update 4 (build 422)', folder: 'D:\Program Files\Keil MDK 5.23\ARM\ARMCC\Bin'
Build target 'Template'
linking...
..\OBJ\123.axf: Error: L6200E: Symbol __stdout multiply defined (by usart.o and retarget.o).
..\OBJ\123.axf: Error: L6200E: Symbol fputc multiply defined (by usart.o and retarget.o).
Not enough information to list image symbols.
Not enough information to list the image map.
Finished: 2 information, 0 warning and 2 error messages.
"..\OBJ\123.axf" - 2 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed: 00:00:01