移植yaffs2到单片机操作系统,发现有以下问题
Build target 'Target 1'
compiling yaffs_nand.c.....\..\..\Src\XFramework\yaffs2\yportenv.h(204): warning: #47-D: incompatible redefinition of macro "YBUG" (declared at line 33 of "..\..\..\Src\XFramework\yaffs2\ydirectenv.h")
..\..\..\Src\XFramework\yaffs2\yaffs_nand.c(109): warning: #167-D: argument of type "unsigned int *" is incompatible with parameter of type "int *"
..\..\..\Src\XFramework\yaffs2\yaffs_nand.c(113): warning: #167-D: argument of type "unsigned int *" is incompatible with parameter of type "int *"
linking...
.\obj\HXET2300.axf: Error: L6200E: Symbol yaffs_GetBlockInfo multiply defined (by yaffs_guts.o and yaffs_checkptrw.o).
.\obj\HXET2300.axf: Error: L6200E: Symbol yaffs_GetBlockInfo multiply defined (by yaffs_nand.o and yaffs_checkptrw.o).
.\obj\HXET2300.axf: Error: L6200E: Symbol yaffs_GetBlockInfo multiply defined (by yaffs_tagscompat.o and yaffs_checkptrw.o).
.\obj\HXET2300.axf: Error: L6200E: Symbol yaffs_GetBlockInfo multiply defined (by yaffs_tagsvalidity.o and yaffs_checkptrw.o).
.\obj\HXET2300.axf: Error: L6200E: Symbol yaffs_GetBlockInfo multiply defined (by yaffscfg2k.o and yaffs_checkptrw.o).
.\obj\HXET2300.axf: Error: L6200E: Symbol yaffs_GetBlockInfo multiply defined (by yaffsfs.o and yaffs_checkptrw.o).
".\obj\HXET2300.axf" - 6 Errors, 3 Warning(s).
Target not created
出现以上错误是因为1 有可能在多个文件中定义了这个函数,查阅后没有 2在.h文件中定义了函数,keil是不支持的,将其挪到c文件即可!