Document created by Bruno Schwander on Feb 24, 2018
Version 1Show Document
  • View in full screen mode


About this project

STM8S SPL modified to be usable with the SDCC compiler


Project info

Type : ST Standard Peripheral Library, usable with the SDCC compiler 

Progress : complete and usable, the original example makefile still have to be updated to follow the standard shown in the test/template projects

Difficulty : Easy / Intermediate / Advanced 

License : Original STM8S SPL license (Liberty v2)

The Team :


Bruno Schwander

Makefiles, scripting to split/reorder all files, testing, example

bschwand · GitHub 

Georg Gicking-Konert

Original author of the SPL-SDCC patch

GitHub - gicking/STM8-SPL_SDCC_patch: Patch for STM8 Standard Peripherals Libraries 

Things used in this project

Hardware components :

devboard used for testingcheap STM8S dev board1stm8s devboards extremely cheap !

Software Tools :

SDCC - Small Device C Compiler 

GitHub - vdudouyt/stm8flash: program your stm8 devices with SWIM/stlinkv(1,2) 



I develop on STM32, and wanted to do a few projects on the cheap. Found those 0.60$ devboard, I figured I could use for several hardware projects I have: beamer closet open/close and screen up/down coordination over RF commands, some toys, remotes and IoT devices. But the SPL was unusable with SDCC as the SDCC linker can not perform dead code elimination, leading to massive binary sizes when using the SPL in its original form. I like Linux and OSX so SDCC is my choice of compiler. 


I will publish next my finished project using this STM8S-SPL