X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fstm-bringup%2FMakefile;h=797df2d697b4cc3ffd05cde93717855270386ad7;hp=49966a4fd5a9c4a1a6486b04f6a08daca53c7875;hb=8f529633cd4be8a0edb1b067bbf5d7cc055dcc1b;hpb=9279fd42793123784ce83ca151df6f4630487722 diff --git a/src/stm-bringup/Makefile b/src/stm-bringup/Makefile index 49966a4f..797df2d6 100644 --- a/src/stm-bringup/Makefile +++ b/src/stm-bringup/Makefile @@ -1,35 +1,46 @@ +vpath % ..:../core:../product:../drivers:../stm +vpath ao-make-product.5c ../util + +ifndef VERSION +include ../Version +endif +TOPDIR=.. +include $(TOPDIR)/Makedefs + CC=arm-none-eabi-gcc OBJCOPY=arm-none-eabi-objcopy -C_LIB=/local/src/pdclib/pdclib.a -C_INC=-I/local/src/pdclib/includes -I/local/src/pdclib/internals +C_LIB=$(PDCLIB_LIBS_M3) -DEF_CFLAGS=-g -std=gnu99 -O0 -mlittle-endian -mthumb -ffreestanding -nostdlib -I../../src/stm $(C_INC) +DEF_CFLAGS=-g -std=gnu99 -Os -mlittle-endian -mthumb -ffreestanding -nostdlib -I. -I../stm $(PDCLIB_INCLUDES) # to run from SRAM -LD_FLAGS_RAM=-Wl,-Taltos-ram.ld -LD_FLAGS=-Wl,-Taltos.ld +LD_FLAGS_RAM=-L../stm -Wl,-Taltos-ram.ld +LD_FLAGS=-L../stm -Wl,-Tbringup.ld CFLAGS=$(DEF_CFLAGS) -mcpu=cortex-m3 -DCONFIG_STM32L_DISCOVERY -OBJS=bringup.o +SRC=bringup.c ao_interrupt.c +OBJ=$(SRC:.c=.o) all: bringup-ram.elf bringup.elf %.bin: %.elf $(OBJCOPY) -O binary $^ $@ -bringup.elf: $(OBJS) $(C_LIB) altos.ld - $(CC) $(CFLAGS) $(LD_FLAGS) -o $@ $(OBJS) $(C_LIB) -lgcc - -bringup-ram.elf: $(OBJS) $(C_LIB) altos-ram.ld - $(CC) $(CFLAGS) $(LD_FLAGS_RAM) -o $@ $(OBJS) $(C_LIB) -lgcc +bringup.elf: $(OBJ) bringup.ld + $(CC) $(CFLAGS) $(LD_FLAGS) -o $@ $(OBJ) $(C_LIB) -lgcc -bringup.o: bringup.c - $(CC) -c $(CFLAGS) bringup.c +bringup-ram.elf: $(OBJ) altos-ram.ld + $(CC) $(CFLAGS) $(LD_FLAGS_RAM) -o $@ $(OBJ) $(C_LIB) -lgcc clean: + rm -f *.o rm -rf *.elf rm -rf *.bin .PHONY: all clean + +install: + +uninstall: