User manual

UM0036 STM8 C tutorial
Doc ID 7705 Rev 11 337/385
The working directory contains the following:
three files: main.c, and
for Cosmic: cosmic.stp, stm8_interrupt_vector.c
for Raisonance: raisonance.stp, R_stm8_interrupt_vector.c
and two folders: Debug and Release. These folders are the default locations for storing
your application and any intermediate files depending on whether you build using the
Debug or Release configuration.
Note: The workspace view tree does not necessarily reflect the directory tree on the disk.
Now that the workspace contains a project, you will notice that the build commands in the
Build menu are available (they are no longer gray). STVD automatically adds a minimal
main.c to allow a project to be built immediately after creation.
12.1.4 Add the source files
To build the application, you must identify the source files for STVD. The source files can be
written in either C or Assembler language. For standard installations of STVD these files are
located in C:\ProgramFiles\STMicroelectronics\st_toolset\stvd\Example\tutorial_stm8.
For this tutorial, the source files required are:
src/timer.c, src/mcuregs.h
cosmic/stm8_interrupt_vector.c, raisonance/R_stm8_interrupt_vector.c.
You can add files into your STVD project using one of the following methods:
Select Project>Insert Files Into Project from the main menu bar, then browse the file
to add. The file will be added at project's level; you may then move it into Source Files
or Include Files folder, or
Go into the STVD workspace window, right click on a folder (Source Files or Include
Files), then select Add file to folder and browse the file to add. It will directly be added
into the folder, or
Drag and drop files from an explorer window into the STVD workspace window.
You should add all required files into the workspace, in order to reach the state as depicted
below: