Using AVR® JTAGICE mkII Debugger

- It is assumed that AVR Studio® and USB drivers for AVR® JTAGICE mkII Debugger are previously installed.
- Upgrading AVR® JTAGICE mkII Debugger firmware may be required.
- This example shows how to use AVR® JTAGICE mkII Debugger with EasyAVR6 development board and ATMEGA16 MCU. For other development boards and MCUs, procedure can differ slightly.
To successfully use AVR® JTAGICE mkII Debugger with generated .cof
file, follow the steps below :
- First of all, start mikroC PRO for AVR and open the desired project.
- Open Tools › Options › Output settings, and check the "Generate COFF file" option, and click the OK button.
- Next, compile the project by pressing Ctrl + F9.
- Connect USB cable and turn on power supply on EasyAVR6.
- Program the MCU by pressing F11 and make sure that JTAGEN Fuse Bit is checked in the AVRFlash :
- Connect external power supply and PC USB cable to the AVR® JTAGICE mkII Debugger's appropriate sockets.
- Connect probe cable of the AVR® JTAGICE mkII Debugger to the JTAG socket of EasyAVR6 :
- Turn on power switch on AVR® JTAGICE mkII Debugger.
- Open AVR Studio, and under File menu, select Open File... Go to the project folder and open the generated COFF file,
UART.cof
: - After that, you will be asked to save AVR Studio® Project File. To ensure proper debugging, this file should be located at the root of the original source file project.
- Then, appropriate device, debugger platform and port should be selected :
- AVR® JTAGICE mkII options window will appear after. There, following settings should be configured :
Under Connection tab, Target clock frequency should be entered, and under Debug tab, Only reprogram device if object file has changed option should be checked. - Now, you can start debugging the code by clicking Step Over button
on the Debug toolbar, or by pressing F10 :
- As you can see, the code you are debugging is in the assembly. To debug original source code, you should open the source file containing it, using File -> Open :
Copyright (c) 2002-2012 mikroElektronika. All rights reserved.
What do you think about this topic ? Send us feedback!
What do you think about this topic ? Send us feedback!