KeeYes USBASP ISP programmer - FreeBSD

Hardware info on main page.

Local links

c2 - FreeBSD, USBtinyISP,

History

2022-03-20: c2 - after upgrade, no warning about sck anymore

tingo@kg-core2:~ $ avrdude -c usbasp -p m328p

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably lgt8fx328p)

avrdude: safemode: Fuses OK (E:FD, H:DE, L:FF)

avrdude done.  Thank you.

2022-03-20: c2 - upgraing the firmware on the usbasp, usinga usbtiny as programmer. Close the J2 jumper, then run

tingo@kg-core2:/zt/t2/work/bitraf/2022/20220310_avrdude_isp_programmers/usbasp.2011-05-28 $ avrdude -c usbtiny -p m8 -U flash:w:bin/firmware/usbasp.atmega8.2011-05-28.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9307 (probably m8a)
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 "bin/firmware/usbasp.atmega8.2011-05-28.hex"
avrdude: input file bin/firmware/usbasp.atmega8.2011-05-28.hex auto detected as Intel Hex
avrdude: writing flash (4700 bytes):

Writing | ################################################## | 100% 8.44s

avrdude: 4700 bytes of flash written
avrdude: verifying flash memory against bin/firmware/usbasp.atmega8.2011-05-28.hex:
avrdude: load data flash data from input file bin/firmware/usbasp.atmega8.2011-05-28.hex:
avrdude: input file bin/firmware/usbasp.atmega8.2011-05-28.hex auto detected as Intel Hex
avrdude: input file bin/firmware/usbasp.atmega8.2011-05-28.hex contains 4700 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 6.68s

avrdude: verifying ...
avrdude: 4700 bytes of flash verified

avrdude: safemode: Fuses OK (E:FF, H:D9, L:9F)

avrdude done.  Thank you.

2022-03-20: c2 - connecting one usbasp programmer to my FreeBSD workstation which run FreeBSD 13.0-release now

tingo@kg-core2:~ $ freebsd-version -ku
13.0-RELEASE-p7
13.0-RELEASE-p7

kernel

tingo@kg-core2:~ $ uname -a
FreeBSD kg-core2.kg4.no 13.0-RELEASE-p7 FreeBSD 13.0-RELEASE-p7 #0: Mon Jan 31 18:24:03 UTC 2022
     root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64

the programmer shows up in usbconfig output

tingo@kg-core2:~ $ sudo usbconfig -d ugen1.6
ugen1.6: <www.fischl.de USBasp> at usbus1, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (50mA)

try with an Arduino UNO connected

tingo@kg-core2:~ $ avrdude -c usbasp -p m328p
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'

avrdude done.  Thank you.

ok, use sudo

tingo@kg-core2:~ $ sudo avrdude -c usbasp -p m328p

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably lgt8fx328p)

avrdude: safemode: Fuses OK (E:FD, H:DE, L:FF)

avrdude done.  Thank you.

created a devd config file for it

tingo@kg-core2:~ $ cat /usr/local/etc/devd/usbasp.conf
# allow group (operator) access to the usb connection of the USBtinyISP device

notify 100 {
        match "system"          "USB";
        match "subsystem"       "INTERFACE";
        match "type"            "ATTACH";
        match "vendor" "0x16c0";
        match "product" "0x05dc";
        action "usb_devaddr=`echo $cdev | sed 's#^ugen##'` && chmod g+rw /dev/usb/${usb_devaddr}.*";
};

and restarted devd, the re-plugged the programmer. Now I don't need sudo for avrdude

tingo@kg-core2:~ $ avrdude -c usbasp -p m328p

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably lgt8fx328p)

avrdude: safemode: Fuses OK (E:FD, H:DE, L:FF)

avrdude done.  Thank you.