X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fstm-bringup%2FMakefile;h=797df2d697b4cc3ffd05cde93717855270386ad7;hb=1d3420e51db4d1a46237e97aeb189d2a8eba7f5e;hp=1bc5aaadd789060a44f0be9b11dd22289944f6ba;hpb=8c05f608c8f103649c1e5ec0d5742621e233af78;p=fw%2Faltos diff --git a/src/stm-bringup/Makefile b/src/stm-bringup/Makefile index 1bc5aaad..797df2d6 100644 --- a/src/stm-bringup/Makefile +++ b/src/stm-bringup/Makefile @@ -4,15 +4,15 @@ 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 -PDCLIB=/opt/cortex -C_LIB=$(PDCLIB)/lib/pdclib-cortex-m3.a -C_INC=-I$(PDCLIB)/include +C_LIB=$(PDCLIB_LIBS_M3) -DEF_CFLAGS=-g -std=gnu99 -Os -mlittle-endian -mthumb -ffreestanding -nostdlib -I. -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=-L../stm -Wl,-Taltos-ram.ld @@ -28,10 +28,10 @@ all: bringup-ram.elf bringup.elf %.bin: %.elf $(OBJCOPY) -O binary $^ $@ -bringup.elf: $(OBJ) $(C_LIB) bringup.ld +bringup.elf: $(OBJ) bringup.ld $(CC) $(CFLAGS) $(LD_FLAGS) -o $@ $(OBJ) $(C_LIB) -lgcc -bringup-ram.elf: $(OBJ) $(C_LIB) altos-ram.ld +bringup-ram.elf: $(OBJ) altos-ram.ld $(CC) $(CFLAGS) $(LD_FLAGS_RAM) -o $@ $(OBJ) $(C_LIB) -lgcc clean: