你好,游客 登录 注册 搜索
背景:
阅读新闻

Ubuntu下的AT89S52,S51+SDCC+USBASP的开发环境搭建

[日期:2012-05-25] 来源:csdn  作者:Galaxy_blue [字体:大 中 小]

使用avrdude烧写:

配置完成之后,就可以烧写啦~要用main.hex哦~

  1. monkey@monkey-ThinkPad-E425:~/McuWork/51_SDCC/workpace/Blink$ make program   
  2. sudo avrdude -p 8052 -c usbasp -e -U flash:w:'./main.ihx'  
  3.   
  4. avrdude: warning: cannot set sck period. please check for usbasp firmware update.  
  5. avrdude: AVR device initialized and ready to accept instructions  
  6.   
  7. Reading | ################################################## | 100% 0.01s  
  8.   
  9. avrdude: Device signature = 0x1e5206  
  10. avrdude: erasing chip  
  11. avrdude: warning: cannot set sck period. please check for usbasp firmware update.  
  12. avrdude: reading input file "./main.ihx"  
  13. avrdude: input file ./main.ihx auto detected as Intel Hex  
  14. avrdude: writing flash (140 bytes):  
  15.   
  16. Writing | ################################################## | 100% 1.69s  
  17.   
  18. avrdude: 140 bytes of flash written  
  19. avrdude: verifying flash memory against ./main.ihx:  
  20. avrdude: load data flash data from input file ./main.ihx:  
  21. avrdude: input file ./main.ihx auto detected as Intel Hex  
  22. avrdude: input file ./main.ihx contains 140 bytes  
  23. avrdude: reading on-chip flash data:  
  24.   
  25. Reading | ################################################## | 100% 0.57s  
  26.   
  27. avrdude: verifying ...  
  28. avrdude: 140 bytes of flash verified  
  29.   
  30. avrdude: safemode: Fuses OK  
  31.   
  32. avrdude done.  Thank you.  
  33.   
  34. monkey@monkey-ThinkPad-E425:~/McuWork/51_SDCC/workpace/Blink$  

搞定哈~

选项说明(Options):

  1. -p specifies the type of the MCU connected to the programmer.  
  2. -c specifies the default programmer  
  3. -e causes a chip erase to be executed.  
  4. -U memtype:op:filename  
  5. The op field specifies what operation to perform:  
  6.  r read device memory and write to the specified file  
  7.  w read data from the specified file and write to the device memory  
  8.  v read data from both the device and the specified file and perform a verify  
最后难免会有问题出现,遇到问题就慢慢解决喽~USBASP使用前请用lsusb命令确认识别。USBASP固件在附传~在windows下也有相关的USBASP使用方法在这里就不多说了~USBASP的制作参考 http://www.linuxidc.com/Linux/2012-05/61087.htm

我也做过一个。。不过自己做的腐蚀板子出来的相对看很丑啊~~我也出去开板子做了就2个了,如果大连理工的同学想要的话可以联系下(空板)。(这个USBASP网上买都不到10元~感谢S51系列的在线编程吧,可别买成C51了,那就乖乖用并口或其他烧录吧~至于STC的可以用串口烧录,那就更方便了,不过STC烧录软件没有linux版本的。遗憾了。)

linux
相关资讯       Ubuntu开发环境搭建 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款