SAM D5x/E5x Project Templates

The project template system simplifies the creation of new projects with the IDE, it also system makes it easy to create new projects with a text editor or script. All that needs to be specified is the project name, the support packages that the project is dependent on, the target processor and the source files you want to add to the project. For example, create a file called example.hzp with the following contents:

<!DOCTYPE CrossStudio_Project_File>
<solution Name="Example Solution">
  <project Name="Example Project" template_name="SAM_D5x_E5x_EXE">
    <configuration Name="Common" package_dependencies="SAM_D5x_E5x" Target="ATSAME54P20A" />
    <folder Name="Source Files">
      <file file_name="file1.c" />
      <file file_name="file2.c" />
    </folder>
  </project>
</solution>

You can also add any other property settings that the project requires such as preprocessor definitions or include paths using the property save name, for example:

<!DOCTYPE CrossStudio_Project_File>
<solution Name="Example Solution">
  <project Name="Example Project" template_name="SAM_D5x_E5x_EXE">
    <configuration Name="Common" package_dependencies="SAM_D5x_E5x" Target="ATSAME54P20A" c_preprocessor_definitions="MYDEF1=1;MYDEF2=TWO" c_user_include_directories="$(ProjectDir)/include1;$(ProjectDir)/include2" />
    <folder Name="Source Files">
      <file file_name="file1.c" />
      <file file_name="file2.c" />
    </folder>
  </project>
</solution>
Available SAM D5x/E5x project templates
Template NameTemplate Description
SAM D5x/E5x_ASM_EXESAM D5x/E5x Assembly Code Only Executable
SAM D5x/E5x_CTL_EXESAM D5x/E5x CTL Executable
SAM D5x/E5x_EXESAM D5x/E5x C/C++ Executable
SAM D5x/E5x_EXT_EXESAM D5x/E5x Externally Built Executable
SAM D5x/E5x_LIBSAM D5x/E5x Library