程序編譯錯(cuò)誤。燒寫(xiě)后 串口一直發(fā)送START 沒(méi)有發(fā)錯(cuò)誤信息(LED4一直閃)

\CH375LIB\MCS51\FILELIB4\EXAM4 中的例子使用KEIL 編譯出現(xiàn)如下錯(cuò)誤! 附部分改動(dòng)程序!//C51 CH375HFT.C //LX51 CH375HFT.OBJ , CH375HF4.LIB /* 如果將CH375HF4換成CH375HF6就可以支持FAT32 */ //OHX51 CH375HFT

#include #include

/* 以下定義的詳細(xì)說(shuō)明請(qǐng)看CH375HF6.H文件 */ #define LIB_CFG_DISK_IO 2 /* 磁盤(pán)讀寫(xiě)的數(shù)據(jù)的復(fù)制方式,1為"單DPTR復(fù)制",2為"雙DPTR復(fù)制",3為"單DPTR和P2+R0復(fù)制" */ #define LIB_CFG_FILE_IO 2 /* 文件讀寫(xiě)的數(shù)據(jù)的復(fù)制方式,0為"外部子程序",1為"單DPTR復(fù)制",2為"雙DPTR復(fù)制",3為"單DPTR和P2+R0復(fù)制" */ #define LIB_CFG_INT_EN 0 /* CH375的INT#引腳連接方式,0為"查詢方式",1為"中斷方式" */ //#define LIB_CFG_FILE_IO_DEFAULT 1*/ /* 使用CH375HF6.H提供的默認(rèn)"外部子程序" */

#define CH375_CMD_PORT_ADDR 0x7FFF /* CH375命令端口的I/O地址 */ #define CH375_DAT_PORT_ADDR 0x6FFF /* CH375數(shù)據(jù)端口的I/O地址 */ /* 只使用單片機(jī)內(nèi)置的1KB外部RAM: 0000H-01FFH 為磁盤(pán)讀寫(xiě)緩沖區(qū), 同時(shí)用于文件數(shù)據(jù)緩沖區(qū) */ #define DISK_BASE_BUF_ADDR 0x0000 /* 外部RAM的磁盤(pán)數(shù)據(jù)緩沖區(qū)的起始地址,從該單元開(kāi)始的緩沖區(qū)長(zhǎng)度為SECTOR_SIZE */ #define FILE_DATA_BUF_ADDR 0x0000 /* 外部RAM的文件數(shù)據(jù)緩沖區(qū)的起始地址,緩沖區(qū)長(zhǎng)度不小于一次讀寫(xiě)的數(shù)據(jù)長(zhǎng)度 */ /* 由于單片機(jī)內(nèi)置的外部RAM只有1KB, 有些單片機(jī)還要去掉256字節(jié)內(nèi)部RAM, 只剩下768字節(jié)的外部RAM, 其中前512字節(jié)由CH375子程序用于磁盤(pán)數(shù)據(jù)緩沖, 在調(diào)用CH375DirtyBuffer子程序后同時(shí)也用于文件讀寫(xiě)緩沖 */ #define FILE_DATA_BUF_LEN 0x0200 /* 外部RAM的文件數(shù)據(jù)緩沖區(qū),緩沖區(qū)長(zhǎng)度不小于一次讀寫(xiě)的數(shù)據(jù)長(zhǎng)度 */ sbit P1_3 = P1^3; #define CH375_INT_WIRE P1_3 /* P3.2, INT0, CH375的中斷線INT#引腳,連接CH375的INT#引腳,用于查詢中斷狀態(tài) */

#include "CH375HF6.H" /* 如果不需要支持FAT32,那么請(qǐng)選用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

