Synchron - An API and Runtime for Embedded Systems
Paper in proceeding, 2022
Embedded systems applications exhibit the general characteristics of being (i) concurrent, (ii) I/O–bound and (iii) timing-aware. To address each of these concerns, the Synchron API consists of three components - (1) a Concurrent ML (CML) inspired message-passing concurrency model, (2) a message-passing–based I/O interface that translates between low-level interrupt based and memory-mapped peripherals, and (3) a timing operator, syncT, that marries CML’s sync operator with timing windows inspired from the TinyTimber kernel.
We implement the Synchron API as the bytecode instructions of a virtual machine called SynchronVM. SynchronVM hosts a Caml-inspired functional language as its frontend language, and the backend of the VM supports the STM32F4 and NRF52 microcontrollers, with RAM in the order of hundreds of kilobytes. We illustrate the expressiveness of the Synchron API by showing examples of expressing state machines commonly found in embedded systems. The timing functionality is demonstrated through a music programming exercise. Finally, we provide benchmarks on the response time, jitter rates, memory, and power usage of the SynchronVM.
runtime
virtual machine
real-time
concurrency
Functional Programming
Author
Abhiroop Sarkar
Chalmers, Computer Science and Engineering (Chalmers), Functional Programming
Joel Svensson
Chalmers, Computer Science and Engineering (Chalmers), Functional Programming
Mary Sheeran
Chalmers, Computer Science and Engineering (Chalmers), Functional Programming
Leibniz International Proceedings in Informatics, LIPIcs
18688969 (ISSN)
Vol. 222 17:1-17:28 179783959772259 (ISBN)
Berlin, Germany,
Octopi: Säker Programering för Sakernas Internet
Swedish Foundation for Strategic Research (SSF) (RIT17-0023), 2018-03-01 -- 2023-02-28.
Subject Categories
Algebra and Logic
Computer Science
Computer Systems
Areas of Advance
Information and Communication Technology
DOI
10.4230/LIPIcs.ECOOP.2022.25
ISBN
9783959772259