9417ed7f38
5bc9cc72 update readme 20763667 added a number of GC tests. all of which pass under both garbage collection principles. 8f0f9f04 first attempt at pointer-reversal mark phase. This mark implementation is disabled per default and can be tried out by building with -DUSE_GC_PTR_REV 6f4b7899 refactor closure application and addition of several error-suspects in fundamental operations 34942ef9 undo some changes related to error_reason and some cleaning f046c967 added lbm_set_error_suspect to allow setting a more relevant expression likely to be guilty of an error to an error message git-subtree-dir: lispBM/lispBM git-subtree-split: 5bc9cc726803bc65c8853ccd1c99a44bc5de5063 |
||
---|---|---|
benchmarks | ||
chibios-examples | ||
doc | ||
docker | ||
esp-examples/repl | ||
examples | ||
experiment_repl | ||
include | ||
mascot | ||
notes | ||
old | ||
platform | ||
sdlrepl | ||
src | ||
tests | ||
utils | ||
videos | ||
zephyr-examples | ||
.clang_complete | ||
.gitignore | ||
.travis.yml | ||
LICENSE | ||
Makefile | ||
README.md | ||
flash_nrf52_with_stlink.sh | ||
lispbm.mk | ||
mktags.sh | ||
runinfer.sh | ||
runsa.sh | ||
setup_fw_build.sh | ||
zephyr-source-me.sh |
README.md
lispBM (LBM)
LispBM is a lisp or scheme like programming language for microcontrollers. LispBM also borrows a couple of ideas from Erlang when it comes to concurrency, message passing, pattern matching and process monitoring. The LispBM runtime system can be compiled for either 32 or 64 bit platforms and runs on a wide range of hardware such as for example STM32, NRF52, ESP32 or X86. When running the LispBM runtime system on a microcontroller it can be built on top of ChibiOS, FreeRTOS or ZephyrOS or, if you are adventurous, on bare-metal. LispBM can also be built to run on top of a regular linux.
The LispBM mascot, Lispy the llama, was created by PixiLadyArt. Thank you, Pixi!
Want to get involved and help out?
There are lots of interesting things to code on in and around the LispBM runtime system. I would love to interact with people who are interested in high-level programming languages on microcontrollers (or elsewhere) so please do not be shy to make contact. Together we can make great stuff happen ;)
- Are you interested in microcontrollers and programming languages?
- You find it fun to mess around in C code with close to zero comments?
- Then join in the fun. Lots to do, so little time!
- Poke me by mail bo(dot)joel(dot)svensson(whirly-a)gmail(dot)com.
There are also other areas that could use insights and help. Some I can think of are:
- Running LispBM on system simulators.
- LispBM efficiency, compilation, byte-code and real time garbage collection.
- Documentation and testing.
- ...
Getting started
The easiest way to get started with LispBM programming is to use VESC-Tool together with the VESC EXPRESS Firmware on an esp32c3.
VESC-Tool gives you access to a very capable IDE for lisp programming on embedded systems and the VESC Express firmware provides built in functionality to interface with CAN, WIFI, BLE and UART as well as GPIO and display drivers.
If you are looking for a more bare-bones way to add scripting capabilities to your embedded system, LispBM is quite platform independent and can be compiled for many different MCUs and systems. LispBM can tie into the rest of your application via what we call "extensions" which are C functions that can be called from your LispBM scripts.
Documentation
- Work in progress LispBM language reference.
- Gotchas and caveats Gotchas and caveats.
- Work in progress LispBM programming manual.
- C code documentation can be found here.
- LispBM's internals are documented as a series of blog posts.
- There are demonstrations on YouTube.
Compile a 64bit binary for linux
To really experience LispBM one should use it on a microcontroller. The repl available for X86 is currently very limited and "hacky". I use this repl as an experiment platform while working on the LBM implementation. A more serious attempt at a useful desktop/laptop/rpi LispBM repl is work in progress.
-
Build the repl:
cd experiment_repl
and thenmake all64
-
Run the repl:
./repl
Compile a 32bit binary for linux (Requires 32bit libraries. May need something like "multilib" on a 64bit linux)
-
Build the repl:
cd experiment_repl
and thenmake
-
Run the repl:
./repl