1. Create a new 1 Project catalogue, depending on the project name
2. In the above-mentioned catalogue, 1 new directories named STVD, which are named after we use ST's official development environment to create new projects.
3. It is important to create a new directory named Cosmic in the STVD directory, which is a directory of compilers and engineering settings.
4. Within the STVD directory, the same new two directories, named Lib and SRC, are the library file directory, which writes the source file path for itself.
5. Create a new two subdirectory named Inc and SRC within the Lib directory.
6. Copy the INC and SRC directories of the latest version of the library files downloaded to the St official website to the STVD Lib directory, as described in the following figure.
7. After copying the library file, the Stvd\lib\inc directory is as follows
8. After copying the library file, the STVD\LIB\SRC directory is as follows
9. Open Stvd,new->workspace
10. Modify the path of the workspace for our own new stvd\cosmic.
11. The project name, path, compiler settings are as follows
12. Choose the MCU you use, this step is very important, the wrong choice is not fun.
13. At this point, the STVD opens as shown in the following figure. Save the project, File->close workspace to close the project.
14. The cosmic directory at this time is shown in the following image
15. Cut the Main.c file in the Cosmic directory into the STVD\SRC directory, which is our own directory to write the program.
16. The cosmic directory at this time is shown in the figure below, note that the stm8_interrupt_vector.c file is still placed in the cosmic directory.
17. Copy the Stm8l101x_conf.h file to the STVD\SRC directory by following the path from the library below the St official web site.
18. After copying the STVD\SRC path as shown in the following figure.
19. Drag the Stvd\cosmic\*.stw file into the development environment, will automatically prompt to find the main.c file, which is right ~. I moved it to the place. Click Yes.
20. At this point, the open project is shown in the following figure.
21. Add all the files within the STVD\SRC\MAIN.C and STVD\LIB\SRC paths to the source files; Stvd\src\stm8l10x_conf.h and stvd\lib\ All files within the INC path are added to the include file. Thereafter, the path is shown in the following figure.
22. Write the main.c file as required. This example is written as follows. F7 compile a bit.
23. Confirm that there are no warnings and errors.
23.tools->option to change an environment setting, as shown below.
--------------------------------------------------------------------------------------------------------------- -------------------
Do the above as a standard.