uisp を修正しながら使い続けているので、avrdude も実は使ったことありません。前に USB910は windowsでは使えないなんて書きましたが、windows も対応している avrdude で使えるか(Linuxですが)試してみることにしました。
-F オプションに加えて -u オプションが必要でした。
# avrdude -F -u -p t861 -c avr910 -P /dev/ttyACM0 -U flash:w:usb910a.hex Found programmer: Id = "USB910A"; type = S Software Version = 2.4; Hardware Version = 2.4 Programmer supports auto addr increment.
Programmer supports the following devices: Device code: 0x20 = ATtiny84
avrdude: warning: selected device is not supported by programmer: t861 avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e930d avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed To disable this feature, specify the -D option. avrdude: erasing chip avrdude: reading input file "usb910a.hex" avrdude: input file usb910a.hex auto detected as Intel Hex avrdude: writing flash (6946 bytes):
Writing | ################################################## | 100% 30.38s
avrdude: 6976 bytes of flash written avrdude: verifying flash memory against usb910a.hex: avrdude: load data flash data from input file usb910a.hex: avrdude: input file usb910a.hex auto detected as Intel Hex avrdude: input file usb910a.hex contains 6946 bytes avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 13.90s
avrdude: verifying ... avrdude: 6946 bytes of flash verified
avrdude done. Thank you.
|
...一応は動くようです。ちょっと気になるのが、"Device code: 0x20 = ATtiny84" というところ、avrdude.conf をみたら、あちこちに、"Try the AT90S2313 devcode" なんて書いて 0x20 に無理やりしています。ATtiny84 はたまたま最後に定義されたものみたいです。
さて、書き込み時間が 30.38秒 ベリファイ時間は、13.90秒のようです。これは uisp もほぼ同じで予想通りです。... ということで uisp でやったように 高速化できるかやってみました。
結果は、書き込み時間が 6.58秒 で4.61倍高速化、ベリファイ時間は、3.49秒で 3.98 倍高速になりました。
ところで、ヒューズビットはどうやってアクセスするのだろう? ...どうやってもできません。コードを見ると ... usbasp.c とかは read_byte メソッドに avr_read_byte_default を使っているのに、avr910.c は 使っていない。これだと avrdude.conf に何を書こうが無理ですね。
というわけでちょっと直したら使えるようになりました。
# avrdude -F -p t861 -c avr910 -P /dev/ttyACM0 -t Found programmer: Id = "USB910A"; type = S Software Version = 2.4; Hardware Version = 2.4 Programmer supports auto addr increment.
Programmer supports the following devices: Device code: 0x20 = ATtiny84
avrdude: warning: selected device is not supported by programmer: t861 avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e930d avrdude> dump lfuse 0000 62 |b avrdude> q
avrdude: safemode: Fuses OK
avrdude done. Thank you.
|
これで -u オプションも不要になりました。
例によって 改造部分のパッチ
avrdude-5.3.1-usb910.patch,
avrdude-5.3.1-avr910d.patchと、おまけでソースRPM
avrdude-5.3.1-suz2.src.rpm、さらにおまけで 使っている uisp の ソースRPM
uisp-20040311-1suz4.src.rpmを置いておきます。