Making AVR isp mkii clone work on windows 10 and Atmel Studio 7:
- Tutorial
After upgrading to Atmel Studio 7 avr isp mkii clone stopped working.
Initial data:
Programmer avr isp mkii clone on at90usb162 16MHz
1. Preparing the environment for building firmware with fw 1.8 and compatibility switching mode
- install Atmel Studio 7;
- in addition, for the compiler, we install a set of ported * nix utilities: BASH * nix shells, and * nix utilities such as cut, find and sed:
from the mingw site we download the installer and select the following items during installation: mingw32-base, mingw32-binutils and msys -base, the installer will install all the dependent packages;
- download the archive of LUFA libraries with projects from the site , unpack it to the root of the system drive (c: \ lufa-master \ ...);
- in the PATH environment variable for the user and for the system, add (! Example):
C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin;C:\MinGW\msys\1.0\bin
(the paths will depend on the type of OS and user preferences)
2. Editing firmware sources and copying
- edit the file C: \ lufa-master \ Projects \ AVRISP-MKII \ make (prescribe your stone and frequency)
MCU = at90usb162
ARCH = AVR8
BOARD = USBTINYMKII
F_CPU = 16000000
F_USB = $(F_CPU)
OPTIMIZATION = s
TARGET = AVRISP-MKII
- edit the file C: \ lufa-master \ Projects \ AVRISP-MKII \ Config \ AppConfig.h (enable switching compatibility modes):
// #define LIBUSB_DRIVER_COMPAT
#define RESET_TOGGLES_LIBUSB_COMPAT
- edit the file C: \ lufa-master \ Projects \ AVRISP-MKII \ Lib \ V2ProtocolParams.h (here we indicate the compatibility of firmware version 1.8):
#define FIRMWARE_VERSION_MINOR 0x18
assembly:
- open the command line AS 7 command promt and write the commands line by line:
cd C:\lufa-master\Projects\AVRISP-MKII\
make all
- after that, in this (C: \ lufa-master \ Projects \ AVRISP-MKII \) directory, the hex firmware file should appear (which is flashed using Flip by entering the programmer in DFU mode);
- after firmware compatibility mode in the programmer is selected by pressing RESET and stored in memory;
- to clean the directory from compilation results, you can run the command:
make clean
3. OS setup
- Download Zadig . Zadig is a USB driver manager for Windows that allows you to replace the driver. The latest version comes with the libusb-win32 (v1.2.6.0) driver.
- Open Zadig, Options, List All Devices. From the list, select AVRISP mkII (before the first time you connect the programmer, you should change the mode).
- Change the current driver to libusb-win32 (v1.2.6.0)
Reboot is not required.