1 vpath % ..:../core:../product:../drivers:../stm
2 vpath ao-make-product.5c ../util
9 OBJCOPY=arm-none-eabi-objcopy
11 C_LIB=-lpdclib-cortex-m3
13 DEF_CFLAGS=-g -std=gnu99 -Os -mlittle-endian -mthumb -ffreestanding -nostdlib -I. -I../stm
16 LD_FLAGS_RAM=-L../stm -Wl,-Taltos-ram.ld
17 LD_FLAGS=-L../stm -Wl,-Tbringup.ld
19 CFLAGS=$(DEF_CFLAGS) -mcpu=cortex-m3 -DCONFIG_STM32L_DISCOVERY
21 SRC=bringup.c ao_interrupt.c
24 all: bringup-ram.elf bringup.elf
27 $(OBJCOPY) -O binary $^ $@
29 bringup.elf: $(OBJ) bringup.ld
30 $(CC) $(CFLAGS) $(LD_FLAGS) -o $@ $(OBJ) $(C_LIB) -lgcc
32 bringup-ram.elf: $(OBJ) altos-ram.ld
33 $(CC) $(CFLAGS) $(LD_FLAGS_RAM) -o $@ $(OBJ) $(C_LIB) -lgcc