diff options
| author | Keith Packard <keithp@keithp.com> | 2013-02-24 00:18:14 -0800 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2013-05-07 20:12:40 -0700 |
| commit | a6887032b4d217bca5236ea15389218f10d69545 (patch) | |
| tree | 8e6673e7046bc90773ffd4f52b448fdf5109ba8c /src/stm-flash/Makefile | |
| parent | 887209b61ac3012d0fd2206cf1016c44f59cb432 (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: |
