1 vpath % ..:../kernel:../product:../drivers:../stm
2 vpath ao-make-product.5c ../util
8 include $(TOPDIR)/Makedefs
11 OBJCOPY=arm-none-eabi-objcopy
13 C_LIB=$(PDCLIB_LIBS_M3)
15 DEF_CFLAGS= -std=gnu99 -mlittle-endian -mthumb -ffreestanding -nostdlib -I. -I../stm $(PDCLIB_INCLUDES)
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) bringup.ld
32 $(CC) $(CFLAGS) $(LD_FLAGS) -o $@ $(OBJ) $(C_LIB) -lgcc
34 bringup-ram.elf: $(OBJ) altos-ram.ld
35 $(CC) $(CFLAGS) $(LD_FLAGS_RAM) -o $@ $(OBJ) $(C_LIB) -lgcc