Lisp dialect adapts to run bigger programs on embedded systems
A Linked List of Cases in Language Design
Programming Languages
Summary
Many small devices use special software called embedded systems, but fitting powerful scripts on them can be hard due to limited memory. The authors found that users wrote much larger programs than expected for a Lisp-based language on these devices, running out of memory. They solved this by allowing the programs to run across two types of memory: fast but small RAM and slower but larger flash memory. Their work also includes improvements like faster boot times with a Lisp image system. Even users who disliked Lisp’s syntax appreciated its scripting power in their devices.
What this means in practice
- •For embedded systems developers: Run larger and more complex Lisp scripts on microcontroller firmware by partitioning program evaluation across RAM and flash memory.
- •For hardware integrators: Improve device responsiveness by using a Lisp-image system that enables faster booting of firmware with built-in scripting.
Authors
Bo Joel Svensson, Benjamin Vedder
Abstract
LispBM is a Lisp dialect for microcontrollers and embedded systems. This paper is about the changes made to LispBM resulting from it being integrated into the VESC family of firmware and thus gaining a userbase. As a surprise to Author 1, the new users of LispBM wrote programs larger than ever imagined. This used up all available heap space and we were forced to find a way to evaluate Lisp programs partitioned across RAM and flash memory. This story and a couple more, like the one about the Lisp-image system for fast boots, are the core contribution of this paper. When the first versions of the VESC firmware with a built-in Lisp runtime system were released, there was some grumbling here and there about Lisp and its syntax, as expected. To our delight, most seemed very excited about a scripting language in the firmware. To the engineer and builder users, the choice of syntax seemed to matter less than the potential it opened up for them.