Overview
AVR Studio enables execution of AVR programs on an AVR In-Circuit Emulator or the built-in AVR Instruction Set Simulator. In order to execute a program using AVR Studio, it must first be compiled or assembled to generate an object file which can be read by AVR Studio.

The Source Window
The key window in AVR Studio is the Source window. When an object file is opened, the Source window is automatically created. The Source window displays the code currently being executed on the execution target (i.e. the Emulator or the Simulator), and the text marker is always placed on the next statement to be executed. The Status bar indicates whether the execution target is the AVR In-Circuit Emulator or the built-in Instruction Set Simulator.

View code in source or dissassembly mode
By default, it is assumed that execution is done on source level, so if source information exists, the program will start up in source level mode. In addition to source level execution of both C and Assembly programs, AVR Studio can also view and execute programs on a disassembly level. The user can toggle between source and disassembly mode when execution of the program is stopped.

Run - or Single Step
All necessary execution commands are available in AVR Studio, both on source level and on disassembly level. The user can execute the program, single step through the code either by tracing into or stepping over functions, step out of functions, place the cursor on a statement and execute until that statement is reached, stop the execution, and reset the execution target. In addition, the user can have an unlimited number of code breakpoints, and every breakpoint can be defined as enabled or disabled. The breakpoints are remembered between sessions.

View all on-chip registers
The Source window gives information about the control flow of the program. In addition, AVR Studio offers a number of other windows which enables the user to have full control of the status of every element in the execution target. The available windows are:

Environment Setup saved on exit
The first time an object file is being executed, the user needs to set up the windows which are convenient for observing the execution of the program, thereby tailoring the information on the screen to the specific project. The next time that object file is loaded, the setup is automatically reconstructed.
 
See Also
Debug Platforms
Source Window
Simulator User's Guide
ICEPRO Emulator User's Guide
ICE200 Emulator User's Guide
Return to AVR Studio User's Guide