Installing Template Files in Atmel Studio 7

7 April 2016

Section 1.3 on page 26 of C Programming with Arduino describes the installation of template files. These template files are used in Atmel Studio 7 when following the code examples in the book. This article explains step by step how to install the template files for the Arduino Uno and Arduino MEGA in Atmel Studio 7.

Template Files Missing
Update 1 July 2016

Newer builds of Atmel Studio 7 have a Standard Mode and Advanced Mode. Template files installed in the folder described in the book only appear in the New Project dialog box when Atmel Studio is in Standard Mode. The toolbars will also look different between the two modes. Atmel Studio toolbars missing explains how to change modes.

Getting Templates to Appear in Advanced Mode

To get the template files to appear in the New Project dialog box when Atmel Studio is in Advanced Mode, copy the templates to Documents → Visual Studio 2015 → Templates → ProjectTemplates.

Or the full path: C:\Users\<your user name>\Documents\Visual Studio 2015\Templates\ProjectTemplates

Template Files Missing Update 2018
Update 2 April 2018

In Atmel Studio 7.0.1645 (published October 2017) the template files must be copied to Documents → Visual Studio 2015 → Templates → ProjectTemplates or the full path as shown above and no longer works as described on p26 of the book. Once copied to this destination the template files can be found in the new project dialog box when Atmel Studio is in either Standard mode or Advanced mode.

Essentially two zipped files are copied from the accompanying download from Elektor to a specific folder which Atmel Studio 7 searches in order to include any template files found in the new project dialog box. The tutorial steps that follow show exactly how to install the template files.

When a new project is started in Atmel Studio 7, the default New Project dialog box looks as follows.

Default Atmel 7 Studio New Project Dialog Box

Default Atmel Studio 7 New Project Dialog Box

After the template files have been installed, they will appear as options in the above dialog box.

1. Close Atmel Studio

Start by closing Atmel Studio. After copying the template files to the correct folder, Atmel Studio can be opened again and will find the new template files.

2. Download the Accompanying Files

Download the accompanying zip file from the C Programming with Arduino page at Elektor.

Scroll down the page to find the link to the download as shown in the image below.

The Accompanying Download on the Elektor Website Marked with a Green Dot

The Accompanying Download on the Elektor Website Marked with a Green Dot

3. Navigate to the Template Folder

The next step is to open the folder on the PC that the template files will be copied to. Open file explorer and select Documents to open the Documents folder.

Navigate to the Windows Documents Folder in File Explorer

Navigate to the Windows Documents Folder in File Explorer

As pointed out at the top of this article, some of the newer Atmel Studio builds need the template files to be copied to: Documents → Visual Studio 2015 → Templates → ProjectTemplates for them to appear in the New Project dialog box when Atmel Studio is in Advanced Mode.

Or the full path:
C:\Users\<your user name>\Documents\Visual Studio 2015\Templates\ProjectTemplates

Open the Atmel Studio folder inside the Documents folder. This folder is created when Atmel Studio is installed. Now open the Atmel Studio version number folder which is 7.0 in the case of Atmel Studio 7.

Open the Atmel Studio Version Number Folder

Open the Atmel Studio Version Number Folder

Inside the Atmel Studio version number folder, open the Templates folder and then the ProjectTemplates folder.

The Atmel Studio Templates Folder

The Atmel Studio Templates Folder

Inside the Atmel Studio Version Number Folder

Inside the Atmel Studio Version Number Folder

The ProjectTemplates folder is where the template files will be copied to. Leave this folder open in the Windows File Explorer.

Atmel Studio ProjectTemplates Folder

Atmel Studio ProjectTemplates Folder

4. Locate the Template Files

Open another instance of the Windows File Explorer by middle-clicking the currently open file explorer on the bottom Windows task bar and then clicking Downloads in the left pane of the new File Explorer window. Alternatively click the Windows Start button at the bottom left of the screen, then right-click File Explorer on the menu and left-click Downloads in the menu that pops up.

The file downloaded from Elektor should be found in the Downloads folder and is called arduino_c_source_code.zip as shown in the following image.

Windows Downloads Folder

Windows Downloads Folder

Double-click the arduino_c_source_code.zip file to open it and then open the Arduino_C folder inside the zipped file.

Open the Arduino_C Folder Inside the Zipped File

Open the Arduino_C Folder Inside the Zipped File

Locate the Templates folder at the bottom of the list of folders found inside Arduino_C and open it.

Locate and Open the Templates Folder

Locate and Open the Templates Folder

5. Copy the Template Files

Finally copy the two template files from the Templates folder to the ProjectTemplates folder that you opened in the first instance of file explorer. The copying can be done by dragging and dropping the files.

Copy the Template Files to ProjectTemplates

Copy the Template Files to ProjectTemplates

The two template files should now be found in the ProjectTemplates folder.

Template Files in the ProjectTemplates Folder

Template Files in the ProjectTemplates Folder

Both instances of Windows File Explorer can now be closed.

6. Open Atmel Studio

Atmel Studio can now be started again and should find the new template files.

7. Start a New Project

Start a new project and the two templates should be available in the New Project dialog box.

Arduino MEGA and Arduino Uno Templates in the Atmel Studio 7 New Project Dialog Box

Arduino MEGA and Arduino Uno Templates in the Atmel Studio 7 New Project Dialog Box