bldc/lispBM/lispBM
Benjamin Vedder 1bc0baf2da Merge commit '65a3ed7ca429d343051fb687a7929c4a1201c9b5' 2023-01-24 09:19:05 +01:00
..
benchmarks Merge commit 'b9245524001b40c33da129e41975cad78e75a99f' 2022-10-17 14:42:17 +02:00
chibios-examples Merge commit '1b76c9c67e60d97f52954c7008bfccaff7bb7841' 2022-09-16 10:45:44 +02:00
doc Merge commit 'b0ee9284373a7cc4f75a1db4acc3fde3efb5949e' 2022-11-23 18:29:01 +01:00
docker
esp-examples/repl Merge commit '08c0898a0edbbdd42ab7402eb8d15189aa6f93af' 2022-09-20 11:32:37 +02:00
examples Merge commit 'fb303346de910fa234a478addc4d705ac4b18112' 2022-09-23 14:04:35 +02:00
include Merge commit '65a3ed7ca429d343051fb687a7929c4a1201c9b5' 2023-01-24 09:19:05 +01:00
mascot
notes
old Merge commit '9a624330155a43f2a980fd22dae6de911840e34e' 2022-03-25 15:47:05 +01:00
platform Merge commit '9bd826e646762897f4d642f0c519c895f7f53306' 2022-09-16 09:25:46 +02:00
repl Merge commit '65a3ed7ca429d343051fb687a7929c4a1201c9b5' 2023-01-24 09:19:05 +01:00
sdlrepl Merge commit '65a3ed7ca429d343051fb687a7929c4a1201c9b5' 2023-01-24 09:19:05 +01:00
src Merge commit '65a3ed7ca429d343051fb687a7929c4a1201c9b5' 2023-01-24 09:19:05 +01:00
tests Merge commit '65a3ed7ca429d343051fb687a7929c4a1201c9b5' 2023-01-24 09:19:05 +01:00
utils Merge commit 'b82ab77c6c9fd9d96e273c3ef17f0908aec6243a' 2022-09-04 16:08:58 +02:00
videos
zephyr-examples Merge commit 'fb303346de910fa234a478addc4d705ac4b18112' 2022-09-23 14:04:35 +02:00
.clang_complete Merge commit 'e9123e197b9df8aba663e08ac0454419668e2634' 2022-09-21 14:46:29 +02:00
.gitignore
.travis.yml
CODE_OF_CONDUCT.md Merge commit '7d5f408054b524a9a06c8afe37e371c6ee753588' 2022-11-04 18:08:08 +01:00
LICENSE
Makefile Merge commit 'b82ab77c6c9fd9d96e273c3ef17f0908aec6243a' 2022-09-04 16:08:58 +02:00
README.md Merge commit '378490e865c4576654e5cee14f7901cd68bfa367' 2022-11-07 10:44:47 +01:00
flash_nrf52_with_stlink.sh
lispbm.mk Merge commit '65a3ed7ca429d343051fb687a7929c4a1201c9b5' 2023-01-24 09:19:05 +01:00
mktags.sh Merge commit '85ee6ead0306844c2a05f4b205479d0be4272d0c' 2022-07-06 10:18:45 +02:00
runinfer.sh Merge commit '9a624330155a43f2a980fd22dae6de911840e34e' 2022-03-25 15:47:05 +01:00
runsa.sh Merge commit 'b82ab77c6c9fd9d96e273c3ef17f0908aec6243a' 2022-09-04 16:08:58 +02:00
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 topof 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.

Documentation

Features

  1. heap consisting of cons-cells with mark and sweep garbage collection.
  2. Built-in functions: cons, car, cdr, eval, list, +, -, >, <, = and more.
  3. Some special forms: Lambdas, closures, lets (letrecs), define and quote.
  4. 28-Bit signed/unsigned integers and boxed 32-Bit Float, 32-Bit signed/unsigned values.
  5. Arrays (in progress), string is an array.
  6. Quasiquotation.
  7. Concurrency.
  8. Message-passing.
  9. Pattern-matching.

Vague or continuosly ongoing todos

  1. Doxygen?
  2. Tutorials?
  3. Be much more stringent on checking of error conditions etc.
  4. Make uniform how to return success or failure. It is sometimes bool and sometimes int right now.

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