Go to file
Benjamin Vedder d664184ef8 Squashed 'lispBM/lispBM/' changes from 6a448aa3..c097f5c6
c097f5c6 cleaning pass and refactoring
5384d522 refactoring application experiment
087ede4e refactor: readability, clearity and in some places - to a small degree - correctness
89575d8b small change to one event test
ba6e7fa7 logged change
16ac6bd1 logged change
089468b3 removing make-env. in-env in the interest of keeping core language small
f18015f7 Merge branch 'master' of github.com:svenssonjoel/lispbm
5b19dfda simplification and readability refactoring.
8c492889 Update gotchas.md
754221b9 Update gotchas.md
a0931bac bump version
e49071dc Changed behavior closure application to zero args. Application of a continuation (call-cc) with 0 args still uses the old approach where 0 args is equivalent to application to nil
35f495f3 mini tweak readme
fdd01ff1 update README
b21a3fa7 Update gotchas.md
92d9f561 update gotchas
0d708de7 bugfix in incremental reader and addition of a gotchas.md file for edge-case behaviors
d9a38456 updated lbmref with take and drop
86b1cc1b take, drop, change to make-env returned result
ea29f5ec added take and drop as built-in primitives and change to result env for make-env
55a5b1f5 added some tests and  a small amount of doc
e2d2f745 tweaks
bccdee1f make-env and in-env
3a03232a added make-env and in-env for library-encapsulation
e5b5ba66 mini tweak
dce87812 removed extra ;
190b4d9e mini tweak
6864fa32 fix repl after removal of reading_done callback
ea3aba39 removed reading_done_callback and made the nonsense default variants for all remaining callback
427cb37c bugfix read-program, tightening up,  cleaning
119d9fd3 refactoring and tightening up
10573404 cleaning and readability
63b750b5 small tweaks
d44c8bdc bug fix related to row numbers in error messages while doing incremental read. Now more precise.
d0125bd1 refactoring for readability. setjmp/longjmp for escape from deeply nested errors.

git-subtree-dir: lispBM/lispBM
git-subtree-split: c097f5c66bd539442a48d41a66da1c657af502a1
2023-05-22 08:17:23 +02:00
benchmarks Squashed 'lispBM/lispBM/' changes from 5659e40a..cb75bd53 2023-04-04 16:53:18 +02:00
chibios-examples Squashed 'lispBM/lispBM/' changes from c0fb4af8..4cc6358a 2022-09-16 10:45:44 +02:00
doc Squashed 'lispBM/lispBM/' changes from 6a448aa3..c097f5c6 2023-05-22 08:17:23 +02:00
docker Squashed 'lispBM/lispBM/' content from commit 748477b9 2022-01-29 17:26:45 +01:00
esp-examples/repl Squashed 'lispBM/lispBM/' changes from c2e0433a..aba5cf5a 2022-09-20 11:32:37 +02:00
examples Squashed 'lispBM/lispBM/' changes from 6a448aa3..c097f5c6 2023-05-22 08:17:23 +02:00
include Squashed 'lispBM/lispBM/' changes from 6a448aa3..c097f5c6 2023-05-22 08:17:23 +02:00
mascot Squashed 'lispBM/lispBM/' content from commit 748477b9 2022-01-29 17:26:45 +01:00
notes Squashed 'lispBM/lispBM/' content from commit 748477b9 2022-01-29 17:26:45 +01:00
old Squashed 'lispBM/lispBM/' changes from 6199703d..43ebce71 2022-03-25 15:47:05 +01:00
platform Squashed 'lispBM/lispBM/' changes from 60d7c83f..c0fb4af8 2022-09-16 09:25:46 +02:00
repl Squashed 'lispBM/lispBM/' changes from 6a448aa3..c097f5c6 2023-05-22 08:17:23 +02:00
sdlrepl Squashed 'lispBM/lispBM/' changes from 1eceb43f..1267d006 2023-01-24 09:19:05 +01:00
src Squashed 'lispBM/lispBM/' changes from 6a448aa3..c097f5c6 2023-05-22 08:17:23 +02:00
tests Squashed 'lispBM/lispBM/' changes from 6a448aa3..c097f5c6 2023-05-22 08:17:23 +02:00
utils Squashed 'lispBM/lispBM/' changes from 6f442405..28c56c43 2022-09-04 16:08:58 +02:00
videos Squashed 'lispBM/lispBM/' content from commit 748477b9 2022-01-29 17:26:45 +01:00
zephyr-examples Squashed 'lispBM/lispBM/' changes from 445930ec..d23c7fe2 2022-09-23 14:04:35 +02:00
.clang_complete Squashed 'lispBM/lispBM/' changes from aba5cf5a..445930ec 2022-09-21 14:46:29 +02:00
.gitignore Squashed 'lispBM/lispBM/' content from commit 748477b9 2022-01-29 17:26:45 +01: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 6a448aa3..c097f5c6 2023-05-22 08:17:23 +02:00
flash_nrf52_with_stlink.sh Squashed 'lispBM/lispBM/' content from commit 748477b9 2022-01-29 17:26:45 +01:00
lispbm.mk Squashed 'lispBM/lispBM/' changes from 4c2ea9e9..ac1d06ab 2023-04-02 16:35:42 +02:00
mktags.sh Squashed 'lispBM/lispBM/' changes from 3836952f..cdfd116c 2022-07-06 10:18:45 +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 6a448aa3..c097f5c6 2023-05-22 08:17:23 +02:00
setup_fw_build.sh Squashed 'lispBM/lispBM/' content from commit 748477b9 2022-01-29 17:26:45 +01:00
zephyr-source-me.sh Squashed 'lispBM/lispBM/' content from commit 748477b9 2022-01-29 17:26:45 +01: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.

  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.

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

Compile a 64bit binary for linux

  1. Build the repl: cd repl and then make all64

  2. Run the repl: ./repl

Compile a 32bit binary for linux (Requires 32bit libraries. May need something like "multilib" on a 64bit linux)

  1. Build the repl: cd repl and then make

  2. Run the repl: ./repl

Compile on Raspberry Pi

To build the library exeute the following command in the lispbm folder:

PLATFORM=pi make

To build the repl example repl do:

cd repl
make pirepl

Then start it up using ./repl Building the library is not a prerequisite for building the repl anymore.

SDL and LispBM

In the sdlrepl directory there is a start of a set of SDL bindings for LispBM.

To build this repl you need the following dependencies:

  1. libsdl2-dev - sudo apt-get install libsdl2-dev
  2. libsdl2-image-dev - sudo apt-get install libsdl2-image-dev

Then compile the repl using the command make