include ../stm32f4/Makefile-raw.defs
-aoschemelib=$(shell pkg-config --variable=aoschemelib ao-scheme)
-
-include $(aoschemelib)/Makefile-scheme
-
IDVENDOR=0xfffe
IDPRODUCT=0xfffa
PRODUCT=stm32f4-disco
ao_pins.h \
ao_task.h \
ao_product.h \
- $(SCHEME_HDRS) \
- ao_scheme_const.h \
stm32f4.h \
Makefile
ao_usb_gen.c \
ao_usb_stm32f4.c \
ao_led.c \
- ao_impure.c \
- $(SCHEME_SRCS)
+ ao_impure.c
-CFLAGS = $(STM32F4_CFLAGS) -I$(aoschemelib)
+CFLAGS = $(STM32F4_CFLAGS)
PROG=stm32f4-disco-$(VERSION)
ELF=$(PROG).elf
$(OBJ): $(INC)
-ao_product.h: ao-make-product.5c ../Version Makefile
- $(call quiet,NICKLE,$<) $< -m altusmetrum.org -V $(IDVENDOR) -s $(SERIAL) -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
-
-SCHEME_SCHEME=\
- ao_scheme_basic_syntax.scheme \
- ao_scheme_list.scheme \
- ao_scheme_advanced_syntax.scheme \
- ao_scheme_vector.scheme \
- ao_scheme_string.scheme \
- ao_scheme_char.scheme \
- ao_scheme_number.scheme
-
-ao_scheme_const.h: ao-scheme-make-const-big $(SCHEME_SCHEME)
- $^ -o $@ -d POSIX,PORT,SAVE
-
distclean: clean
clean:
*/
#include <ao.h>
-#include <ao_scheme.h>
#include <ao_usb.h>
-static void scheme_cmd() {
- ao_scheme_read_eval_print(stdin, stdout, false);
-}
-
-static const struct ao_cmds scheme_cmds[] = {
- { scheme_cmd, "l\0Run scheme interpreter" },
- { 0, 0 }
-};
-
-int
-_ao_scheme_getc(void)
-{
- static uint8_t at_eol;
- int c;
-
- if (at_eol) {
- ao_cmd_readline(ao_scheme_read_list ? "- " : "> ");
- at_eol = 0;
- }
- c = (unsigned char) ao_cmd_lex();
- if (c == '\n')
- at_eol = 1;
- return c;
-}
-
void main(void)
{
ao_clock_init();
ao_usart_init();
ao_usb_init();
ao_cmd_init();
- ao_cmd_register(scheme_cmds);
ao_start_scheduler();
}