A basic proof of concept using the boost::sml C++ library with zephyr.
A working knowledge of Zephyr, at least get through the getting started and build the Hello world.
If you are already setup to develop in Zephyr, then skip on.
This is setup as a T2 Zephyr workspace application, that is it is all pretty self contained. If you know what this means, you'll know how to hack it if you need to.
If not, once you get through the gatting started the following commands should get you going.
$ cd ~ && mkdir sml-demo && git clone https://github.com/d-o/z-sml.git
$ python -m venv .venv && . .venv/bin/activate && pip install west
$ cd z-sml && west update
$ west build -p always -b qemu_riscv32
$ west build -t runLight started @ Off
Event "On" Level 5 State On
Event "Off" Level 0 State Off
Event "Up" Level 5 State On
Event "Down" Level 4 State On
Event "Down" Level 3 State On
Event "Down" Level 2 State On
Event "Off" Level 0 State Off
Event "Up" Level 2 State On
Event "Up" Level 3 State On
Event "Up" Level 4 State On
Event "Up" Level 5 State On
Event "Up" Level 5 State On
Event "Down" Level 4 State On
Event "Down" Level 3 State On
Event "Down" Level 2 State On
Event "Down" Level 1 State On
Event "Down" Level 0 State Off
Event "Down" Level 0 State Off
Event "Up" Level 1 State On
Event "Off" Level 0 State Off
Event "On" Level 5 State On
Event "Off" Level 0 State Off
Copyright (c) 2025 Dean Sellers (dean@sellers.id.au) SPDX-License-Identifier: MIT