搜索
bottom↓
回复: 19

有人用 avrdude 与 Dragon 连接成功吗?

[复制链接]
头像被屏蔽

出0入0汤圆

发表于 2008-6-11 13:24:56 | 显示全部楼层 |阅读模式
20060421版本的winavr带的avrdude 不支持dragon.

我下载了20070525的WINAVR,终于支持dragon了。使用了如下的命令,均提示出错:

C:\>avrdude -c dragon_hvsp -p m16 -P usb -F
found 6 busses
avrdude: usbdev_open(): did not find any USB device "usb"

C:\>avrdude -c dragon_pp -p m16 -P usb -F
found 6 busses
avrdude: usbdev_open(): did not find any USB device "usb"


安装好了20080512版本,仍是这个错误提示。。。继续研究中。。。
头像被屏蔽

出0入0汤圆

 楼主| 发表于 2008-6-11 13:28:25 | 显示全部楼层
The AVR Dragon is supported in all modes (ISP, JTAG, HVSP, PP, debugWire). (High-voltage programming is not yet supported.) When used in JTAG and debugWire mode, the AVR Dragon behaves similar to a JTAG ICE mkII, so all device-specific comments for that device will apply as well. When used in ISP mode, the AVR Dragon behaves similar to an AVRISP mkII (or JTAG ICE mkII in ISP mode), so all device-specific comments will apply there. In particular, the Dragon starts out with a rather fast ISP clock frequency, so the -B bitclock option might be required to achieve a stable ISP communication.

出0入0汤圆

发表于 2008-6-11 13:40:25 | 显示全部楼层
我实验了一下,在Linux下成功,windows下不行。截图:


(原文件名:2008-06-11-133930_775x478_scrot.png)

出0入0汤圆

发表于 2008-6-11 13:41:29 | 显示全部楼层
avrdude -v

avrdude: Version 5.5, compiled on Apr 14 2008 at 12:28:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/root/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

出0入4汤圆

发表于 2008-6-11 13:43:00 | 显示全部楼层
阿莫,有可能是命令输错了。

出10入210汤圆

发表于 2008-6-11 13:51:52 | 显示全部楼层
这个问题我在AVRFreaks上问过,按上面所说的方法试过,以下是相关文件。
注意:换了驱动后,USBASP就用不了了,用的USBASP时候还得换回去。

点击此处下载 ourdev_306837.rar(文件大小:567K) (原文件名:libsub-win32.rar)

chrainbow问:
Display Message as follows :
C:\Program Files\Atmel\AVR Tools\AvrDragon>avrdragon -d ATmega8 -mi -s
avrdragon.exe v1.0.0 Copyright (C) Atmel Corporation 2006
Unknown device: ATmega8.
Use '-h' or '-?' for help.

Use "-d ATmega16" can read ATmega8's Signature bytes.

C:\Program Files\Atmel\AVR Tools\AvrDragon>avrdragon -d ATmega16 -mi -s
avrdragon.exe v1.0.0 Copyright (C) Atmel Corporation 2006
Signature bytes: 0x1e 0x93 0x07.

dl8dt答:
You could always resort to using AVRDUDE if you want.

chrainbow问:
Thanks,Jörg Wunsch.
Have i try.
......
NG.avrdude version 5.5

C:\>avrdude -c dragon_isp -p M8 -P usb -s

found 4 busses
avrdude: usbdev_open(): did not find any USB device "usb"

C:\>avrdragon -d ATmega8 -mi -s
avrdragon.exe v1.0.0 Copyright (C) Atmel Corporation 2006
Unknown device: ATmega8.
Use '-h' or '-?' for help.

C:\>avrdragon -d ATmega16 -mi -s
avrdragon.exe v1.0.0 Copyright (C) Atmel Corporation 2006
Signature bytes: 0x1e 0x93 0x07.

dl8dt答:
If you want both, AVR Studio and AVRDUDE access to your AVR Dragon, please
replace the libusb0.dll by the "filter" version which you can find here:

http://sourceforge.net/projects/libusb-win32/
头像被屏蔽

出0入0汤圆

 楼主| 发表于 2008-6-11 13:56:30 | 显示全部楼层
谢谢老陈啊!

测试一下先。。
头像被屏蔽

出0入0汤圆

 楼主| 发表于 2008-6-11 14:01:28 | 显示全部楼层
