EasyManuals Logo

STMicroelectronics STM8 User Manual

STMicroelectronics STM8
126 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #13 background imageLoading...
Page #13 background image
I wrote this article using SPL since it will be ridiculous to code STM8s using the old-fashioned way of
configuring registers one-by-one manually. Thus, it is a mandatory download item. You should
preserve and retain the downloaded SPL zip file fully intact. You may need it when things get messy.
Now make two folders and name them “inc” and “src”. The “inc” folder will be filled with all the header
files (“.h” extension files) from the extracted zip file. Similarly, the “src” folder will be holding the
source files (“.c extension files). For ease of work, it is better to keep these folders secured just like
the SPL zip file because every time when we will be making new projects the files in these folders will
be needed. You can copy these files to your project folder or you can keep it centrally somewhere. I
prefer the former method as doing so will not have any conflicting issue with other projects needing
modifications. However, it will cost hard-drive space. This method is however less confusing and
trouble-free for beginners. Extract all the files as shown below:
Note that there are more header files than source files. This is because there are two extra header
files stm8s.h and stm8s_conf.h that define processor type and processor properties. To make things
work, we will have to comment one line of the stm8s_conf.h. You will find a line at the bottom of this
file written as:
#define USE_FULL_ASSERT (1).
You need to comment or disable this line, otherwise the compiler will throw tons of error messages.
Always check this at the start of a project. Surely, we don’t want to assert our code.

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the STMicroelectronics STM8 and is the answer not in the manual?

STMicroelectronics STM8 Specifications

General IconGeneral
BrandSTMicroelectronics
ModelSTM8
CategoryMicrocontrollers
LanguageEnglish

Related product manuals