En - stm32 Embedded Software Offering
En - stm32 Embedded Software Offering
Overview
STM32 Embedded Software Offer 2
Abstraction
Level
Virtual Machines
with partners
.Net, Java
Mbed Core
« C » partners
Micrium, SEGGER,
STM32Cube HAL HCC, ….
Standard Peripheral
Libraries
STM32Cube LL
STM32Snippets
STM32 Device STM32 Series and/or STM32 Series STM32 Family Cortex-M based Any MCU Beyond MCU
-specific Device-specific -specific -specific MCUs world
f.i.: STM32F072 f.i.: STM32F1 -specific
Portability Level
ST Offering. Free
Partners Offer
3
• What is it ?
• A collection of code examples, directly based on STM32 peripheral registers, available in documentation and as
softtware bundles
• Targe Audience
• low level embedded system developers, typically coming from an 8 bit background, used to assembly or C with little
abstraction
• Features: • Limitations:
• Highly Optimized • Specific to STM32 devices, not portable directly between
• Register Level Access series
• Closely follows the reference manual • Lack of abstraction means developers must understand
peripheral operation at register level
• Debugging close to register level
• Available (today) on STM32 L0 and F0 series
Optimization
Portability Easy Readiness Hardware coverage
(Memory & Mips)
+++ +
Standard Peripheral Libraries (SPL) 5
• What is it ?
• Collection of C Libraries covering STM32 peripherals
• Target Audience
• Embedded systems developers with procedural C background. All existing STM32 customer base prior to the
STM32Cube launch, willing to keep same supporting technology for future projects, and same STM32 series.
• Features: • Limitations:
• Average optimization, fitting lots of situations • Specific to certain STM32 series.
• No need for direct register manipulation • No common HAL API prevents application portability between series
• 100% coverage of all peripherals • Middleware libraries may not be unified for each series
• Easier debugging of procedural code • Doesn’t support forward STM32 series starting with STM32 L0, L4
• Extensions for complex middleware such as and F7
USB/TCP-IP/Graphics/Touch Sense
Optimization
Portability Easy Readiness Hardware coverage
(Memory & Mips)
++ ++ + ++ +++
STM32Cube - Embedded software 6
Introduction
• What is it ?
• Full featured packages with drivers, USB, TCP/IP, Graphics, File system and RTOS
• Set of common application programming interfaces, ensuring high portability inside
whole STM32 family
• Set of APIs directly based on STM32 peripheral registers
• Set of initialization APIs functionally similar to the SPL block peripheral initialization
functions
STM32Cube
• Target Audience STM32Cube STM32Cube
HAL LL APIs
• Hardware Abstraction Layer (HAL) APIs: embedded system developers with a strong
structured background. New customers looking for a fast way to evaluate STM32 and
easy portability
• Low-Layer (LL) APIs: low level embedded system developers, typically coming from an
8-bit background, used to assembly or C with little abstraction. Stronger focus on
customers migrating from the SPL environment.
STM32Cube - Embedded software 7
Architecture overview
• Three entry points for the user application:
User code
• Middleware stacks
• HAL APIs STM32Cube Embedded Software packages
• LL APIs
HAL APIs
• Features:
• High level and functional abstraction
• Easy port from one series to another
• 100% coverage of all peripherals
• Integrates complex middleware such as USB/TCP-IP/Graphics/Touch Sense/RTOS
• Can work with STM32CubeMX to generate initialization code
STM32Cube
• Limitations: STM32Cube
HAL
STM32Cube
LL APIs
• May be challenging to low level C programmers in the embedded space.
• Higher portability creates bigger software footprints or more time spent executing
adaptation code
Optimization
Portability Easy Readiness Hardware coverage
(Memory & Mips)
+++ + ++ +++ +++
STM32Cube - Embedded software 9
Low-Layer APIs
• Features:
• Highly Optimized • Peripheral block initialization APIs
• Register Level Access • Initialization, de-initialization and
default initialization routines
• Small code expressions
• SPL-Like functionally speaking
• Closely follows the reference manual
• More optimized than SPL, fitting
• Debugging close to register level lots of situations
• Can work with STM32CubeMX to generate • No need for direct register STM32Cube
initialization code for STM32L0/F0/F3/L4. manipulation STM32Cube STM32Cube
More to com soon • Easier debugging of procedural HAL LL APIs
code
• Limitations:
• Specific to STM32 devices, not portable directly between series
• Not matching complex peripherals such as USB
• Lack of abstraction for runtime means developers must understand peripheral operation at register level
• Peripheral block initialization APIs have the same limitations as the SPLs (except availability considerations)
Optimization
Portability Easy Readiness Hardware coverage
(Memory & Mips)
+ +++ + ++ ++
ST Embedded software offer – Comparison 10
Optimization Hardware
Offer Portability Easy Readiness
(Memory & Mips) coverage
STM32Snippets +++ +
Standard Peripheral
++ ++ + ++ +++
Library
HAL
STM32Cube +++ + ++ +++ +++
APIs
LL APIs + +++ + ++ ++
ST Embedded software offer – Positioning 11
Abstraction
Level
USB FAT
TCP/I
TCP/I USB FAT Host / Gfx File RTOS Touch
RTOS P
P Host / File Touch Device Sys.
Device Gfx Sys.
STM32Cube HAL
(Hardware Abstraction Layer)
Standard Peripheral Libraries
STM32Cube LL
(Low-Layer APIs)
STM32Snippets
Portability Level
STM32 Device STM32 Series
STM32 Family (HAL)
-specific -specific
f.i.: STM32F072 f.i.: STM32F1 STM32 Series and/or
Device-specific (LL)
Availability 12
STM32Snippets Now N.A. N.A. N.A. N.A. N.A. N.A. Now N.A. N.A.
Standard Peripheral
Now Now Now Now Now N.A. N.A. N.A. Now N.A.
Library
STM32Cube HAL Now Now Now Now Now Now Now Now Now Now
STM32Cube LL Now Now Now Now Now Now 2018 Now Now Now
What solution to choose ? An FAQ 13
To
Easy within same STM32 series HAL API: No simple migration path.
Ex: Between STM32F072 and STM32F030 Application must be rewritten
No simple migration path. Application must
STM32Snippets
be rewritten
Almost not possible between Low-Layer API: Easy within same STM32
different series series
Ex: Between STM32F072 and STM32L053 Ex: Between STM32F072 and STM32F030
Easy within same STM32 series HAL API: No simple migration path.
Ex: Between STM32F401 and STM32F429 Application must be rewritten
Standard Peripheral Some (but not all) SPL functions
Library (SPL) can be replaced with Snippets
Difficult between different STM32 series LL API: functionally equivalent functions vs
Ex: Between STM32F100 and STM32F407 SPL peripheral initialization functions
Some (but not all) HAL functions No simple migration path. Application must
STM32Cube HAL API HAL: Yes, across all STM32 families
can be replaced with Snippets be rewritten
embedded
software LL calls equivalent to snippets SPL block peripheral initialization functions LL API: Difficult between different STM32
package LL API when addressing the exact same have functionally equivalent functions in series
peripheral LLs Ex: Between STM32F407 and STM32L476
Thank you 15
www.st.com/stm32embeddedsoftware