main( ) { UINT8 i; // UINT16 NewSize, count; /* 因?yàn)檠菔景宓腞AM容量只有32KB,所以NewSize限制為16位,實(shí)際上如果文件大于32256字節(jié),應(yīng)該分幾次讀寫(xiě)并且將NewSize改為UINT32以便累計(jì) */ // UINT8 code *pCodeStr; LED_OUT_INIT( ); LED_OUT_ACT( ); /* 開(kāi)機(jī)后LED亮一下以示工作 */ mDelay100mS( ); /* 延時(shí)100毫秒 */ LED_OUT_INACT( ); mInitSTDIO( ); /* 為了讓計(jì)算機(jī)通過(guò)串口監(jiān)控演示過(guò)程 */ printf( "Start\n" );

#if DISK_BASE_BUF_LEN == 0 pDISK_BASE_BUF = &my_buffer[0]; /* 不在.H文件中定義CH375的專用緩沖區(qū),而是用緩沖區(qū)指針指向其它應(yīng)用程序的緩沖區(qū)便于合用以節(jié)約RAM */ #endif printf( "EROOR\n" ); i = CH375LibInit( ); /* 初始化CH375程序庫(kù)和CH375芯片,操作成功返回0 */ mStopIfError( i ); /* 其它電路初始化 */ } 編譯出現(xiàn)如下錯(cuò)誤 :

創(chuàng)建目標(biāo) '目標(biāo) 1' 編譯 CH375HFT.C ... 連接 ... *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?_MCOPYCODESTRINGTOIRAM?CH375HFT *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375LIBINIT MODULE: CH375HFT.obj (CH375HFT) *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375LIBINIT MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0433H Program Size: data=30.1 xdata=0 code=1200 創(chuàng)建 HEX 文件 "EXAM4" ... "EXAM4" - 0 個(gè)錯(cuò)誤, 3 個(gè)警告。

有關(guān)CH375LIBINIT()的錯(cuò)誤是什么原因啊 其他和例子是一樣的!


main( ) { UINT8 i; // UINT16 NewSize, count; /* 因?yàn)檠菔景宓腞AM容量只有32KB,所以NewSize限制為16位,實(shí)際上如果文件大于32256字節(jié),應(yīng)該分幾次讀寫(xiě)并且將NewSize改為UINT32以便累計(jì) */ // UINT8 code *pCodeStr; LED_OUT_INIT( ); LED_OUT_ACT( ); /* 開(kāi)機(jī)后LED亮一下以示工作 */ mDelay100mS( ); /* 延時(shí)100毫秒 */ LED_OUT_INACT( ); mInitSTDIO( ); /* 為了讓計(jì)算機(jī)通過(guò)串口監(jiān)控演示過(guò)程 */ printf( "Start\n" );

#if DISK_BASE_BUF_LEN == 0 pDISK_BASE_BUF = &my_buffer[0]; /* 不在.H文件中定義CH375的專用緩沖區(qū),而是用緩沖區(qū)指針指向其它應(yīng)用程序的緩沖區(qū)便于合用以節(jié)約RAM */ #endif printf( "EROOR\n" ); i = CH375LibInit( ); /* 初始化CH375程序庫(kù)和CH375芯片,操作成功返回0 */ mStopIfError( i ); /* 其它電路初始化 */ } 編譯出現(xiàn)如下錯(cuò)誤 :

創(chuàng)建目標(biāo) '目標(biāo) 1' 編譯 CH375HFT.C ... 連接 ... *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?_MCOPYCODESTRINGTOIRAM?CH375HFT *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375LIBINIT MODULE: CH375HFT.obj (CH375HFT) *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375LIBINIT MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0433H Program Size: data=30.1 xdata=0 code=1200 創(chuàng)建 HEX 文件 "EXAM4" ... "EXAM4" - 0 個(gè)錯(cuò)誤, 3 個(gè)警告。

有關(guān)CH375LIBINIT()的錯(cuò)誤是什么原因啊 其他和例子是一樣的!


你沒(méi)把庫(kù)添加到工程中去200838171387.jpg


加到工程中了。具體見(jiàn)附件


只有登錄才能回復(fù),可以選擇微信賬號(hào)登錄

国产91精品新入口,国产成人综合网在线播放,九热这里只有精品,本道在线观看,美女视频a美女视频,韩国美女激情视频,日本美女pvp视频