diff options
| author | Bdale Garbee <bdale@gag.com> | 2018-10-20 01:18:12 -0600 |
|---|---|---|
| committer | Bdale Garbee <bdale@gag.com> | 2018-10-20 01:18:12 -0600 |
| commit | 0686a7b8aec524d81bda4c572549a3a068ce0eed (patch) | |
| tree | 2e6061c834b99e3b9668be8b3cfb1627251365d3 /src/stm32f4/Makefile-flash.defs | |
| parent | 6aa451ce81bfdfe679e3f9902043a5f0d235c745 (diff) | |
| parent | cc528f1ff0271ec6488a1a7b91c731183502101e (diff) | |
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Diffstat (limited to 'src/stm32f4/Makefile-flash.defs')
| -rw-r--r-- | src/stm32f4/Makefile-flash.defs | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/src/stm32f4/Makefile-flash.defs b/src/stm32f4/Makefile-flash.defs new file mode 100644 index 00000000..1a2aa75c --- /dev/null +++ b/src/stm32f4/Makefile-flash.defs @@ -0,0 +1,68 @@ +include $(TOPDIR)/stm32f4/Makefile-stm32f4.defs + +INC = \ + ao.h \ + ao_arch.h \ + ao_arch_funcs.h \ + ao_flash_pins.h \ + ao_flash_stm_pins.h \ + ao_flash_task.h \ + ao_pins.h \ + ao_product.h \ + Makefile + +# +# Common AltOS sources +# +SRC = \ + ao_interrupt.c \ + ao_romconfig.c \ + ao_boot_chain.c \ + ao_boot_pin.c \ + ao_product.c \ + ao_notask.c \ + ao_timer.c \ + ao_usb_stm.c \ + ao_flash_stm.c \ + ao_flash_task.c \ + ao_flash_loader_stm.c + +OBJ=$(SRC:.c=.o) + +PRODUCT=AltosFlash +PRODUCT_DEF=-DALTOS_FLASH +IDPRODUCT=0x000a + +CFLAGS = $(PRODUCT_DEF) $(STM32F4_CFLAGS) -g -Os + +LDFLAGS=$(CFLAGS) -L$(TOPDIR)/stm32f4 -Wl,-Taltos-loader.ld + +PROGNAME=altos-flash +PROG=$(HARDWARE)-$(PROGNAME)-$(VERSION).elf +BIN=$(HARDWARE)-$(PROGNAME)-$(VERSION).bin + +MAKEBIN=$(TOPDIR)/../ao-tools/ao-makebin/ao-makebin +FLASH_ADDR=0x08000000 + +all: $(PROG) $(BIN) + +$(PROG): Makefile $(OBJ) altos-loader.ld + $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(LIBS) + +$(BIN): $(PROG) + $(MAKEBIN) --output=$@ --base=$(FLASH_ADDR) $(PROG) + +ao_product.h: ao-make-product.5c $(TOPDIR)/Version + $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@ + +$(OBJ): $(INC) + +distclean: clean + +clean: + rm -f *.o $(HARDWARE)-$(PROGNAME)-*.elf $(HARDWARE)-$(PROGNAME)-*.bin + rm -f ao_product.h + +install: + +uninstall: |
