To begin with create an AVR-GCC project in Eclipse with the following code and compile it.
#AVRISP MKII PROGRAMMER SOFTWARE DOWNLOAD INSTALL#
(Note if you wish to use an AVRISP MKII programmer with AVR Studio you must uninstall the LIBUSB driver and install the AVR Jungo driver) The manual will assume you have successfully installed AVR Studio 4. The latest version at the time of writing this manual was AVR Studio 4.18 SP3 and can be downloaded from the following link: Linux users will have to use a program called Kontrollerlab.Īs stated above Windows users will need to install AVR Studio 4, WinAVR must be installed prior to installing AVR Studio 4, however since WinAVR was installed with Eclipse this requirement has already been met. However AVR Studio is not supported for Linux. Additionally it you have brought an AVRISP MKII programmer you can create your programs entirely in the AVR Studio environment and upload your firmware to the microcontroller from this IDE.
Windows users will need to install AVR Studio 4 which is Atmel's purpose made IDE for AVR microcontrollers and is a wonderful tool. Unfortunately Eclipse does not provide an AVR-GCC debugger at this time so new software will need to be installed.
This chapter will separate into two parts, debugging in Linux and debugging in Windows. The reason why software debuggers exist is that they provide a means for the programmer to check the internal operations of the microcontroller by observing register flags and values and they also give you the ability to watch independent variables. This chapter will introduce you to software that can be used to perform software debugging and how it can be useful in checking your program operation before trying to debug in hardware.