首页 > 代码库 > at91编译错误之semihosting

at91编译错误之semihosting

MDK编译at91sam9261-ek的basic-fatfs-project,出现错误:

.\at91sam9261-sdram\at91sam9261-sdram.axf: Error: L6915E: Library reports error: __use_no_semihosting_swi was requested, but _sys_open was referenced

解决办法:

在retarget.c文件中,做如下定义:

struct __FILE { int handle;} ;FILE __stdout;FILE __stdin;FILE __stderr;

重新编译即可。

at91编译错误之semihosting