zephyr/ext/hal/st/stm32cube
Neil Armstrong cc9642402d ext: stm32cube: build I2C+RCC LL for STM32F0
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-12-12 12:36:08 -06:00
..
stm32f0xx ext: hal: stm32cube: HAL/LL static library for stm32f0xx v.1.9. 2017-10-23 12:31:47 +02:00
stm32f1xx ext: hal: stm32cube: Fix LSI_VALUE for F1, F3 families 2017-10-20 12:28:11 -05:00
stm32f3xx ext: hal: stm32cube: Fix LSI_VALUE for F1, F3 families 2017-10-20 12:28:11 -05:00
stm32f4xx stm32cube: Add impacted files in README Patch List 2017-09-25 12:31:59 -05:00
stm32f7xx stm32cube: Add impacted files in README Patch List 2017-09-25 12:31:59 -05:00
stm32l4xx stm32cube: Add impacted files in README Patch List 2017-09-25 12:31:59 -05:00
CMakeLists.txt ext: stm32cube: build I2C+RCC LL for STM32F0 2017-12-12 12:36:08 -06:00
Kconfig
README ext: hal: stm32cube: Update README with former fixups 2017-09-25 12:31:59 -05:00

README

How to introduce a new version of stm32cube:
============================================

Original STM32Cube tree structure has been modified to a minimum
structure for a better fit into Zephyr.
STM32Cube is divided into drivers and soc section, with:

drivers/
       include/ contains Cube HAL/LL files from:
       STM32Cube_FW_F1_VX.X.X/Drivers/STM32YYxx_HAL_Driver/Inc/*
       src/ contains:
       STM32Cube_FW_F1_VX.X.X/Drivers/STM32YYxx_HAL_Driver/Src/*
soc/ contains STM32 CMSIS files from
       *STM32Cube_FW_F1_VX.X.X/Drivers/CMSIS/Device/ST/STM32F1xx/Include/*
       *STM32Cube_FW_F1_VX.X.X/Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/system_stm32f1xx.c

One file needs to be renamed:
driver/include/stm32f1xx_hal_conf_template.h
into:
driver/include/stm32f1xx_hal_conf.h

IMPORTANT:
----------
STM32Cube, as an external library, is not supposed to be modifid.
In practice, it might be required to patch it
When updating a STM32Cube package to a new version, please have a look
to the patch list in dedicated README file, to make sure you don't overwrite
some earlier modifications of the package.
In case of doubt, contact Zephyr code owner for stm32cube.


How to use STM32Cube:
=====================
In order to enjoy ST CMSIS definitions:
    *CONFIG_HAS_STM32CUBE should be defined
    *stm32yyxx.h should be included in soc.h
       **E.g.: #include <stm32f1xx.h>

In order to use STM32Cube HAL, these files should be compiled:
In /ext/hal/st/stm32cube/Kbuild :
obj-y += stm32yyxx/drivers/src/stm32yyxx_hal.o
obj-y += stm32yyxx/drivers/src/stm32yyxx_hal_rcc.o
obj-y += stm32yyxx/soc/system_stm32yyxx.o
Plus add HAL driver file (when needed):
obj-$(CONFIG_SERIAL_HAS_DRIVER) += stm32yyxx/drivers/src/stm32yyxx_hal_uart.o


Additionally, in order to use STM32Cube LL (when needed):
    *include stm32yyxx_ll_usart.h in soc.h
       **E.g.: #include <stm32f1xx_ll_usart.h>