diff options
Diffstat (limited to 'src/stm-demo')
| -rw-r--r-- | src/stm-demo/.gitignore | 2 | ||||
| -rw-r--r-- | src/stm-demo/Makefile | 13 | ||||
| -rw-r--r-- | src/stm-demo/ao_demo.c | 9 | ||||
| -rw-r--r-- | src/stm-demo/ao_pins.h | 3 |
4 files changed, 18 insertions, 9 deletions
diff --git a/src/stm-demo/.gitignore b/src/stm-demo/.gitignore index 32b08ce8..2f5046fc 100644 --- a/src/stm-demo/.gitignore +++ b/src/stm-demo/.gitignore @@ -1,2 +1,2 @@ -stm-demo +stm-demo*.elf ao_product.h diff --git a/src/stm-demo/Makefile b/src/stm-demo/Makefile index 09c9c3ca..d1f825db 100644 --- a/src/stm-demo/Makefile +++ b/src/stm-demo/Makefile @@ -17,6 +17,7 @@ INC = \ # ALTOS_SRC = \ ao_interrupt.c \ + ao_boot_chain.c \ ao_product.c \ ao_romconfig.c \ ao_cmd.c \ @@ -44,19 +45,21 @@ PRODUCT=StmDemo-v0.0 PRODUCT_DEF=-DSTM_DEMO IDPRODUCT=0x000a -CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) -g -O0 +CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) -g -Os -PROG=stm-demo +PROG=stm-demo-$(VERSION) +ELF=$(PROG).elf +IHX=$(PROG).ihx SRC=$(ALTOS_SRC) ao_demo.c OBJ=$(SRC:.c=.o) -all: $(PROG) +all: $(ELF) $(IHX) LDFLAGS=-L../stm -Wl,-Taltos.ld -$(PROG): Makefile $(OBJ) - $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(SAT_CLIB) -lgcc +$(ELF): Makefile $(OBJ) + $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJ) $(SAT_CLIB) -lgcc ao_product.h: ao-make-product.5c ../Version $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@ diff --git a/src/stm-demo/ao_demo.c b/src/stm-demo/ao_demo.c index fe7c69f2..5677cdf4 100644 --- a/src/stm-demo/ao_demo.c +++ b/src/stm-demo/ao_demo.c @@ -20,6 +20,7 @@ #include <ao_event.h> #include <ao_quadrature.h> #include <ao_button.h> +#include <ao_boot.h> struct ao_task demo_task; @@ -183,17 +184,19 @@ main(void) { ao_clock_init(); + ao_task_init(); + ao_serial_init(); ao_timer_init(); ao_dma_init(); ao_cmd_init(); - ao_lcd_stm_init(); +// ao_lcd_stm_init(); // ao_lcd_font_init(); ao_spi_init(); ao_i2c_init(); ao_exti_init(); - ao_quadrature_init(); - ao_button_init(); +// ao_quadrature_init(); +// ao_button_init(); ao_timer_set_adc_interval(100); diff --git a/src/stm-demo/ao_pins.h b/src/stm-demo/ao_pins.h index c9c7446e..40e48a36 100644 --- a/src/stm-demo/ao_pins.h +++ b/src/stm-demo/ao_pins.h @@ -60,6 +60,7 @@ #define HAS_SPI_1 1 #define SPI_1_PB3_PB4_PB5 1 +#define SPI_1_OSPEEDR STM_OSPEEDR_10MHz #define HAS_SPI_2 0 @@ -67,6 +68,8 @@ #define HAS_BEEP 0 #define PACKET_HAS_SLAVE 0 +#define AO_BOOT_CHAIN 1 + #define LOW_LEVEL_DEBUG 1 #define LED_PORT_ENABLE STM_RCC_AHBENR_GPIOBEN |
