Building configuration: Troch690 - Debug Updating build tree... Linking Warning[w6]: Type conflict for external/entry "mCmdParam", in module CH375MAI against external/entry in module usb; class/struct/union field names do not match: Other16 vs Query /* In module CH375MAI: */ CMD_PARAM_I mCmdParam; typedef CMD_PARAM CMD_PARAM_I; typedef union _CMD_PARAM CMD_PARAM; /* In module usb: */ CMD_PARAM_I mCmdParam; typedef CMD_PARAM CMD_PARAM_I; typedef union _CMD_PARAM CMD_PARAM; Warning[w35]: There is more than one definition for the struct/union type with tag '_CMD_PARAM'; class/struct/union field names do not match: Query vs Other16 union _CMD_PARAM /* Elements: 19, Bytes: 30 */ { struct /* Elements: 1, Bytes: 30 */ { UINT8 mBuffer[30]; } Other; struct /* Elements: 4, Bytes: 13 */ { UINT32 mReserved; UINT32 mTotalSector; UINT32 mFreeSector; UINT8 mDiskFat; } Query; struct /* Elements: 1, Bytes: 30 */ { UINT8 mPathName[30]; } Open; struct Enumer; struct /* Elements: 1, Bytes: 1 */ { UINT8 mUpdateLen; } Close; struct Create; struct Erase; struct /* Elements: 4, Bytes: 9 */ { UINT32 mFileSize; UINT16 mFileDate; UINT16 mFileTime; UINT8 mFileAttr; } Modify; struct /* Elements: 1, Bytes: 4 */ { UINT32 mSectorOffset; } Locate; struct /* Elements: 1, Bytes: 1 */ { UINT8 mSectorCount; } Read; struct Write; struct /* Elements: 3, Bytes: 10 */ { UINT8 mSectorCount; UINT8 mReserved[7]; PUINT8 mDataBuffer; } ReadX; struct WriteX; struct /* Elements: 1, Bytes: 4 */ { UINT32 mDiskSizeSec; } DiskSize; struct /* Elements: 1, Bytes: 4 */ { UINT32 mByteOffset; } ByteLocate; struct /* Elements: 2, Bytes: 30 */ { UINT8 mByteCount; UINT8 mByteBuffer[29]; } ByteRead; struct ByteWrite; struct /* Elements: 3, Bytes: 6 */ { UINT8 mSaveVariable; UINT8 mReserved[3]; PUINT8 mBuffer; } SaveVariable; union /* Elements: 2, Bytes: 21 */ { struct /* Elements: 10, Bytes: 21 */ { UINT32 mCBW_Sig; UINT32 mCBW_Tag; UINT8 mCBW_DataLen; UINT8 mCBW_DataLen1; UINT8 mCBW_DataLen2; UINT8 mCBW_DataLen3; UINT8 mCBW_Flag; UINT8 mCBW_LUN; UINT8 mCBW_CB_Len; UINT8 mCBW_CB_Buf[6]; } mCBW; struct /* Elements: 5, Bytes: 14 */ { UINT32 mCSW_Sig; UINT32 mCSW_Tag; UINT32 mCSW_Residue; UINT8 mCSW_Status; UINT8 mReserved; } mCSW; } BOC; }; typedef unsigned char UINT8; typedef unsigned long UINT32; typedef unsigned short UINT16; typedef unsigned char * PUINT8; union _CMD_PARAM /* Elements: 19, Bytes: 30 */ { struct /* Elements: 1, Bytes: 30 */ { UINT8 mBuffer[30]; } Other; struct /* Elements: 1, Bytes: 30 */ { UINT16 mBuffer16[15]; } Other16; struct /* Elements: 1, Bytes: 28 */ { UINT32 mBuffer32[7]; } Other32; struct /* Elements: 4, Bytes: 13 */ { UINT32 mReserved; UINT32 mTotalSector; UINT32 mFreeSector; UINT8 mDiskFat; } Query; struct /* Elements: 1, Bytes: 30 */ { UINT8 mPathName[30]; } Open; struct Enumer; struct /* Elements: 1, Bytes: 1 */ { UINT8 mUpdateLen; } Close; struct Create; struct Erase; struct /* Elements: 6, Bytes: 16 */ { UINT32 mFileSize; UINT16 mFileDate; UINT16 mFileTime; UINT8 mFileAttr; UINT8 mReserved[3]; UINT32 mOldSize; } Modify; struct /* Elements: 1, Bytes: 4 */ { UINT32 mSectorOffset; } Locate; struct /* Elements: 6, Bytes: 10 */ { UINT8 mSectorCount; UINT8 mActualCount; UINT8 mLbaCount; UINT8 mRemainCount; UINT32 mLbaStart; PUINT8X mDataBuffer; } Read; struct /* Elements: 7, Bytes: 14 */ { UINT8 mSectorCount; UINT8 mActualCount; UINT8 mLbaCount; UINT8 mAllocCount; UINT32 mLbaStart; PUINT8X mDataBuffer; UINT32 mSaveValue; } Write; struct /* Elements: 1, Bytes: 4 */ { UINT32 mDiskSizeSec; } DiskSize; struct /* Elements: 1, Bytes: 4 */ { UINT32 mByteOffset; } ByteLocate; struct /* Elements: 2, Bytes: 30 */ { UINT8 mByteCount; UINT8 mByteBuffer[29]; } ByteRead; struct ByteWrite; struct /* Elements: 3, Bytes: 6 */ { UINT8 mSaveVariable; UINT8 mReserved[3]; PUINT8X mBuffer; } SaveVariable; union /* Elements: 2, Bytes: 21 */ { struct /* Elements: 9, Bytes: 21 */ { UINT32 mCBW_Sig; UINT32 mCBW_Tag; UINT8 mCBW_DataLen; UINT8 mCBW_DataLen1; UINT16 mCBW_DataLen2; UINT8 mCBW_Flag; UINT8 mCBW_LUN; UINT8 mCBW_CB_Len; UINT8 mCBW_CB_Buf[6]; } mCBW; struct /* Elements: 5, Bytes: 14 */ { UINT32 mCSW_Sig; UINT32 mCSW_Tag; UINT32 mCSW_Residue; UINT8 mCSW_Status; UINT8 mReserved; } mCSW; } BOC; }; typedef unsigned char UINT8; typedef unsigned short UINT16; typedef unsigned long UINT32; typedef unsigned char * PUINT8X; Total number of errors: 0 Total number of warnings: 2
我使用的頭文件和.r90文件出自同一個(gè)FILELIBJ_V5文件夾下,這個(gè)文件夾從貴公司網(wǎng)站上下載得到。 我分析了一下,是因?yàn)閷?duì)同一個(gè)變量在兩個(gè)地方(是個(gè)union變量)定義不一致所致。這兩個(gè)地方,是指下載下來的頭文件和.r90文件。