出现错误是:
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'D:\keil525\ARM\ARMCC\Bin'
Build target 'rt-thread'
compiling syscalls.c...
linking...
.\build\keil\Obj\rt-thread.axf: Error: L6218E: Undefined symbol fsync (referred from syscalls.o).
Not enough information to list image symbols.
Not enough information to list load addresses in the image map.
Finished: 2 information, 0 warning and 1 error messages.
".\build\keil\Obj\rt-thread.axf" - 1 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed: 00:00:01
原始代码:
int _sys_ensure(FILEHANDLE fh)
{
return fsync(fh);
}
修改成如下即可:
int _sys_ensure(FILEHANDLE fh)
{
#ifdef DFS_USING_POSIX
return fsync(fh);
#else
LOG_W("%s: %s", __func__, _WARNING_WITHOUT_FS);
return 0; /* error */
#endif /* DFS_USING_POSIX */
}
标签:information,return,Undefined,fsync,symbol,bsp,syscalls,Error,fh
From: https://www.cnblogs.com/chino-ll/p/16600805.html