使用avrdude烧写:
配置完成之后,就可以烧写啦~要用main.hex哦~
- monkey@monkey-ThinkPad-E425:~/McuWork/51_SDCC/workpace/Blink$ make program
- sudo avrdude -p 8052 -c usbasp -e -U flash:w:'./main.ihx'
- avrdude: warning: cannot set sck period. please check for usbasp firmware update.
- avrdude: AVR device initialized and ready to accept instructions
- Reading | ################################################## | 100% 0.01s
- avrdude: Device signature = 0x1e5206
- avrdude: erasing chip
- avrdude: warning: cannot set sck period. please check for usbasp firmware update.
- avrdude: reading input file "./main.ihx"
- avrdude: input file ./main.ihx auto detected as Intel Hex
- avrdude: writing flash (140 bytes):
- Writing | ################################################## | 100% 1.69s
- avrdude: 140 bytes of flash written
- avrdude: verifying flash memory against ./main.ihx:
- avrdude: load data flash data from input file ./main.ihx:
- avrdude: input file ./main.ihx auto detected as Intel Hex
- avrdude: input file ./main.ihx contains 140 bytes
- avrdude: reading on-chip flash data:
- Reading | ################################################## | 100% 0.57s
- avrdude: verifying ...
- avrdude: 140 bytes of flash verified
- avrdude: safemode: Fuses OK
- avrdude done. Thank you.
- monkey@monkey-ThinkPad-E425:~/McuWork/51_SDCC/workpace/Blink$
搞定哈~
选项说明(Options):
- -p specifies the type of the MCU connected to the programmer.
- -c specifies the default programmer
- -e causes a chip erase to be executed.
- -U memtype:op:filename
- The op field specifies what operation to perform:
- r read device memory and write to the specified file
- w read data from the specified file and write to the device memory
- v read data from both the device and the specified file and perform a verify
我也做过一个。。不过自己做的腐蚀板子出来的相对看很丑啊~~我也出去开板子做了就2个了,如果大连理工的同学想要的话可以联系下(空板)。(这个USBASP网上买都不到10元~感谢S51系列的在线编程吧,可别买成C51了,那就乖乖用并口或其他烧录吧~至于STC的可以用串口烧录,那就更方便了,不过STC烧录软件没有linux版本的。遗憾了。)
