[an error occurred while processing this directive]

ColecoVision

[an error occurred while processing this directive]

ColecoVision

Games

Development

µC Tutorials

STM8

MCS-51

µC Tools

LLVM+SDCC

STM8 C compilers

STM8 RTOSes

[an error occurred while processing this directive]

Development

[an error occurred while processing this directive]
Tutorial

Introduction to sdcc

ColecoVision system

Playing music

Hardware

Homebrew kits

Homebrew kit CV

Homebrew kit CVs

Software

libcv and libcvu

png2cv

png2cvs

abc2cvm

cvmtuning

compression utilities

Games

[an error occurred while processing this directive]
Released

Schlange CV

Search for the stolen Crown Jewels

Monster Masher

Search for the stolen Crown Jewels 2

Cye

Search for the stolen Crown Jewels 3

Bankruptcy Builder

Shunting Puzzle

Ȼi̅x̅

In development

Colored Gravity

Tunnels & Trolls

[SK - name not final]

Io

[an error occurred while processing this directive]

Compiler Comparison
RTOS Availability

Tutorials

STM8L-DISCOVERY

LED Timer
Serial

STM8S-DISCOVERY

LED Timer
Serial

STM8A-DISCOVERY

STM8AF LED Timer
STM8AF Serial
STM8AF Benchmarks
STM8AL LED Timer
STM8AL Serial

EX-STM8-Q64a-207

LED Timer
Serial
Benchmarks

Open8S208Q80

LED Timer
Serial
Benchmarks

EX-STM8-Q48a-105

LED Timer
Serial

STM8/128-EVAL

LED Timer
Serial
Benchmarks

STM8L101-EVAL

Serial

[an error occurred while processing this directive]

Tutorials

EX-F320

LED Timer
Serial

C8051F340/380

LED Timer
Serial

C8051F V2.1 (F020)

LED Timer
Serial

C8051F300 Dev. B. Mod.

LED Timer
Serial

C8051F V2.1 (F120)

LED Timer
Serial
Benchmarks

51 MCU SCM

Serial

STC89 DEMO BOARD

LED Timer
Serial

EZ-USB FX2LP

LED Timer
Serial
Benchmarks

colecovision.eu

ColecoVision

[an error occurred while processing this directive]

How to buy

STM8

MCS-51

LLVM+SDCC

Contact

The LLVM+SDCC toolchain

The LLVM+SDCC toolchain and its potential uses

The LLVM+SDCC toolchain is meant to allow the use of languages other than C and to evaluate the effect of LLVM optimizations for 8-bit targets. Currently, it consists of a fork of the LLVM C frontend (cfe) clang, the LLVM optimizer (optional), the LLVM C backend (cbe; no longer part of LLVM, now maintained independently from LLVM). and the Small Device C Compiler (SDCC). The toolchain is still in a very early stage and likely has many issues, especially around corner cases.

Installing the LLVM+SDCC toolchain

Using the LLVM+SDCC toolchain

To compile a test.c C file with it for STM8:

The above process should result in a working binary file just as if the original C file had been compiled with SDCC directly. However the binary will probably be less optimized as SDCC is not yet able to optimize out all the overhead generated in the translations. But if you optimize the LLVM IR before converting it to C, you might well get a more optimized result than with plain SDCC. To optimize, use e.g. opt-3.8 -O2 -disable-simplify-libcalls -S (we need -disable-simplify-libcalls since for opt-3.8, sdcc-stm8 is an unknown target triple, so it assumes the host architecture; this breaks the simplification of libcalls, since e.g. some printf() calls get converted to putchar(), but we get a putchar() that takes a 32-bit int; this would result in stack corruption later).

The files compiled using the above process can be freely linked with files compiled using SDCC directly.

Known issues