English
Language : 

AN2776 Datasheet, PDF (6/20 Pages) STMicroelectronics – The purpose of this application note is to explain
FWLib V1.0 to V2.0 migration steps
2
FWLib V1.0 to V2.0 migration steps
AN2776
This section describes how to migrate an application based on FWLib V1.0 to V2.0.
2.1
Migration steps
To update your application code to run on FWLib V2.0, you have to follow the steps listed
below:
1. Update the toolchain startup files
a) Project files: device connections and Flash memory loader. These files are
provided with the latest version of your toolchain that supports High-density and
Medium-density STM32F10xxx devices. For more information please refer to your
toolchain documentation.
b) Linker configuration and vector table location files. These files are included in the
FWLib V2.0 install package under the following directory:
STM32F10xFWLib\FWLib\project
2. Add FWLib V2.0 source files to the application sources
a) Replace the stm32f10x_conf.h file of your application with the latest version
provided in FWLib V2.0.
b) The stm32f10x_it.c/stm32f10x_it.h files that contain the peripheral ISRs
(interrupt service routine), have been updated to support the new peripherals and
the IRQ channel updates of existing peripherals.
You have to replace the existing stm32f10x_it.h file in your application with the
new version provided in FWLib V2.0 and, copy your code from the existing
stm32f10x_it.c file to the new one.
c) Update the part of your application code that uses the TIM, SPI, DMA, USART
and NVIC drivers. Further details are provided in the next section.
2.2
Note:
2.2.1
Peripheral driver updates
This section describes how to port an application code based on the FWLib V1.0 TIM, SPI,
DMA, USART and NVIC drivers to FWLib V2.0.
In all examples listed below, source code changes between FWLib V1.0 and V2.0 are
indicated in italic and bold.
NVIC
Due to a different number of DMA and ADC peripherals in Medium-density and High density
devices, NVIC-related code was modified between FWLib V1.0 and FWLib V2.0. These
changes concern DMA and ADC interrupts.
6/20