\CH375LIB\MCS51\FILELIB4\EXAM4 中的例子使用KEIL 编译出现如下错误! 附部分改动程序!//C51 CH375HFT.C //LX51 CH375HFT.OBJ , CH375HF4.LIB /* 如果将CH375HF4换成CH375HF6就可以支持FAT32 */ //OHX51 CH375HFT
#include #include
/* 以下定义的详细说明请看CH375HF6.H文件 */ #define LIB_CFG_DISK_IO 2 /* 磁盘读写的数据的复制方式,1为"单DPTR复制",2为"双DPTR复制",3为"单DPTR和P2+R0复制" */ #define LIB_CFG_FILE_IO 2 /* 文件读写的数据的复制方式,0为"外部子程序",1为"单DPTR复制",2为"双DPTR复制",3为"单DPTR和P2+R0复制" */ #define LIB_CFG_INT_EN 0 /* CH375的INT#引脚连接方式,0为"查询方式",1为"中断方式" */ //#define LIB_CFG_FILE_IO_DEFAULT 1*/ /* 使用CH375HF6.H提供的默认"外部子程序" */
#define CH375_CMD_PORT_ADDR 0x7FFF /* CH375命令端口的I/O地址 */ #define CH375_DAT_PORT_ADDR 0x6FFF /* CH375数据端口的I/O地址 */ /* 只使用单片机内置的1KB外部RAM: 0000H-01FFH 为磁盘读写缓冲区, 同时用于文件数据缓冲区 */ #define DISK_BASE_BUF_ADDR 0x0000 /* 外部RAM的磁盘数据缓冲区的起始地址,从该单元开始的缓冲区长度为SECTOR_SIZE */ #define FILE_DATA_BUF_ADDR 0x0000 /* 外部RAM的文件数据缓冲区的起始地址,缓冲区长度不小于一次读写的数据长度 */ /* 由于单片机内置的外部RAM只有1KB, 有些单片机还要去掉256字节内部RAM, 只剩下768字节的外部RAM, 其中前512字节由CH375子程序用于磁盘数据缓冲, 在调用CH375DirtyBuffer子程序后同时也用于文件读写缓冲 */ #define FILE_DATA_BUF_LEN 0x0200 /* 外部RAM的文件数据缓冲区,缓冲区长度不小于一次读写的数据长度 */ sbit P1_3 = P1^3; #define CH375_INT_WIRE P1_3 /* P3.2, INT0, CH375的中断线INT#引脚,连接CH375的INT#引脚,用于查询中断状态 */
#include "CH375HF6.H" /* 如果不需要支持FAT32,那么请选用CH375HF4.H */
*** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375FILEREADX MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375FILECREATE MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375DISKCONNECT MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375FILELOCATE MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375FILEWRITEX MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375DIRTYBUFFER MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375FILEMODIFY MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375LIBCONFIG MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375FILECLOSE MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375DISKREADY MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375VSECTORSIZE MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375INIT MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375DISKSTATUS MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375FILEOPEN MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375VFILESIZE MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: PDISK_BASE_BUF MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375INTSTATUS MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375GETVER MODULE: CH375HFT.obj (CH375HFT) *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375FILEREADX MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0A3EH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375FILEWRITEX MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0A49H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375FILEOPEN MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0A4DH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375FILEMODIFY MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0A27H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375INTSTATUS MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0961H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375INTSTATUS MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0964H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375INTSTATUS MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0969H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375INTSTATUS MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 096FH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375INTSTATUS MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0971H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375DISKSTATUS MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0976H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375INTSTATUS MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 097AH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375DISKSTATUS MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 097FH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375LIBCONFIG MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 09B4H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375GETVER MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 09B7H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: PDISK_BASE_BUF MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 09C3H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: PDISK_BASE_BUF MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 09C6H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375INIT MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 09C9H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375DISKSTATUS MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0033H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375DISKREADY MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0055H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375VSECTORSIZE MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0065H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375VSECTORSIZE MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 006BH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375DISKCONNECT MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 007CH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375FILEOPEN MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 009BH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375FILEOPEN MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 00E5H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375VSECTORSIZE MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0131H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375VFILESIZE MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0142H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375VFILESIZE MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0144H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375VFILESIZE MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0146H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375VFILESIZE MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0148H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375VSECTORSIZE MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0153H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SY