Adding a new source file to your project
There are several ways to add new source files to your project:
- You can drag and drop source files directly into a project, in the Project Explorer view of Arm® Development Studio.
- You can create source files, or drag and drop files directly into the project folder, using the file system. To update the views in Arm Development Studio, click the relevant project in the Project Explorer view, and from the main menu select File > Refresh.
- Or, you can do the following:
In the Development Studio perspective, right-click on the project and select New > Source File to display the New Source File dialog box.
Alternatively, from the main menu, select File > New > Source File.
Figure 2-5 Adding a new source file to your project
- Alternatively, from the main menu, select File > New > Source File.
- The Source folder field tells you the project where the new source file will be saved. If you want to save it to a different project, click Browse…, and select another project.
- In the Source file field, enter a name for the new source file and include the file extension.
Select a source file template from the Template drop-down list. The default options are:
- Default C++ source template
- Default C++ test template
- Default C source template
The default templates only provide basic metadata about the newly created file, that is, the author and the date it was created.
To use your own source file template, click Configure and the Code Templates preference panel opens, where you can add or configure your own templates.
Figure 2-6 Code template configuration
- Click Finish.
The new source file is visible in the Project Explorer view.