diff options
| author | Keith Packard <keithp@keithp.com> | 2016-11-01 21:14:45 -0700 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2016-11-17 22:18:39 -0800 |
| commit | 338723847e66f7c34a6b5e54d094ed52dc5665c3 (patch) | |
| tree | c53d501a9e5f29d84c8c4ab65d7198b0e5e14b12 /src/nucleao-32 | |
| parent | 75f07353a4fad170ac1cc6af98ed1aad7d1c0c88 (diff) | |
altos/lisp: Change lisp objects to use ao_poly everywhere. Add const
This makes all lisp objects use 16-bit ints for references so we can
hold more stuff in small amounts of memory. Also adds a separate
constant pool of lisp objects for builtins, initial atoms and constant
lisp code.
Now builds (and runs!) on the nucleo-32 boards.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/nucleao-32')
| -rw-r--r-- | src/nucleao-32/.gitignore | 2 | ||||
| -rw-r--r-- | src/nucleao-32/Makefile | 11 | ||||
| -rw-r--r-- | src/nucleao-32/ao_nucleo.c | 7 | ||||
| -rw-r--r-- | src/nucleao-32/flash-loader/.gitignore | 2 |
4 files changed, 22 insertions, 0 deletions
diff --git a/src/nucleao-32/.gitignore b/src/nucleao-32/.gitignore new file mode 100644 index 00000000..cb8f78e5 --- /dev/null +++ b/src/nucleao-32/.gitignore @@ -0,0 +1,2 @@ +ao_product.h +nucleo-32* diff --git a/src/nucleao-32/Makefile b/src/nucleao-32/Makefile index a160fd2f..0df44317 100644 --- a/src/nucleao-32/Makefile +++ b/src/nucleao-32/Makefile @@ -32,6 +32,17 @@ ALTOS_SRC = \ ao_mutex.c \ ao_usb_stm.c \ ao_serial_stm.c \ + ao_lisp_lex.c \ + ao_lisp_mem.c \ + ao_lisp_cons.c \ + ao_lisp_eval.c \ + ao_lisp_string.c \ + ao_lisp_atom.c \ + ao_lisp_int.c \ + ao_lisp_prim.c \ + ao_lisp_builtin.c \ + ao_lisp_read.c \ + ao_lisp_rep.c \ ao_exti_stm.c PRODUCT=Nucleo-32 diff --git a/src/nucleao-32/ao_nucleo.c b/src/nucleao-32/ao_nucleo.c index cda889c6..113e2399 100644 --- a/src/nucleao-32/ao_nucleo.c +++ b/src/nucleao-32/ao_nucleo.c @@ -13,6 +13,7 @@ */ #include <ao.h> +#include <ao_lisp.h> static uint16_t blink_delay, blink_running; @@ -41,11 +42,17 @@ static void blink_cmd() { ao_sleep(&blink_running); } +static void lisp_cmd() { + ao_lisp_read_eval_print(); +} + static const struct ao_cmds blink_cmds[] = { { blink_cmd, "b <delay, 0 off>\0Blink the green LED" }, + { lisp_cmd, "l\0Run lisp interpreter" }, { 0, 0 } }; + void main(void) { ao_led_init(LEDS_AVAILABLE); diff --git a/src/nucleao-32/flash-loader/.gitignore b/src/nucleao-32/flash-loader/.gitignore new file mode 100644 index 00000000..cb8f78e5 --- /dev/null +++ b/src/nucleao-32/flash-loader/.gitignore @@ -0,0 +1,2 @@ +ao_product.h +nucleo-32* |
