diff options
| -rw-r--r-- | src/lambdakey-v1.0/Makefile | 3 | ||||
| -rw-r--r-- | src/lisp/ao_lisp_builtin.c | 1 | ||||
| -rw-r--r-- | src/nucleao-32/Makefile | 9 | ||||
| -rw-r--r-- | src/nucleao-32/ao_nucleo.c | 29 | ||||
| -rw-r--r-- | src/nucleao-32/ao_pins.h | 5 | 
5 files changed, 12 insertions, 35 deletions
| diff --git a/src/lambdakey-v1.0/Makefile b/src/lambdakey-v1.0/Makefile index c71e1ab5..7f71761b 100644 --- a/src/lambdakey-v1.0/Makefile +++ b/src/lambdakey-v1.0/Makefile @@ -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 diff --git a/src/lisp/ao_lisp_builtin.c b/src/lisp/ao_lisp_builtin.c index e4b7ef52..b808cbc5 100644 --- a/src/lisp/ao_lisp_builtin.c +++ b/src/lisp/ao_lisp_builtin.c @@ -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)"; diff --git a/src/nucleao-32/Makefile b/src/nucleao-32/Makefile index 388e581c..57fb4cde 100644 --- a/src/nucleao-32/Makefile +++ b/src/nucleao-32/Makefile @@ -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 diff --git a/src/nucleao-32/ao_nucleo.c b/src/nucleao-32/ao_nucleo.c index 113e2399..3e448865 100644 --- a/src/nucleao-32/ao_nucleo.c +++ b/src/nucleao-32/ao_nucleo.c @@ -15,44 +15,15 @@  #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); diff --git a/src/nucleao-32/ao_pins.h b/src/nucleao-32/ao_pins.h index 092d347c..e631db7b 100644 --- a/src/nucleao-32/ao_pins.h +++ b/src/nucleao-32/ao_pins.h @@ -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) | 
