Getting Started with Avrora

Trying out Avrora is quick and easy for any platform! See the steps below for steps to get started with the basic capabilities of Avrora.


Step 0: Get Java!

Avrora is implemented in Java, and therefore it requires that you have a functional Java Virtual Machine installed. Once the JVM is installed and you are able to run java at the command line, you're ready to continue to the next step.

Freely available Java Virtual Machine implementations are available from both Sun Microsystems and IBM.

Avrora is not dependent on the particular Java implementation that you choose.


Step 1: Download the JAR Archive

The Java platform allows applications to be bundled into compressed archives called JARs that require minimal effort to download and use. Applications can be run directly from a JAR file, requiring no compilation, installation, or configuration steps. The first step to trying out Avrora is to download the latest JAR archive release. Simply save the JAR file to your disk, and you are ready to run.


Step 2: Format Your Program Appropriately

Avrora supports three types of program formats:
  1. The Atmel assembler syntax. Files that end with the .asm extension are assumed to be in this format. Files in this format can be loaded directly by Avrora.
  2. The GNU assembler (GAS) syntax. Files that end with the .s extension are assumed to be in this format.
  3. The output of the avr-objdump utility. Files that end with the .od extension are assumed to be in this format. Avrora cannot directly load ELF or SREC images, therefore binary programs in those formats must be converted to a textual format with avr-objdump. For more information, see the page on objdump.

Here are a couple of example programs that can you download and try out:

  • simple.c -- very simple C program source.
  • simple.od -- C program converted to objdump format.
  • blink.od -- a TinyOS program compiled to the ELF format and disassembled with avr-objdump.


Step 3: Running Avrora

Avrora is based on a command-line interface. To invoke Avrora, you need only run the java command and use the -jar option to specify the location of the Avrora JAR file. Running avrora with no options will print out the built-in help. You should make an alias to avrora such as:

% alias avrora='java -jar avrora-beta-1.6.0.jar'

Now, let's use Avrora to execute one of the example programs. Download simple.od and execute it on Avrora.

  1. If Avrora's colored output causes problems with your terminal, you can disable terminal colors by specifying the -colors=false option. You can also specify the -foreground-color=black or -light-background options.
  2. Avrora's banner is printed by default every time Avrora is invoked. To turn it off, specify -banner=false.

Now, let's try running the blink.od file. This is a dump of the Blink TinyOS program which toggles the red LED once a second. Notice that we to specify the mica2 platform so that the hardware devices, including the LEDs are appropriately configured and connected.

  1. The simulation output comes out must faster than real-time in the case of Blink, since the simulator optimizes periods of sleep. To reduce the speed of the simulator to no more than real-time speed, specify the -real-time option.

For more information about how to use the simulator effectively, go to the page about simulation.


Learning More Tricks: Avrora Actions

Avrora is designed so that it is given a program as input and an option to select what action should performed on the program. This option is -action, and its default value is simulate. Actions can do many things, from analyzing the program, executing the program, diagramming the program, etc. For more information on the available actions, you can view the online help or learn how to extend Avrora with your own actions.

You can access the help for a specific action by specifying the -help option followed by the name of the action. For example, to get the help for the simulate action, you can see this page.