Most MCU-based embedded systems come with firmware programmed with assembler, C, and/or C++. But as referenced in a paper published in 2000 entitled ” Point of view: Lisp as an alternative to Java“, functional programming languages like Lisp or Scheme may lead to shorter development times compared to C/C++ or Java.
That’s with this idea in mind that LambdaChip was created. It is a lightweight, open-source virtual machine designed to run on embedded systems with limited resources, for instance, an 80MHz microcontroller with 50KB RAM, and programmable with Scheme multi-paradigm programming language, a dialect of Lisp widely used for functional programming research and teaching.
The company behind the project, also called LambdaChip, has just created its own hardware with LambdaChip Alonzo, an STM32 Cortex-M4 development board with 512KB flash, 128KB RAM, and that also comes with Bluetooth LE connectivity.
- MCU – STMicro STM32F411CEU6 Arm Cortex-M4 MCU @ 100 MHz with 512KB flash, 128KB RAM; UFQFN48 package
- Storage – MicroSD card socket
- Connectivity – Bluetooth 4.0 Low Energy
- Expansion – 2.54mm pitch header for GPIOs
- Debugging – 10-pin programming header for an external debugger
- Misc – RGB LED, white LED, 3x buttons (BOOT0, RST, and User)
- Power Supply – 5V via USB-C port, or battery via 2-pin connector
The board is not really unique, but includes the features need for LambdaChip such as a microSD card where the resulting binary is copied after compilation and automatically loaded by the virtual machine.
You’ll need a debugger to program the board, and that’s why the company also provides a complete kit with the Saruman debugger, USB and debugger cables, microSD card, USB SD card reader, and an acrylic case.
A Linux-based operating system is recommended for development, but since as they provide a docker image, Windows and Mac OS are also supported. Everything is done from the command line through the Laco environment with a Scheme compiler generating a LEF bytecode file. That is what a blinky sample looks like in Scheme:
1 2 3 4 5 6 7 |
(define (main x) (gpio-toggle! "dev_led0" 15) (usleep 200000) (if (= x 0) #t (main (- x 1)))) (main 10) |
You can download the schematics (PDF only), and read the documentation on LambdaChip website. The BLE demo below shows how to use the Laco environment to program the board, and transmits some messages to an Android phone running LightBlue app.
LambdaChip Alonzon board can be purchased for $29.00, but most people interested in the project would probably prefer to purchase the full kit for $99.00. Both are available on Seeed Studio.

Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress