Skip to content

ItJustWorksTM/libSMCE

Repository files navigation

libSMCE

Spiritual successor to the backend of SMartCarEmul
Copyright © ItJustWorks™

Build codecov

Status: Actively maintained

This cross-platform C++ library provides its consumers the ability to compile and execute Arduino sketches on a hosted environment, with bindings to its virtual I/O ports to allow the host application to interact with its child sketches.

Check our Wiki for more information about usage.

Supported I/O

  • GPIO (Arduino's digitalRead, analogWrite, etc)
  • UART (Arduino's Serial global)
  • SD (writes to host's filesystem in a pre-configured root)
  • MQTT (interface of arduino-mqtt) - Note: cannot be monitored by host application
  • OV767X Camera (interface of Arduino_OV767X) - Note: available pixel formats differ

Supported sketch languages

Build Requirements

  • CMake >= 3.16
  • C++20 compiler (tested with GCC >= 10, Clang/LLVM >= 10, MSVC >= 19.28, AppleClang)
  • OpenSSL (tested with 1.1.1)

Automatically built from source

  • Boost ~= 1.78 - Not an interface requirement however (you only need Boost headers to build the library, not when using it precompiled)
  • libmosquitto 2.0.9 - Used to provide MQTT support

Runtime Requirements

  • CMake >= 3.12
  • C++ compiler with support for at least C++11 - MinGW and MSVC-Wine are NOT officially supported

Optional

  • Ninja - On Un*x, will be used by setting CMAKE_GENERATOR (if that environment variable is unset)

Build instructions

cmake -S . -B build
cd build
cmake --build .

Running the testsuite

cmake --build . --target SMCE_Tests
ctest

Packaging

cpack

Future development

  • Serve the Doxygen-generated docs
  • Making a proper Hugo-generated wiki in Markdown
  • std::error_codeify smce::Board
  • Add more I/O features, in particular the ones that were in SMartCarEmul
  • Add interrupts support
  • Allow consumers to specify toolchain files

First-party frontend

See SMCE-gd, designed for Arduino RC vehicles.