stm8-bare-min logo

stm8-bare-min

Free

Tiny peripheral library for STM8S

FreeFree tier
Type
Open Source

About stm8-bare-min

Tiny peripheral library for STM8 microcontrollers, developed as a supplement to a series of blog posts. Provides register definitions and basic peripheral drivers for STM8S and STM8L families. Tested with SDCC compiler only. Includes example projects and additional optimizer rules. Licensed under MIT.

Key Features

Register definitions for STM8S and STM8L families
Basic peripheral drivers (GPIO, UART, etc.)
Example projects included for both families
Optimized for SDCC compiler with extra optimizer rules
MIT licensed open source

Pros & Cons

Pros
  • Minimal and lightweight, suitable for resource-constrained devices
  • Well-structured code with separate directories for STM8S and STM8L
  • Includes example projects for quick start
  • Actively maintained (50 commits)
  • MIT license allows free use and modification
Cons
  • Only tested with SDCC compiler; compatibility with other compilers unknown
  • Limited to basic peripheral drivers (not a full HAL)
  • May require workaround for SDCC bug #2673 with older versions

Best For

Embedded development on STM8 microcontrollersEducational projects and experimentation with STM8Bare-metal programming without an operating system