Register to Library "comparative study", from entry to give up (zero)

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

  1. Board chip using a STM8L051 (because of cheap);
  2. Development environment using a EWSTM8 (full handy), belonging to the IAR's a product
  3. EWSTM8 use, on their own Google, forget or give a link to it: Tutorial Gangster
  4. Library Download: so much of what you've seen, to learn to go to the official website to download information on ST
  5. Because the contrast is learning, so the configuration of the library functions will now ended up with the same configuration register operation
  6. Learning from the first chapter (a)
  7. This chapter over the map, Shen Ru! ! !

Second, prepare for work

After the establishment of the project folder, the following
Here Insert Picture Description
article before the bat garbage can be seen: Bat ---- DOS batch file commands

Then individual files:
Here Insert Picture Description
Ah, ah, because there is no official repository stm8 CMSIS this file, which is stored only in the Libraries folder is FWlib, like this:
Here Insert Picture Description
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)
Here Insert Picture Description

  • Why is stm8l15x? Because stm8l series of basic share; do not believe you

Here Insert Picture Description
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 ...
    Here Insert Picture Description
    and then in the pop-up window that point, and then click OK
    Here Insert Picture Description

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"
Here Insert Picture Description
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
Here Insert Picture Description

Guess you like

Origin blog.csdn.net/qq_42992084/article/details/89762521