STM32F10x
Firmware Library
The firmware library is supplied in one single zip
file. The extraction of the
zip file generates one folder, STM32F10xFWLib, which contains the
following subfolders:

STM32F10x Firmware Library folder
Structure
examples
folder
This Examples folder contains, for each peripheral
sub-folder, the minimum set of files needed to run a typical example on
how to use a peripheral:
readme.txt: brief
text file describing the example
and how to make it work.
stm32f10x_conf.h:
header file allowing to configure the
peripherals that are used, and containing miscellaneous DEFINE
statements.
stm32f10x_it.c:
source file containing the interrupt handlers
(the function bodies may be emptied if not used).
stm32f10x_it.h:
header file ncluding all interrupt handler
prototypes.
main.c:
example of code.
platform_config.h: STMicroelectronics Evaluation board specific configuration file.
library
folder
The Library folder contains all the subdirectories and files that make
up the core of the library:
inc
sub-folder
contains the firmware library header files. They do not need to be
modified by the user:
stm32f10x_type.h:
common data types and enumeration used in all other files.
stm32f10x_map.h:
peripherals memory mappings and registers data structures.
stm32f10x_lib.h:
main header file including all other headers.
stm32f10x_ppp.h
(one header file per peripheral): Function prototypes, data structures
and enumeration.
cortexm3_macro.h:
header file for cortexm3_macro.s.
src sub-folder contains
the firmware library source files. They do not need to be modified by
the user:
stm32f10x_ppp.c
(one source file per peripheral): function
bodies of each peripheral.
stm32f10x_lib.c:
all peripherals pointers initialization.
All
library files are coded in Strict ANSI-C and are independent from the
software toolchain.
project
folder
The Project folder contains a standard template project program that
compiles all library files plus all the user-modifiable files that are
necessary to create a new project:
stm32f10x_conf.h:
configuration header file with all peripherals defined by default.
stm32f10x_it.c:
source file containing the interrupt handlers (the function bodies are
empty in this template).
stm32f10x_it.h:
header file including all interrupt handlers prototypes.
main.c:
main program body.
EWARM, RVMDK, RIDE, HiTOP:
it is used by
the toolchain, and refers to the readme.txt file located in the same
folder. Two
workspaces are provided for each project template:
-
STM3210B-EVAL: to configure the project for STM32 Medium-density devices
-
STM3210E-EVAL: to configure the project for STM32 High-density devices
What do I need to start successfully with Examples
Hardware platform: STMicroelectronics STM3210B-EVAL and STM3210E-EVAL evaluation boards or you can use any
other
hardware.
Software Environment: Use your preferred tool chain.
How to proceed Hardware platform set-up: when using STMicroelectronics
evaluation board you have to select the right board by uncommenting the
corresponding line in
platform_config.h file. Otherwise, adapt your the firmware
according to your hardware.
Copy the preconfigured project provided within
STM32F10xFWLib\FWLib\project to the example directory you want to use.
This
project folder contains already all
tool chain startup files needed for creating projects for STM32
microcontrollers.
As the preconfigured project by default compiles all library files and
all these files path are changed, you will need to remove all these
files from the project. For the
selected example, you have to add the needed FWLib source
files according to the “How to use it”
section of the readme file. Open the Project options
and update the Compiler include path; example relative
path and library\inc
Select the Project workspace according to your hardware and STM32 products
Finally compile, load and run the example
|