# ST STM8

Configuration

  platform = `ststm8`

The STM8 is an 8-bit microcontroller family by STMicroelectronics an extended variant of the ST7 microcontroller architecture. STM8 microcontrollers are particularly low cost for a full-featured 8-bit microcontroller.

For more detailed information please visit vendor site.

Contents

- Examples

- Debugging

- Stable and upstream versions

- Packages

- Frameworks

- Boards

## Examples

Examples are listed from ST STM8 development platform repository:

- spl-blink

- arduino-fade-all-pins

- spl-uart

- spl-flash

- arduino-internal-lib

- arduino-ping-hc04

## Debugging

PIO Unified Debugger - “1-click” solution for debugging with a zero configuration.

- Tools & Debug Probes

  - On-Board Debug Tools

### Tools & Debug Probes

Supported debugging tools are listed in “Debug” column. For more detailed information, please scroll table by horizontal. You can switch between debugging Tools & Debug Probes using debug_tool option in “platformio.ini” (Project Configuration File).

Warning

You will need to install debug tool drivers depending on your system. Please click on compatible debug tool below for the further instructions.

#### On-Board Debug Tools

Boards listed below have on-board debug probe and ARE READY for debugging! You do not need to use/buy external debug probe.

Name | MCU | Frequency | Flash | RAM
--- | --- | --- | --- | ---
ST STM8S-DISCOVERY | STM8S105C6T6 | 16MHz | 32KB | 2KB

## Stable and upstream versions

You can switch between stable releases of ST STM8 development platform and the latest upstream version using platform option in “platformio.ini” (Project Configuration File) as described below.

### Stable

    ; Latest stable version
    [env:latest_stable]
    platform = ststm8
    board = ...

    ; Custom stable version
    [env:custom_stable]
    platform = ststm8@x.y.z
    board = ...

### Upstream

    [env:upstream_develop]
    platform = https://github.com/platformio/platform-ststm8.git
    board = ...

## Packages

Name | Description
--- | ---
framework-arduinoststm8 | Arduino Wiring-based Framework (STM8 Core)
framework-ststm8spl | STM8S/A Standard peripheral library
tool-openocd | OpenOCD
tool-stm8binutils | STM8 GNU binutils
tool-stm8tools | STM8 upload tools
toolchain-sdcc | Small Device C Compiler

Warning

Linux Users:

> - Install “udev” rules 99-platformio-udev.rules

> - Raspberry Pi users, please read this article Enable serial port on Raspberry Pi.

Windows Users:

> Please check that you have a correctly installed USB driver from board manufacturer

## Frameworks

Name | Description
--- | ---
Arduino | Arduino Wiring-based Framework allows writing cross-platform software to control devices attached to a wide range of Arduino boards to create all kinds of creative coding, interactive objects, spaces or physical experiences.
SPL | The ST Standard Peripheral Library provides a set of functions for handling the peripherals on the STM32 Cortex-M3 family. The idea is to save the user (the new user, in particular) having to deal directly with the registers.

## Boards

Note

- You can list pre-configured boards by platformio boards command or PlatformIO Boards Explorer

- For more detailed `board` information please scroll the tables below by horizontally.

### ST

Name | Debug | MCU | Frequency | Flash | RAM
--- | --- | --- | --- | --- | ---
ST STM8S-DISCOVERY | On-board | STM8S105C6T6 | 16MHz | 32KB | 2KB
ST STM8S103F3 Breakout Board | No | STM8S103F3P6 | 16MHz | 8KB | 1KB
ST STM8S105K4T6 Breakout Board | No | STM8S105K4T6 | 16MHz | 16KB | 2KB

### sduino

Name | Debug | MCU | Frequency | Flash | RAM
--- | --- | --- | --- | --- | ---
sduino MB (STM8S208MBT6B) | No | STM8S208MBT6 | 16MHz | 128KB | 6KB
sduino UNO (STM8S105K6) | No | STM8S105K6T6 | 16MHz | 32KB | 2KB