]> git.gag.com Git - fw/altos/blob - src/stmf0/Makefile-flash.defs
drivers: Add BMI088 driver
[fw/altos] / src / stmf0 / Makefile-flash.defs
1 include $(TOPDIR)/stmf0/Makefile-stmf0.defs
2
3 INC = \
4         ao.h \
5         ao_arch.h \
6         ao_arch_funcs.h \
7         ao_flash_pins.h \
8         ao_flash_stm_pins.h \
9         ao_flash_task.h \
10         ao_pins.h \
11         ao_product.h \
12         Makefile
13
14 #
15 # Common AltOS sources
16 #
17 SRC = \
18         ao_interrupt.c \
19         ao_romconfig.c \
20         ao_boot_chain.c \
21         ao_boot_pin.c \
22         ao_product.c \
23         ao_notask.c \
24         ao_timer.c \
25         ao_usb_stm.c \
26         ao_flash_stm.c \
27         ao_flash_task.c \
28         ao_flash_loader_stm.c
29
30 OBJ=$(SRC:.c=.o)
31
32 PRODUCT=AltosFlash
33 PRODUCT_DEF=-DALTOS_FLASH
34 IDPRODUCT=0x000a
35
36 CFLAGS = $(PRODUCT_DEF) $(STMF0_CFLAGS)
37
38 LDFLAGS=-nostartfiles $(CFLAGS) -L$(TOPDIR)/stmf0 -Taltos-loader.ld
39
40 PROGNAME=$(HARDWARE)-altos-flash
41 PROG=$(PROGNAME)-$(VERSION).elf
42 BIN=$(PROGNAME)-$(VERSION).bin
43
44 MAKEBIN=$(TOPDIR)/../ao-tools/ao-makebin/ao-makebin
45 FLASH_ADDR=0x08000000
46
47 all: $(PROG) $(BIN)
48
49 $(PROG): Makefile $(OBJ) altos-loader.ld
50         $(call quiet,CC) $(LDFLAGS) -o $(PROG) $(OBJ) $(LIBS)
51
52 $(BIN): $(PROG)
53         $(MAKEBIN) --output=$@ --base=$(FLASH_ADDR) $(PROG)
54
55 $(OBJ): $(INC)
56
57 distclean:      clean
58
59 clean:
60         rm -f *.o $(PROGNAME)-*.elf $(PROGNAME)-*.bin $(PROGNAME)-*.map
61         rm -f ao_product.h
62
63 install:
64
65 uninstall: