1 vpath % ..:../core:../product:../drivers:../stm
2 vpath ao-make-product.5c ../util
9 OBJCOPY=arm-none-eabi-objcopy
11 PDCLIB=/home/keithp/sat
12 C_LIB=$(PDCLIB)/lib/pdclib.a
13 C_INC=-I$(PDCLIB)/include
15 DEF_CFLAGS=-g -std=gnu99 -Os -mlittle-endian -mthumb -ffreestanding -nostdlib -I../../src/stm $(C_INC)
18 LD_FLAGS_RAM=-L../stm -Wl,-Taltos-ram.ld
19 LD_FLAGS=-L../stm -Wl,-Tbringup.ld
21 CFLAGS=$(DEF_CFLAGS) -mcpu=cortex-m3 -DCONFIG_STM32L_DISCOVERY
23 SRC=bringup.c ao_interrupt.c
26 all: bringup-ram.elf bringup.elf
29 $(OBJCOPY) -O binary $^ $@
31 bringup.elf: $(OBJ) $(C_LIB) bringup.ld
32 $(CC) $(CFLAGS) $(LD_FLAGS) -o $@ $(OBJ) $(C_LIB) -lgcc
34 bringup-ram.elf: $(OBJ) $(C_LIB) altos-ram.ld
35 $(CC) $(CFLAGS) $(LD_FLAGS_RAM) -o $@ $(OBJ) $(C_LIB) -lgcc