You copied the Doc URL to your clipboard.

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:

Procedure

  1. In the Development Studio perspective, right-click on the project and select New > Source File to display the New Source File dialog box.
    1. Alternatively, from the main menu, select File > New > Source File.

      Figure 2-5 Adding a new source file to your project

      Adding a new source file to your project

  2. 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.
  3. In the Source file field, enter a name for the new source file and include the file extension.
  4. Select a source file template from the Template drop-down list. The default options are:
    • <None>
    • 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

    Code template configuration

  5. Click Finish.

The new source file is visible in the Project Explorer view.