projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add stm bringup timers and move most of the setup code to the stm dir
[fw/altos]
/
src
/
stm-bringup
/
Makefile
diff --git
a/src/stm-bringup/Makefile
b/src/stm-bringup/Makefile
index 49966a4fd5a9c4a1a6486b04f6a08daca53c7875..1ba480ba9d401c19b9f2eace0fae53f311106122 100644
(file)
--- a/
src/stm-bringup/Makefile
+++ b/
src/stm-bringup/Makefile
@@
-1,34
+1,41
@@
+vpath % ..:../core:../product:../drivers:../stm
+vpath ao-make-product.5c ../util
+
+ifndef VERSION
+include ../Version
+endif
+
CC=arm-none-eabi-gcc
OBJCOPY=arm-none-eabi-objcopy
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
+PDCLIB=/home/keithp/sat
+C_LIB=$(PDCLIB)/lib/pdclib.a
+C_INC=-I$(PDCLIB)/include
-DEF_CFLAGS=-g -std=gnu99 -O
0
-mlittle-endian -mthumb -ffreestanding -nostdlib -I../../src/stm $(C_INC)
+DEF_CFLAGS=-g -std=gnu99 -O
s
-mlittle-endian -mthumb -ffreestanding -nostdlib -I../../src/stm $(C_INC)
# to run from SRAM
# 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,-Taltos.ld
CFLAGS=$(DEF_CFLAGS) -mcpu=cortex-m3 -DCONFIG_STM32L_DISCOVERY
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 $^ $@
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) $(C_LIB) altos.ld
+ $(CC) $(CFLAGS) $(LD_FLAGS) -o $@ $(OBJ) $(C_LIB) -lgcc
-bringup
.o: bringup.c
- $(CC)
-c $(CFLAGS) bringup.
c
+bringup
-ram.elf: $(OBJ) $(C_LIB) altos-ram.ld
+ $(CC)
$(CFLAGS) $(LD_FLAGS_RAM) -o $@ $(OBJ) $(C_LIB) -lgc
c
clean:
clean:
+ rm -f *.o
rm -rf *.elf
rm -rf *.bin
rm -rf *.elf
rm -rf *.bin