User manual

STM8 C tutorial UM0036
338/385 Doc ID 7705 Rev 11
Figure 267. Project with source file and dependencies
RESULT:
Your project workspace now contains the application source code file. Any dependencies
specified in the source code are displayed in the External Dependencies folder. The list of
external dependencies is built by a dedicated call of the compiling toolset, after each
modification of the project files list.
The file main.c, which was automatically added by STVD, will be removed later.
12.1.5 Create a folder to organize files in the project
The default main.c created by STVD does not fit our needs. The main function is defined in
timer.c.
1. Right-click on the project and select New Folder from the contextual menu.
2. Enter the name “Obsolete” in the Name of the New Folder field.
3. Click on OK to create the folder and close the window.
4. Drag and drop main.c from Source Files folder to Obsolete folder.
5. Both main.c and timer.c are still part of the project, as a result any build attempt at this
stage fails because of multiple main function definitions.