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 #19 background imageLoading...
Page #19 background image
During compilation, you may get tons of errors for hardware files that are not available in your target
STM8S micro. For instance, CAN hardware is not available in STM8S003K3 and so if you have added
CAN source and header files you will get an error for that. Once identified by the error messages, the
corresponding header and source files for that particular hardware must be removed.
Similarly, one more caution must be observed. Unless your code is using any interrupt, interrupt
source and header files (stm8s_it.h and stm8s_it.c) must be excluded. Sometimes it is better to add
only those files that you will need to complete a project. For example, if your project is just using
GPIOs, it is better to add GPIO files only along with stm8s.h and stm8s_conf.h. However, I recommend
this technique only after you have mastered STM8 coding well because in most cases you will need
multiple hardware which have dependencies on each other. As an example, when using SPI, you’ll
need both GPIO and SPI modules. If you understand these dependencies, it is okay to select files as
per need. You can, then, comment out unnecessary hardware module files specified in the stm8s.h
header file and get a faster compilation and build process. After compilation, you should always
build/rebuild your project by hitting the Build or Rebuild button. This will generate the final s19 output
file in either Debug or Release folder according to the generation mode selected. If things are in order,
there should be no error or warning message.
Lastly, I have not found any useful simulation software like Proteus VSM or Electronic Workbench that
support STM8 family. Thus, we have to debug our code in real-life with real hardware. It may sound
difficult but actually it is not so. We can, however, use such software to make models of STM8 micros
and make our PCBs. I don’t like simulations as they are not always accurate and real-world type.
One more advice I would like to give to the readers. Please read the SPL help file. It is located in the
SPL zip file under the name stm8s-a_stdperiph_lib_um.chm. It explains each function, definition, data
structure, all internal hardware modules and how to use them properly. This is a very important
document and your best friend in coding STM8 micros. Apart from this document the reference
manual is equally important as it details the capabilities of all internal hardware. I won’t be detailing
the internal hardware much as these docs will be doing so.

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