|
|||||||||||
| 技術(shù)交流 | 電路欣賞 | 工控天地 | 數(shù)字廣電 | 通信技術(shù) | 電源技術(shù) | 測控之家 | EMC技術(shù) | ARM技術(shù) | EDA技術(shù) | PCB技術(shù) | 嵌入式系統(tǒng) 驅(qū)動編程 | 集成電路 | 器件替換 | 模擬技術(shù) | 新手園地 | 單 片 機(jī) | DSP技術(shù) | MCU技術(shù) | IC 設(shè)計(jì) | IC 產(chǎn)業(yè) | CAN-bus/DeviceNe |
初學(xué)avr gcc 調(diào)試出現(xiàn)問題請教 |
| 作者:singlemans 欄目:單片機(jī) |
很簡單的一個程序 #include <avr/io.h> int main (void) { unsigned CHAR i,j; for(i=0;;i++) { j=i; DDRD=Ox00; PORD=j; } while (1) { ; } return 0; } 為什么編譯時出現(xiàn)以下錯誤呢?makefile已經(jīng)設(shè)置了。òㄎ募捌骷ATMEGA16),makefile也放到和程序一個文件夾下了 > "make.exe" all -------- begin -------- avr-gcc (GCC) 3.4.3 COPYRIGHT (C) 2004 Free SOFTWARE Foundation, Inc. This is free SOFTWARE; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiling: AStest.c avr-gcc -c -mmcu=ATMEGA16 -I. -gdwarf-2 -DF_CPU=8000000UL -Os -funsigned-CHAR -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=AStest.lst -std=gnu99 -MD -MP -MF .dep/AStest.o.d AStest.c -o AStest.o AStest.c: In function `main': AStest.c:9: error: `Ox00' undeclared (first use in this function) AStest.c:9: error: (Each undeclared identifier is reported ONLY once AStest.c:9: error: for each function it appears in.) AStest.c:10: error: `PORD' undeclared (first use in this function) AStest.c:17:2: warning: no newline at end of file make.exe: *** [AStest.o] Error 1 > PROCESS Exit Code: 2 |
| 2樓: | >>參與討論 |
| 作者: lizy927 于 2006/3/10 11:41:00 發(fā)布:
PORTD 不是 PORD 檢查一下 0X00 有沒有寫成字母 O |
|
| 3樓: | >>參與討論 |
| 作者: singlemans 于 2006/3/10 11:44:00 發(fā)布:
沒有,確信沒有寫錯 |
|
| 4樓: | >>參與討論 |
| 作者: singlemans 于 2006/3/10 11:59:00 發(fā)布:
剛才沒看到,謝謝,PORTD寫錯了 謝謝lizy927 |
|
|
|
| 免費(fèi)注冊為維庫電子開發(fā)網(wǎng)會員,參與電子工程師社區(qū)討論,點(diǎn)此進(jìn)入 |
Copyright © 1998-2006 www.hbjingang.com 浙ICP證030469號 |