Help. Leonaro unrecognized by both linux and win7

I am a newbie and have a Leonardo that was working under arduino.ide both on win7 and on a raspberry pi3. Following my attempts to load an ihex file via a USBasp programmer on the rpi3 by holding down the reset button, the leonardo became unresponsive to both operating systems. I should add that avrdude completed its read and write actions but the verification failed . I tried this procedure more than once before noticing that the Leonardo was unresponsive to the win7. Also the avrdude script still does the read and write but the verification fails as mentioned.

Running lsusb does not show the leonardo when it is plugged directly into the usb socket and win7 shows the board as unknown device. In my desperation for a way to restore it to life I attempted to load the bootloader provided by arduino using the USBasp as an intermediatory connected to MISO,MOSI, SCK, GND and V+.. This fails with the following failure message:
[Arduino: 1.8.8 (Windows 7), Board: "Arduino Leonardo"
C:\Program Files\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega32u4 -cusbasp -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0xcb:m -Uhfuse:w:0xd8:m -Ulfuse:w:0xff:m
avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean,
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Program Files\Arduino\hardware\tools\avr/etc/avrdude.conf"
Using Port : usb
Using Programmer : usbasp
avrdude: Warning: cannot open USB device: Function not implemented
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='' product='USBasp'
avrdude done. Thank you.
Error while burning bootloader.]

Is my leonardo cooked? Any help would be appreciated by some one whose initial aim of uploading an ihex file has been frustrated. I add that the ihex file previously loaded successfully onto an Atmega32UA.

avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='' product='USBasp'

Let's start with this problem first. My recommendation is to install the libusbK driver for the USBasp:

  • Download Zadig: Note that Zadig is recommended on the official USBasp page: USBasp - USB programmer for Atmel AVR controllers -
  • Plug in your USBasp
  • Start Zadig
  • From the dropdown menu, select USBasp. If it doesn't show up on the menu, then select Options > List all devices and check again.
  • Click the up or down arrows next to the Driver selection box on the right side until you see libusbK.
  • Click the "Replace Driver" button.
  • After it finishes you can close Zadig.

After that is done, try doing the Burn Bootloader process via the Arduino IDE again.