summaryrefslogtreecommitdiff
path: root/src/stm/Makefile-flash.defs
diff options
context:
space:
mode:
Diffstat (limited to 'src/stm/Makefile-flash.defs')
-rw-r--r--src/stm/Makefile-flash.defs45
1 files changed, 4 insertions, 41 deletions
diff --git a/src/stm/Makefile-flash.defs b/src/stm/Makefile-flash.defs
index 66ad1637..08a4b177 100644
--- a/src/stm/Makefile-flash.defs
+++ b/src/stm/Makefile-flash.defs
@@ -1,40 +1,4 @@
-vpath % $(TOPDIR)/stm:$(TOPDIR)/product:$(TOPDIR)/drivers:$(TOPDIR)/kernel:$(TOPDIR)/util:$(TOPDIR)
-vpath ao-make-product.5c $(TOPDIR)/util
-
-.SUFFIXES: .elf .ihx
-
-.elf.ihx:
- objcopy -O ihex $*.elf $@
-
-ifndef VERSION
-include $(TOPDIR)/Version
-endif
-include $(TOPDIR)/Makedefs
-
-CC=$(ARM_CC)
-LIBS=-L$(NEWLIB_NANO)/arm-none-eabi/lib/thumb/v7-m -lc -lm -lgcc
-
-AO_CFLAGS=-I. -I$(TOPDIR)/stm -I$(TOPDIR)/kernel -I$(TOPDIR)/drivers \
- -DNEWLIB_INTEGER_PRINTF_SCANF \
- -I$(TOPDIR)/product -I$(TOPDIR) -isystem $(NEWLIB_NANO)/arm-none-eabi/include
-
-STM_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m3 -mthumb \
- -ffreestanding -nostdlib $(AO_CFLAGS) $(SAT_CFLAGS)
-
-LDFLAGS=-L$(TOPDIR)/stm -Wl,-Taltos-loader.ld
-
-NICKLE=nickle
-
-V=0
-# The user has explicitly enabled quiet compilation.
-ifeq ($(V),0)
-quiet = @printf " $1 $2 $@\n"; $($1)
-endif
-# Otherwise, print the full command line.
-quiet ?= $($1)
-
-.c.o:
- $(call quiet,CC) -c $(CFLAGS) -o $@ $<
+include $(TOPDIR)/stm/Makefile-stm.defs
INC = \
ao.h \
@@ -69,7 +33,9 @@ PRODUCT=AltosFlash
PRODUCT_DEF=-DALTOS_FLASH
IDPRODUCT=0x000a
-CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) -g -Os
+CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS)
+
+LDFLAGS=$(CFLAGS) -L$(TOPDIR)/stm -Wl,-Taltos-loader.ld -n
PROGNAME=altos-flash
PROG=$(HARDWARE)-$(PROGNAME)-$(VERSION).elf
@@ -77,9 +43,6 @@ PROG=$(HARDWARE)-$(PROGNAME)-$(VERSION).elf
$(PROG): Makefile $(OBJ) altos-loader.ld
$(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(LIBS)
-ao_product.h: ao-make-product.5c $(TOPDIR)/Version
- $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
-
$(OBJ): $(INC)
all: $(PROG)