Go to file
Benjamin Vedder a02f11d4d4 Squashed 'lispBM/lispBM/' changes from fd0f1fab..e421208f
e421208f small tweaks to strings, dec_str and string extensions
0baa53c6 Merge pull request #12 from laxsjo/update/str-extensions
1e27ba02 swapped start and occurrence arguments in str-find
7d5a997e Write tests for new string extensions
6bd2c1bd Update str-find argument behavior
b84a779b add_symbol functions now check if a symbol already exists before adding it.
dac49f47 move test lisp files into dedicated directory
34a14229 added a few more move-to-flash tests
1f221aaf change order of flash writes in a few more cases. The high-level array case needs refactoring to fit the pattern
e9e7083f add compiled repl and tests executable to .gitignore
a70eda64 cast/change int types to avoid warnings in string_extensions.c
5dc5b022 Swapped meaning of 'left and 'right in str-find Realized that the previous behavior is completely stupid, since the argument is called direction, while the previous left and right specified which end to start in.
93805c98 Add the str-join and str-find extensions, remove old str-merge
3f364178 change to order in which values are written to flash when processing lists.
6c1a0672 added tests related to progn + var. May need to think a bit about the meaning of var in progn
dd09cecf tweak refman
a9c5fd53 small update lbmref
3642e8a5 small update lbmref
8be7ab05 small tweaks to manual
77a38617 update to lbmref
fa56ea05 changes to lbmref. minor tweaks

git-subtree-dir: lispBM/lispBM
git-subtree-split: e421208f5355be188ac80949e36300f43f15a8fc
2024-07-15 12:29:40 +02:00
benchmarks Squashed 'lispBM/lispBM/' changes from 520fde1a..edb024b7 2024-02-27 13:39:30 +01:00
doc Squashed 'lispBM/lispBM/' changes from fd0f1fab..e421208f 2024-07-15 12:29:40 +02:00
include Squashed 'lispBM/lispBM/' changes from fd0f1fab..e421208f 2024-07-15 12:29:40 +02:00
mascot Squashed 'lispBM/lispBM/' content from commit 748477b9 2022-01-29 17:26:45 +01:00
platform Squashed 'lispBM/lispBM/' changes from 60d7c83f..c0fb4af8 2022-09-16 09:25:46 +02:00
repl Squashed 'lispBM/lispBM/' changes from 3b309a7a..a0f97629 2024-06-05 09:26:14 +02:00
src Squashed 'lispBM/lispBM/' changes from fd0f1fab..e421208f 2024-07-15 12:29:40 +02:00
test_reports Squashed 'lispBM/lispBM/' changes from f18a5c10..85675e29 2024-05-09 21:26:09 +02:00
tests Squashed 'lispBM/lispBM/' changes from fd0f1fab..e421208f 2024-07-15 12:29:40 +02:00
vesc_express_tests Squashed 'lispBM/lispBM/' changes from 7ba933de..610c2d2a 2024-02-21 11:42:12 +01:00
videos Squashed 'lispBM/lispBM/' content from commit 748477b9 2022-01-29 17:26:45 +01:00
.clang_complete Squashed 'lispBM/lispBM/' changes from aba5cf5a..445930ec 2022-09-21 14:46:29 +02:00
.gitattributes Squashed 'lispBM/lispBM/' changes from 0eee7a53..eb2a4cff 2024-03-10 12:58:00 +01:00
.gitignore Squashed 'lispBM/lispBM/' changes from fd0f1fab..e421208f 2024-07-15 12:29:40 +02:00
.travis.yml Squashed 'lispBM/lispBM/' content from commit 748477b9 2022-01-29 17:26:45 +01:00
LICENSE Squashed 'lispBM/lispBM/' content from commit 748477b9 2022-01-29 17:26:45 +01:00
Makefile Squashed 'lispBM/lispBM/' changes from 6f442405..28c56c43 2022-09-04 16:08:58 +02:00
README.md Squashed 'lispBM/lispBM/' changes from 7ba933de..610c2d2a 2024-02-21 11:42:12 +01:00
lispbm.mk Squashed 'lispBM/lispBM/' changes from 418272ad..7bd15759 2024-04-03 18:39:18 +02:00
mktags.sh Squashed 'lispBM/lispBM/' changes from 3836952f..cdfd116c 2022-07-06 10:18:45 +02:00
release.sh Squashed 'lispBM/lispBM/' changes from f18a5c10..85675e29 2024-05-09 21:26:09 +02:00
runinfer.sh Squashed 'lispBM/lispBM/' changes from 6199703d..43ebce71 2022-03-25 15:47:05 +01:00
runsa.sh Squashed 'lispBM/lispBM/' changes from 948bb6bc..9e5d4044 2023-10-06 15:54:52 +02:00

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.

LispBM mascot

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 ;)

  1. Are you interested in microcontrollers and programming languages?
  2. You find it fun to mess around in C code with close to zero comments?
  3. Then join in the fun. Lots to do, so little time!
  4. Poke me by mail bo(dot)joel(dot)svensson(whirly-a)gmail(dot)com.

There are areas where insights and help would matter greatly. Some I can think of are:

  1. Running LispBM on system simulators.
  2. LispBM efficiency, compilation, byte-code and real time garbage collection.
  3. Code size optimisation. Do more with less, while maintaining performance.
  4. Documentation and testing.
  5. Useful extension libraries.
  6. Lisp scriptable home automation.
  7. Lisp scriptable MIDI sequencers.
  8. Lisp scriptable Audio synthesizers.
  9. ...

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

The LBM REPL

There is an example REPL implementation that runs on X86 32 or 64bit in the repl directory. The REPL depends on libreadline.

REPL Dependencies for 32Bit executable on 64Bit linux:

  • libreadline
  • lib32readline
  • gcc-multilib

On Ubunty you can obtain the depencies by: sudo apt-get install gcc-multilib libreadline-dev lib32readline-dev

Then issue command make in the repl directory.