EDITORIAL:
This series is intended to summarize the study, because it is a personal summary, if wrong, please correct me, but also welcome to study and discuss together.
First, a little bit long-winded
- Board chip using a STM8L051 (because of cheap);
- Development environment using a EWSTM8 (full handy), belonging to the IAR's a product
- EWSTM8 use, on their own Google, forget or give a link to it: Tutorial Gangster
- Library Download: so much of what you've seen, to learn to go to the official website to download information on ST
- Because the contrast is learning, so the configuration of the library functions will now ended up with the same configuration register operation
- Learning from the first chapter (a)
- This chapter over the map, Shen Ru! ! !
Second, prepare for work
After the establishment of the project folder, the following
article before the bat garbage can be seen: Bat ---- DOS batch file commands
Then individual files:
Ah, ah, because there is no official repository stm8 CMSIS this file, which is stored only in the Libraries folder is FWlib, like this:
Libraries folder, and if the register operation, then there is no need to add him
Third, the project configuration
Forehead, like a small link to the third paragraph of a big point given above, where there are taught how to build the project, so do not talk about it; it's important to pick something
after you create the project and add the appropriate files can be done (with register, you do not add FWlib files and subfolders under)
- Why is stm8l15x? Because stm8l series of basic share; do not believe you
And the library extract out only this
- Why some are in front of the file icon is gray? That's because some files do not need, do not let the compiler does not need to compile files, so you can save compile time (you will find a big project build time will be very long); how to set? Right correspondence does not need to compile files point Options ...
and then in the pop-up window that point, and then click OK
Third, the library for special operations
Get that done after the above operation, if using a library function, then to enter it here
"STM8L05X_LD_VL"
This is how come it? Open the "stm8l15x.h" drop-down look to find this, and then copy the appropriate configuration into the inside of the line (meaning are explained later), but you can also remove the corresponding comment, but, hey, did not see a behind [ RO] no, he can only read, it becomes possible to remove comments which have to change it in the property