diff options
| author | Keith Packard <keithp@keithp.com> | 2013-02-24 00:18:14 -0800 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2013-03-10 18:05:49 -0700 |
| commit | 5187bb4402874f654fcef5ffdf237edf97a26b8c (patch) | |
| tree | b8befdce30b39cff603ac6701578581fb876f738 /src/stm-flash/Makefile | |
| parent | 90ee11542b111befa0e96e27292dc548e5c37396 (diff) | |
Add STM self-flashing loader
This allows the real application to get loaded at 0x2000 and jumps to
that at startup time if the boot pin is set appropriately
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm-flash/Makefile')
| -rw-r--r-- | src/stm-flash/Makefile | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/stm-flash/Makefile b/src/stm-flash/Makefile new file mode 100644 index 00000000..fbc6603d --- /dev/null +++ b/src/stm-flash/Makefile @@ -0,0 +1,60 @@ +# +# AltOS build +# +# + +include ../stm/Makefile.defs + +INC = \ + ao.h \ + ao_arch.h \ + ao_arch_funcs.h \ + ao_pins.h \ + ao_product.h + +# +# Common AltOS sources +# +ALTOS_SRC = \ + ao_interrupt.c \ + ao_product.c \ + ao_romconfig.c \ + ao_task.c \ + ao_timer.c \ + ao_mutex.c \ + ao_usb_stm.c \ + ao_stdio.c \ + ao_cmd.c + +PRODUCT=StmFlash-v0.0 +PRODUCT_DEF=-DSTM_FLASH +IDPRODUCT=0x000a + +CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) -g -Os + +PROG=stm-flash + +SRC=$(ALTOS_SRC) ao_stm_flash.c +OBJ=$(SRC:.c=.o) + +all: $(PROG) + +LDFLAGS=-L../stm -Wl,-Taltos-loader.ld + +$(PROG): Makefile $(OBJ) + $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(SAT_CLIB) -lgcc + +ao_product.h: ao-make-product.5c ../Version + $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@ + +$(OBJ): $(INC) + +distclean: clean + +clean: + rm -f *.o $(PROG) + rm -f ao_product.h + +install: + +uninstall: |
