User manual

UM0036 Project creation and build
Doc ID 7705 Rev 11 83/385
4.3.3 Adding and removing folders and files
Projects contain the files that you will use to build your application. These can be organized
in folders. By default, projects contain the following folders:
Source Files — this folder contains the source files (.asm, .c, .s) that you identify for
the building of your application.
Include Files — this folder contains header files required to build your source code.
These files are specified by the include statements in your project settings.
External Dependencies — this folder contains any dependencies specified by the
source files or the toolset. The folder’s contents are updated automatically and cannot
be modified by the user.
Adding folders
You can create your own folders in your project to create a virtual project structure that will
help you organize the links to your source files. Folders can be created in the project or in
any folder except the Dependencies folder.
To add folders to your project or in another folder:
1. Right-click on the project or on the folder to get the contextual menu. In the contextual
menu, select New Folder.
The New Folder dialog box opens.
2. Enter the name for the folder in the provided field and click on OK.
The folder is added to your project.
Adding files
To add source files to the source folder:
1. Right-click on the folder to get the contextual menu. From the menu, select Add Files
to Folder.
A browse window opens.
2. Select the file(s) you want to add to the folder and click on Open.
STVD will not allow you to add a file to a project if the project already contains a file with
the same path name. Files with the same name can be added to the same project it
they have different paths. A workspace may contain files with the same path name, as
long as they are in different projects.
The folder contextual menu also offers the Add Sorted Elements option. When this option
is checked, STVD protects the order of the files in the project. Upon build, the command
lines for the source files are executed in the same order as the files in the project from the
top (first) to the bottom (last). When this option is checked, STVD will not allow you to
change the order of the files. If you disable this option, change the order, and then reactivate
this option, STVD will maintain the new ordering of the files. This option is important when
using the ST Assembler/Linker toolset, which is sensitive to the ordering of source files upon
assembly (see Ordering source files before assembly on page 88).
4.4 Project build configurations
Once you have set up your project with the source files to build your application, you are
ready to configure your project for building. STVD offers extensive customizations for the
supported toolsets via the Project Settings window. In addition, these settings can be