altos/lisp: Get lambdakey and nucleo-32 building again
authorKeith Packard <keithp@keithp.com>
Tue, 15 Nov 2016 18:18:12 +0000 (10:18 -0800)
committerKeith Packard <keithp@keithp.com>
Mon, 20 Feb 2017 19:16:51 +0000 (11:16 -0800)
Remove exti from the build list to make things fit.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/lambdakey-v1.0/Makefile
src/lisp/ao_lisp_builtin.c
src/nucleao-32/Makefile
src/nucleao-32/ao_nucleo.c
src/nucleao-32/ao_pins.h

index c71e1ab57d3f63ba3e9e932411ec70b1d3060fb8..7f71761b5355becf1823d0bf98cca2b92467af9f 100644 (file)
@@ -50,8 +50,7 @@ ALTOS_SRC = \
        ao_lisp_error.c \
        ao_lisp_lambda.c \
        ao_lisp_save.c \
-       ao_lisp_os_save.c \
-       ao_exti_stm.c
+       ao_lisp_os_save.c
 
 PRODUCT=LambdaKey-v1.0
 PRODUCT_DEF=-DLAMBDAKEY
index e4b7ef5219ab897aa73d3330cbd278769bb0334d..b808cbc51aa992c3c9a4aa9e4419f3d7d5beca85 100644 (file)
@@ -106,6 +106,7 @@ static const ao_poly ao_lisp_args_atoms[] = {
 char *
 ao_lisp_args_name(uint8_t args)
 {
+       args &= AO_LISP_FUNC_MASK;
        if (args < sizeof ao_lisp_args_atoms / sizeof ao_lisp_args_atoms[0])
                return ao_lisp_poly_atom(ao_lisp_args_atoms[args])->name;
        return "(unknown)";
index 388e581c5394b4165ffd7fd285319106206b5a53..57fb4cde626038beebb7acb728c02cf9629418a3 100644 (file)
@@ -34,6 +34,7 @@ ALTOS_SRC = \
        ao_mutex.c \
        ao_usb_stm.c \
        ao_serial_stm.c \
+       ao_flash_stm.c \
        ao_lisp_lex.c \
        ao_lisp_mem.c \
        ao_lisp_cons.c \
@@ -41,13 +42,15 @@ ALTOS_SRC = \
        ao_lisp_string.c \
        ao_lisp_atom.c \
        ao_lisp_int.c \
-       ao_lisp_prim.c \
+       ao_lisp_poly.c \
        ao_lisp_builtin.c \
        ao_lisp_read.c \
        ao_lisp_rep.c \
        ao_lisp_frame.c \
        ao_lisp_error.c \
-       ao_exti_stm.c
+       ao_lisp_lambda.c \
+       ao_lisp_save.c \
+       ao_lisp_os_save.c
 
 PRODUCT=Nucleo-32
 PRODUCT_DEF=-DNUCLEO
@@ -55,6 +58,8 @@ IDPRODUCT=0x000a
 
 CFLAGS = $(PRODUCT_DEF) $(STMF0_CFLAGS) -Os -g
 
+LDFLAGS=$(CFLAGS) -L$(TOPDIR)/stmf0 -Wl,-Tload.ld
+
 PROGNAME=nucleo-32
 PROG=$(PROGNAME)-$(VERSION).elf
 HEX=$(PROGNAME)-$(VERSION).ihx
index 113e2399aaebc7fe962186a8a19469835960c76c..3e448865f890288d49e45fbc9e411cd7451a5b2c 100644 (file)
 #include <ao.h>
 #include <ao_lisp.h>
 
-static uint16_t        blink_delay, blink_running;
-
-static void blink(void) {
-       blink_running = 1;
-       while (blink_delay) {
-               ao_led_on(AO_LED_GREEN);
-               ao_delay(blink_delay);
-               ao_led_off(AO_LED_GREEN);
-               ao_delay(blink_delay);
-       }
-       blink_running = 0;
-       ao_wakeup(&blink_running);
-       ao_exit();
-}
-
-struct ao_task blink_task;
-
-static void blink_cmd() {
-       ao_cmd_decimal();
-       blink_delay = ao_cmd_lex_i;
-       if (blink_delay && !blink_running)
-               ao_add_task(&blink_task, blink, "blink");
-       if (!blink_delay)
-               while (blink_running)
-                       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);
index 092d347cc7c42a582ea42b11ddf89bafa4e69446..e631db7bd5c763401490e6d6640514725bf9dc28 100644 (file)
@@ -25,8 +25,9 @@
 #define AO_LED_GREEN   (1 << LED_PIN_GREEN)
 #define AO_LED_PANIC   AO_LED_GREEN
 #define AO_CMD_LEN     128
-#define AO_LISP_POOL   1024
-#define AO_STACK_SIZE  1536
+#define AO_LISP_POOL_TOTAL     3072
+#define AO_LISP_SAVE   1
+#define AO_STACK_SIZE  1024
 
 #define LEDS_AVAILABLE (AO_LED_GREEN)