16樓 巨大八爪鱼
2015-7-18 19:18
現在,馬上用Linux下的avrdude重新燒寫程序: [octopus@pc3 ATTiny13]$ make run avr-gcc -mmcu=attiny13 -Wall -Os tiny.c -o tiny.o tiny.c:5:6: warning: return type of 'main' is not 'int' [-Wmain] void main() ^ avr-objcopy -j .text -j .data -O ihex tiny.o tiny.hex sudo avrdude -p t13 -c usbasp -e -U flash:w:tiny.hex [sudo] password for octopus:
avrdude: warning: cannot set sck period. please check for usbasp firmware update. avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e9007 avrdude: erasing chip avrdude: warning: cannot set sck period. please check for usbasp firmware update. avrdude: reading input file "tiny.hex" avrdude: input file tiny.hex auto detected as Intel Hex avrdude: writing flash (86 bytes):
Writing | ################################################## | 100% 0.76s
avrdude: 86 bytes of flash written avrdude: verifying flash memory against tiny.hex: avrdude: load data flash data from input file tiny.hex: avrdude: input file tiny.hex auto detected as Intel Hex avrdude: input file tiny.hex contains 86 bytes avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.58s
avrdude: verifying ... avrdude: 86 bytes of flash verified
avrdude: safemode: Fuses OK (E:FF, H:FF, L:2A)
avrdude done. Thank you.
[octopus@pc3 ATTiny13]$
程序正常運行! (那個int main()寫錯了暫時不管了。。。)
|