Skip to content

Commit 2ff0cbf

Browse files
d-okris-jusiak
authored andcommitted
zephyr: Add files to support using with zephyr RTOS
Files to allow importing and building as a zephyr module. Signed-off-by: Dean Sellers <[email protected]>
1 parent bf447ce commit 2ff0cbf

File tree

4 files changed

+37
-0
lines changed

4 files changed

+37
-0
lines changed

zephyr/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
if (CONFIG_LIB_BOOST_SML)
2+
zephyr_include_directories(../include)
3+
endif()

zephyr/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
config LIB_BOOST_SML
2+
bool "Enable use of the boost::sml C++ state machine library"
3+
default n
4+
depends on CPP && !STD_CPP98 && !STD_CPP11 && !STD_CPP14
5+
help
6+
Include the boost::sml state machine language library,
7+
see https://github.com/boost-ext/sml.

zephyr/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Support for using the boost::sml as a [Zephyr](https://docs.zephyrproject.org/latest/index.html) module
2+
3+
To use add the reposiory path to your west maifest file, probably `west.yml`. See the zephyr documentation on [project manifests](https://docs.zephyrproject.org/latest/develop/west/manifest.html#projects) for details.
4+
5+
6+
``` yaml
7+
projects:
8+
- name: boost-sml
9+
url: http://your.git.server/sml
10+
revision: tag|branch|sha
11+
```
12+
13+
Then run `west update` to pull in the code. You need to then add the following config options to `prj.conf` or whereever you manage your configuration.
14+
15+
```
16+
CONFIG_CPP=y
17+
CONFIG_STD_CPP17=y
18+
CONFIG_REQUIRES_FULL_LIBCPP=y
19+
20+
# Include boost sml state machine
21+
CONFIG_LIB_BOOST_SML=y
22+
```
23+
24+
Then you can `#include <boost/sml.hpp>` to use the library.

zephyr/module.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
build:
2+
cmake: zephyr
3+
kconfig: zephyr/Kconfig

0 commit comments

Comments
 (0)