[求助]關(guān)于用ICC7.14編譯器編譯ch375程序的問(wèn)題

我最近在搞ch375模塊,我用的就是在貴站上下的源程序,用的文件是這三個(gè)CH375HFT.C,CH375HFB.H,CH375HFB.A,而且都按照貴站上的方法正確加載了,但我在ICC7.14上編譯時(shí),總是出問(wèn)題,提示錯(cuò)誤若下: E:\PROGRA~1\ICC-AV~1\bin\imakew -f CH375.mak iccavr -o CH375 -g -e:0x20000 -ucrtatmega.o -bfunc_lit:0x8c.0x20000 -dram_end:0x10ff -bdata:0x100.0x10ff -dhwstk_size:30 -beeprom:0.4096 -fihx_coff -S2 @CH375.lk E:\avrdesign\ch375\CH375HFB.A -lcatm128 !ERROR file 'CH375HFB.o': undefined symbol 'push_gset1' !ERROR file 'CH375HFB.o': undefined symbol 'push_gset2' !ERROR file 'CH375HFB.o': undefined symbol 'push_gset3' !ERROR file 'CH375HFB.o': undefined symbol 'push_gset4' !ERROR file 'CH375HFB.o': undefined symbol 'push_gset5' !ERROR file 'CH375HFB.o': undefined symbol 'pop_gset1' !ERROR file 'CH375HFB.o': undefined symbol 'pop_gset2' !ERROR file 'CH375HFB.o': undefined symbol 'pop_gset3' !ERROR file 'CH375HFB.o': undefined symbol 'pop_gset4' !ERROR file 'CH375HFB.o': undefined symbol 'pop_gset5' !ERROR Function 'putchar' not defined. This is a hardware dependent function, and it is not included in the ICCAVR default library. Please implement this function to match your target requirements. You can find examples of this function under the \examples.AVR directory. Make a copy of a suitable example, add it to your project and modify it if needed. The source code must #include the appropriate C header file (e.g. stdio.h) as it contains the special compiler pragma for 'putchar'.

E:\PROGRA~1\ICC-AV~1\bin\imakew.exe: Error code 1 Done: there are error(s). Exit code: 1. Wed May 20 00:25:32 2009 請(qǐng)問(wèn)這是什么問(wèn)題???該怎么解決?煩請(qǐng)哪位高手幫助一下,非常感謝?。?!

可能是編譯器版本的原因,下載CH375LIB.ZIP,用\CH375LIB\AVR\FILELIBB_V7試試,這個(gè)庫(kù)的編譯器版本是7.13


哦,非常感謝!我試下。


還是不行啊,我編譯時(shí)還是一樣的錯(cuò)誤!隨后我下了個(gè)icc7.13的版本,編譯\CH375LIB\AVR\FILELIBB_V7,但還是不行,錯(cuò)誤提示如下: E:\PROGRA~1\ICC-AV~2\bin\imakew -f CH375.mak iccavr -o CH375 -g -e:0x20000 -ucrtatmega.o -bfunc_lit:0x8c.0x20000 -dram_end:0x10ff -bdata:0x100.0x10ff -dhwstk_size:30 -beeprom:0.4096 -fihx_coff -S2 @CH375.lk E:\avrdesign\ch375\CH375HFB.A -lcatmega !ERROR Function 'putchar' not defined. This is a hardware dependent function, and it is not included in the ICCAVR default library. Please implement this function to match your target requirements. You can find examples of this function under the \examples.AVR directory. Make a copy of a suitable example, add it to your project and modify it if needed. The source code must #include the appropriate C header file (e.g. stdio.h) as it contains the special compiler pragma for 'putchar'.

E:\PROGRA~1\ICC-AV~2\bin\imakew.exe: Error code 1 Done: there are error(s). Exit code: 1. Wed May 20 09:50:54 2009 這到底是什么原因?真是郁悶!


這個(gè)是'putchar' 函數(shù)有問(wèn)題,你把我們例子程序里面的串口輸出即"printf"這個(gè)函數(shù)注釋掉看編譯可以不可以


非常感謝!激動(dòng)死我了,終于可以啦!而且我試了硬件,成功啦??!再次謝謝你們?。?!


但我還是想知道,這是什么原因???自己試著改了幾下,都不行,不應(yīng)該啊,這應(yīng)該只是個(gè)輸出函數(shù)啊,怎么會(huì)有錯(cuò)誤呢?想不通。而且你們都編譯通過(guò)了,為什么我的就不行呢?都是7.13版本的,難道是因?yàn)槲疫@個(gè)是盜版的開(kāi)發(fā)環(huán)境??


putchar是printf與串口之間的銜接接口,與編譯器有關(guān),錯(cuò)誤提示不知道你理解沒(méi)有,這個(gè)函數(shù)ICC中沒(méi)有,需要自己根據(jù)硬件編寫(xiě)的


估計(jì)程序里面少鏈接了個(gè)頭文件,加上合適的頭文件就應(yīng)該可以了


我再按你們的方法試下,謝謝你們啦!


我按SCM的做法做了,果然可以啦!是自己加一個(gè)putchar函數(shù)就可以了。而且這個(gè)函數(shù)在ICC的examples.avr文件夾中有示例函數(shù)。 總算搞定了第一步了,以后還要繼續(xù)搞下去,研究更深層次的東西。在這里感謝所有幫助我的高手們,謝謝你們?。?! 也希望本帖能給那些和我遇到一樣問(wèn)題,在痛苦中掙扎,但又一直堅(jiān)持不懈的戰(zhàn)友們一些幫助。同時(shí),也希望以后能和大家有更多的交流。


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

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