A Scheme Interpreter for ARM Microcontrollers

SourceForge.net Logo

ARMPIT SCHEME is an interpreter for the Scheme language (lexically-scoped dialect of Lisp) that runs on RISC microcontrollers with ARM core. It is based on the description in the Revised^5 Report on the Algorithmic Language Scheme (r5rs), with some extensions (for I/O) and some omissions (to fit within MCU memory). It is further designed to support multitasking and multiprocessing. Armpit Scheme is expected to be well suited to educational settings, including student projects in courses on control and instrumentation, or capstone design courses where microcontrollers are needed. It is meant to enrich the spectrum of interpreted languages available for MCUs (eg. BASIC and FORTH) and can be an alternative to MCU-based bytecode interpreters (eg. for Scheme or Java) and to compiled languages (eg. C).

The name "Armpit" was selected for this project because it includes "ARM" (as in ARM core MCU) and "pit" (as in kernel, noyau, the core of an Operating System (OS)). Armpit Scheme, once loaded, governs the operation of the MCU, and is "Scheme to the metal" in the sense of running without any other OS. It may be thought of as turning the MCU into a rudimentary Scheme machine. The screenshot below shows the system running on a NewMicros Tiny2106 board. Minicom is used to communicate with the board which reads, evaluates and prints the result of the entered expressions. The number in front of the "armpit>" prompt indicates the number of bytes of heap space that remain available.


Figure 1: Sample Interaction with Armpit Scheme

The latest development snapshot of Armpit Scheme is 00.0186 and the current stable version is 00.0160. Both are distributed under the MIT License and are beta releases with both known bugs and unknown bugs. The source code, and pre-assembled (ready-to-upload) Intel Hex and binary image files, can be downloaded from the armpit project summary page or the download site at SourceForge. Alternatively, you can view and download the source code from your web browser. The system is documented in several web pages: 

It is designed to run on the following boards:

Table 1: Armpit Scheme Development MCU Board Specifications

BOARDMANUFACTURER MCU COREMHZRAMFLASHUSBLCD (*)
LPC-H2103Olimex LPC2103 ARM7TDMI608 KB32 KB--
Tiny2106Newmicros LPC2106 ARM7TDMI6064 KB128 KB--
Tiny2131Newmicros LPC2131 ARM7TDMI608 KB32 KB--
Tiny2138Newmicros LPC2138 ARM7TDMI6032 KB512 KB--
Logomatic V1.0SparkFun LPC2138 ARM7TDMI6032 KB512 KB--
Logomatic V2.0SparkFun LPC2148 ARM7TDMI6032 KB512 KBNative-
LPC-H2148Olimex LPC2148 ARM7TDMI6032 KB512 KBNative-
LCDDemo-LPC2158Future Designs LPC2158 ARM7TDMI6032 KB512 KBNativeText
SAM7-H256Olimex AT91SAM7 ARM7TDMI4864 KB256 KBNative-
STR-H711Olimex STR711 ARM7TDMI4864 KB256 KBNative-
LPC-H2214Olimex LPC2214 ARM7TDMI601 MB1 MBFTDI-
LPC2478-STKOlimex LPC2478 ARM7TDMI7264 MB512 KBNativeColor
LPC-H2888Olimex LPC2888 ARM7TDMI48/6032 MB2 MBNative-
CS-E9302Olimex EP9302 ARM920T16632 MB16 MBYes (*)-
HammerTinCan Tools S3C2410 ARM920T20032 MB16 MBYes (*)-
STM32-H103Olimex STM32 Cortex-M37220 KB128 KBYes (*)-
IDM-L35-RDKTI LM3S1958 Cortex-M35064 KB256 KB(cable)Color
LM3S1968 EvalTI LM3S1968 Cortex-M35064 KB256 KBFTDIOLED
LM3S6965 EvalTI LM3S6965 Cortex-M35064 KB256 KBFTDIOLED
BeagleBoard (B7)TI OMAP3530 Cortex-A850096 MB32 MB(*)Yes (*)-

(*) USB is not implemented in the Armpit Scheme core for these 4 MCUs. On-board LCDs / OLEDs are programmed from within user space (not in the core). The BeagleBoard has 256MB of Flash but only 32MB are used for Armpit Scheme user files (the file Flash is shadowed by 32MB of SDRAM).


External links of potential interest include:

 

Acknowledgment and Disclaimer


Armpit Scheme is presently developed at the Fischell Department of Bioengineering of the A.J. Clark School of Engineering at the University of Maryland at College Park. Part of its development (until 02/07) was based upon work supported by the National Science Foundation under Grant No. 0134424. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the Department, School, University or of the National Science Foundation.  

Last updated August 7, 2009

bioe-hubert-at-sourceforge.net