哈哈,竟然真的可以了!

--------------------------------------------------------------------

C:\>avrdude -c dragon_pp -p m16 -P usb -F

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.15s

avrdude: Device signature = 0x1e9403

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

出0入0汤圆

发表于 2008-6-11 14:02:05 | 显示全部楼层
安装楼上说的libusb库后,windows下也可用avrdude访问dragon了,而且看上去非常的快。0.00s
头像被屏蔽

出0入0汤圆

 楼主| 发表于 2008-6-11 14:13:38 | 显示全部楼层
的确是速度很快。比 avr studio 下的dragon操作快多了。

但奇怪的是,运行十几次后,会出现一下下图的进度条,影响了速度。。


(原文件名:SNAG-0046.jpg)

我用的测试批处理是:

@echo ****************** 本软件由阿莫编写 2008.06.05 ************
set /a i=1

:start

avrdude -c dragon_pp -p m16 -P usb -F -q -q

@echo ---- 正在进行高压并行编程ID校验(ATmega16 0x1e 0x94 0x03) 次数:%i%---
set /a i=%i%+1

@echo ------------------------------------------------------------------------
 
goto start

出10入210汤圆

发表于 2008-6-11 14:35:54 | 显示全部楼层
阿莫的还好,出现那个提示,我的就惨了,重装了系统开机时还能用1次,再过一下就不行了,出现下面的提示:
C:\WinAVR\bin>avrdude -c dragon_pp -p m88 -P usb -F
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: usbdev_send(): wrote 0 out of 11 bytes, err = usb_reap: reaping request
failed, win error: 由于线程退出或应用程序请求,已放弃 I/O 操作。

avrdude: jtagmkII_send(): failed to send command to serial port

不知是不是系统启动了什么程序和dragon有冲突。

出0入0汤圆

发表于 2008-6-11 16:25:24 | 显示全部楼层
我觉得更快的方法是把avrdude内部读取ID代码的部分抠出来,写一个专门程序。
因为我观察,avrdude -c dragon_pp -p m16 -P usb -F 指令每次执行都会进行dragon的初始化。

出0入0汤圆

发表于 2008-6-11 16:56:19 | 显示全部楼层
收藏了
头像被屏蔽

出0入0汤圆

 楼主| 发表于 2008-6-11 19:04:41 | 显示全部楼层
晕死啊。。。。原来不是速度快,而是出错!!!!  正常运行一次,需要等待好几秒钟后,才能进行第二次!!

晕,比 avrdragon.exe 还慢得多啊!


(原文件名:SNAG-0046.jpg)

继续寻求解决方案。。。。

出0入0汤圆

发表于 2008-6-11 19:09:29 | 显示全部楼层
呵呵!还是我的powerprg+zf-008快吧!

出0入0汤圆

发表于 2008-6-11 21:30:27 | 显示全部楼层
我觉得我在11楼的方法才是可能的快的方法。
头像被屏蔽

出0入0汤圆

 楼主| 发表于 2008-6-11 21:45:38 | 显示全部楼层
【15楼】 ifree64 ,

看了我13楼的图了吗?

现在发现 avrdude 的 dragon  的USB驱动根本没有实用价值。

要改,就改 avrdragon.exe吧。

出0入0汤圆

发表于 2008-6-11 23:39:51 | 显示全部楼层
avrdragon.exe反向工程?
头像被屏蔽

出0入0汤圆

 楼主| 发表于 2008-6-13 11:06:21 | 显示全部楼层
以下蓝色文字由坛主:armok 于:2008-06-13,11:06:21 加入。
<font color=black>请发贴人注意:
本贴放在这分区不合适,即将移走
原来分区:[9999]AVR (原ourAVR.com) 技术论坛
即将移去的分区:[3010]“AVR芯片质量与功能检测器”开源设计活动
移动执行时间:自本贴发表0小时后

任何的疑问或咨询,请可随时联系站长。谢谢你的支持!
</font>

出0入0汤圆

发表于 2008-9-30 03:09:07 | 显示全部楼层
太感谢了,终于可以用了.

个人平台发现一些问题:

1.版本要够新,起码winavr20070525中的不行

2.安装过程中,先把所有的USB外设拔掉.否则有可能要等到天长地久
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-5-3 02:50

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表