보통 STM32를 F/W를 개발할 때 HAL(Hardware Abstraction Layer) driver를 사용하는데, 이 driver 말고도 아래와 같이 다양한 library가 있다.
ST에서 제공하는 library는 아래와 같다.
1. STM32Snippets
2. STM32 Cube LL(low layer)
3. Standard Peripheral Library
4. STM32Cube HAL
X. Mbed Core(32비트 ARM Cortex-M 마이크로 컨트롤러 개발을 위한 인터넷 플랫폼 및 온라인 운영 체제)

1. STM32Snippets
STM32 주변 레지스터를 직접 기반으로 하는 코드 예제 모음
- Highly Optimized : 최적화
- Register Level Access : 이기 때문에
- Small code expressions : 코드 사이즈 최소화
- Lack of abstraction means developers must understand peripheral operation at register level
2. STM32 Cube LL(low layer)
- Highly Optimized : 최적화
- Register Level Access : 이기 때문에
- Small code expressions : 코드 사이즈 최소화
- Can work with STM32CubeMX to generate initialization code for STM32L0/F0/F3/L4
3. Standard Peripheral Library
STM32Cube 출시전의 library
- No need for direct register manipulation : 간접 제어
- 100% coverage of all peripherals
- Doesn’t support forward STM32 series starting with STM32 L0, L4 and F7 : 이제 지원 안함
4. STM32Cube HAL(Hardware abstraction layer)
MCU를 제어할 때, 내부 register를 직접 제어(심지어 bit 세팅) 해야 하지만, HAL Driver를 사용할 경우 Register 제어가 library화 되어 있어 쉬우며, CubeMX를 사용할 경우 그래픽으로 시각화 하여 몇가지 설정만으로 기본 소스 코를 자동 생성되므로 쉽게 설정이 가능
- 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
- Higher portability creates bigger software footprints or more time spent executing
adaptation code
X. Mbed Core
Mbed는 32비트 ARM Cortex-M 마이크로 컨트롤러 개발을 위한 인터넷 플랫폼 및 온라인 운영 체제
ARM Cortex-MX 계열의 코딩및 빌드를 위해 온라인상으로 IDE 및 컴파일을 제공
Free open source IoT OS and development tools from Arm | Mbed
Mbed OS Mbed OS provides a well-defined API to develop your C++ application, plus free tools and thousands of code examples, libraries and drivers for common components. With a built-in security stack, core components such as storage, and several connectiv
os.mbed.com
아래는 ST에서 제공하는 library를 이식성, 최적화, 접근성, 가독성, 하드웨어 적용 범위를 비교한 표이다.
HAL driver는 이식성, 가독성, 하드웨어 적용 범위는 좋으나, 최적화는 좋지 않아, 최적화를 해야 할 경우 LL driver를 사용하기도 한다.

'ST > 개발 환경 및 구조' 카테고리의 다른 글
CMSIS (0) | 2025.03.18 |
---|---|
STM32 CubeMX LL driver (0) | 2025.03.18 |
Linker Script(2) - 구조 및 설명 (0) | 2025.03.17 |
Linker Script(1) - Segment (0) | 2025.03.17 |
ST 개발 보드 소개(2) - 32F746GDISCOVERY (0) | 2025.03.17 |