Creating a project

The following steps will create a new Project for AVR Cross Target development.

To create a project for the AVR Target:

  1. Select File > New > Project.


  2. In the new Project Wizard select the type of project to create. For this tutorial, expand the C folder and select C Project.


    The C Project wizard opens:

    New C Project Wizard Page

    The AVR Plugin provides two new project types:

    AVR Cross Target Application Project suitable for applications that can be loaded onto an AVR device.
    AVR Cross Target Static Library Project suitable for building a static library of commonly used functions, which can be linked into applications

    Some other project types such as Executable may show up, depending on wich other toolchains have been installed.

  3. For this tutorial we will build an application so select AVR Cross Target Application

  4. Enter a project name (e.g. "AVRtest") into the Project name field.

  5. Click Next >


    Now the automatic build configurations can be selected.



    A Configuration is a collection of options and settings for building the project. The AVR Plugin has two default configurations:

    Debug Settings suitable for debugging the application in a simulator.
    Release Settings suitable for generating the hex dump files which can be downloaded to the actual device.

    Other configurations can be created, either at this point via the Advanced settings... button or anytime later once the project has been created. The configurations can be used to apply specific options to the project. For example, to build the same sources for different target MCUs or different target hardware clocks create multiple new configurations, e.g. "ATmega16_1Mhz" and "ATmega32_4Mhz", and configure each with the required settings.

    The options and settings for each configuration can be changed with the Advanced settings... button or, once the project has been created, via the project properties.

    How to select the different configurations for a build will be shown later in this tutorial.
  6. Click Next >.

    On the next page the target processor and its target clock frequency can be selected.



    Two items specific to the AVR processors can be changed.
    MCU Type Select the target processor for your project out of the list of selected processor types. This setting is used by some tools of the toolchain to generate the correct code for the target processor.
    MCU Frequency Select the target clock frequency for your project. This is just passed on to the compiler as a #define F_CPU <MCU Frequency> , which programms requiring exact timing can use for their internal timing calculations.
    The values for MCU type and MCU frequency can later be changed via the project properties.

    For now we leave the defaults and

  7. Click Finish

    If a message box prompts you to change perspectives, click Yes.
Your new project displays in the C/C++ Projects view, and in the Navigator view. Your project is empty because you have not yet created files for your project. You can now start writing the code for your first program.

Tip: You can view and modify the properties of your project by right-clicking on the project in the Project Explorer view and clicking Properties (or press Alt+Enter with the project selected).

Next: Creating a sample AVR C File

Related Tasks
Change AVR Target Hardware