LispBM
|
LispBM is intended to be integrated into a larger application and then building LispBM is a part of building that larger application. Currently there are no detailed instructions on how to set that up other than the examples that exists in vesc_express, BLDC. and in the LispBM REPL.
The following flags can be used when building LispBM to turn features on or off. These should be added as a -D... flag to the C compiler for the LispBM compilation units.
Start by cloning the LispBM repository. Open a terminal and issue command
You should now have a directory called lispBM. Go into it and into the repl
subdirectory.
Now, you have multiple choices on how to build the REPL. To build the 32bit version (which is most similar to what you will run on a microcontroller) issue the make
command.
If the make command above fails, it is most likely because there are some missing dependencies.
Building the 32bit version of the repl requires 32bit libraries. If you are on an Ubuntu platform you get 32bit standard libraries by installing gcc-multilib
.
In addition to gcc-multilib
the REPL requires libreadline andlibpng. You need to get the 32bit versions of these libraries. On Ubuntu you can run the following commands.
If you were unable to install the 32bit dependencies with the command above, you may need to instruct the package manager that you are interested in 32bit packages as well.
Then retry the previous step to install the dependencies.
If installing the dependencies finished successfully, make
should now work and the repl executable should be built.
Start the REPL and explore!
You should now be greeted by the LispBM REPL in a way similar to what is shown below.
When you input code at the #
prompt, LispBM answers on a new line starting with >
.
Alternatively the REPL can be built as a 64bit binary. Building the 64bit binary requires 64bit versions of the readline and png libraries.
On Ubuntu you get the dependcies by doing sudo apt install libreadline-dev libpng-dev
. Then to build the executable you issue the following command.
Lastly, the REPL can be build with SDL (Simple Directmedia Layer) for graphical output. This is done by issueing the following command.
Or for 32bit.
The REPL with SDL requires libsdl2-dev
and libsdl2-image-dev
libraries or the 32 bit versions (for 32bit repl binary) libsdl2-dev:i386
and libsdl2-image-dev:i386
.