2.6 Creating a New Project

This section will outline the process of creating a new Microchip Studio project.

Getting Started Topics

Video: Create New Project

Todo: Create a new bare-metal GCC C Executable project for the ATtiny817 device.
  1. Open Microchip Studio.
  2. In Microchip Studio, go to File → New → Project as depicted in Figure 2-2.
    Figure 2-2. Creating a New Project in Microchip Studio
  3. The project generation wizard will appear. This dialog provides the option to specify the programming language and project template to be used. This project will use C, so make sure to select C/C++ in the upper left corner. Select the GCC C Executable Project option from the template list to generate a bare-bones executable project. Give the project a Name and click OK. See Figure 2-3.
    Figure 2-3. New Project Programming Language and Template Selection
    Tip: All Microchip Studio projects belong to a solution, and by default, Microchip Studio will use the same name for both the newly created project and solution. Use the solution name field to specify the solution name manually.
    Tip: The create directory for solution check box is checked by default. When this box is ticked, Microchip Studio will generate a new folder with the specified solution name at the location specified by the Location field.

    About Project Types

    Table 2-1. Project Types
    CategoryProject TemplatesDescription
    CAVR XC8 C Appliction Project

    Select this template to create an AVR 8-bit project configured to use the MPLAB XC8 compiler

    CAVR XC8 Library ProjectSelect this template to create an AVR 8-bit MPLAB XC8 static library(LIB) project. Use this pre-compiled library (.a) to link to other projects (closed source) or reference from applications that need the same functionality (code reuse).

    C/C++

    GCC C ASF Board Project

    Select this template to create an AVR 8-bit or AVR/Arm 32-bit ASF3 Board project. Choose between the different boards supported by ASF3

    C/C++

    GCC C Executable Project

    Select this template to create an AVR 8-bit or AVR/Arm 32-bit GCC project

    C/C++

    GCC C Static Library Project

    Select this template to create an AVR 8-bit or AVR/Arm 32-bit GCC static library(LIB) project. Use this pre-compiled library (.a) to link to other projects (closed source) or reference from applications that need the same functionality (code reuse).

    C/C++

    GCC C++ Executable Project

    Select this template to create an AVR 8-bit or AVR/Arm 32-bit C++ project

    C/C++

    GCC C++ Static Library Project

    Select this template to create an AVR 8-bit or AVR/Arm 32-bit C++ static library (LIB) project. Use this pre-compiled library (.a) to link to other projects (closed source) or reference from applications that need the same functionality (code reuse).

    Assembler

    Assembler Project

    Select this template to create an AVR 8-bit Assembler project

    CategoryProject TemplatesDescription
    Attention: This table only lists the default project types. Use extensions to add other project types.
  4. Next, specify which device the project will be developed for. You can scroll through a list of devices presented in the Device Selection dialog, as depicted in Figure 2-4. Use the Device Family drop-down menu or the search box to narrow the search. This project will be developed for the ATtiny817 AVR device, so enter '817' in the search box in the top right corner. Select the ATtiny817 entry in the device list and confirm the device selection by clicking OK.
    Figure 2-4. New Project Device Selection
    Tip: A search for 'tiny' will provide a list of all supported ATtiny devices. A search for 'mega' will provide a list of all supported ATmega devices. Tools → Device Pack Manager can be used to install support for additional devices.
Result: A new GCC C Executable project is created for the ATtiny817 device. The Solution Explorer will list the content of the newly generated solution, as depicted in Figure 2-5. If not already open, it can be accessed through View → Solution Explorer or by pressing Ctrl+Alt+L.
Figure 2-5. Solution Explorer