Sdcc

Getting Started with STM8 MCUs under linux

SDCC

Install from distribution repositories but you need at least version 3.7.0.

Source code is available at  http://sdcc.sourceforge.net/ .

When building you may want to disable some of the supported MCUs.

 

stm8-bin utils – get from https://stm8-binutils-gdb.sourceforge.io/

SPL Patches – get from https://github.com/gicking/STM8-SPL_SDCC_patch

Get the SPL for your device from st.com:

– STM8S/A: “STSW-STM8069”
– STM8L10x: “STSW-STM8012”
– STM8L15x-16x-05x-AL31-L: “STSW-STM8016”
– STM8TL5x: “STSW-STM8030”

How to update makefiles - use examples as base

 

How to debug : need a jtag connection or a serial output for hardcore printf debugging