diff options
author | Fredrik Thulin <fredrik@thulin.net> | 2015-09-02 16:42:14 +0200 |
---|---|---|
committer | Fredrik Thulin <fredrik@thulin.net> | 2015-09-02 16:42:14 +0200 |
commit | 9ad42067f92af1d717fecf355d429c2d381010a5 (patch) | |
tree | 22b1be1324e61473ce228f1c6b7e99024726cada /src/fmc-test/Makefile | |
parent | 3e4f402c0f93f76535511fa7b6ec12d060430f34 (diff) |
Import of Pavel's fmc-test application.
Copied here and slightly adapted to GCC build environment
(standard directory names and added Makefile).
Based on this commit:
commit 43b94a6ada83454c3404bda019ec114f97379c82
Author: Pavel V. Shatov <meisterpaul1@yandex.ru>
Date: Thu Aug 27 00:01:24 2015 +0400
Initial version of FMC driver for STM32.
in the repository git.cryptech.is.:user/shatov/fmc-test.
Diffstat (limited to 'src/fmc-test/Makefile')
-rw-r--r-- | src/fmc-test/Makefile | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/fmc-test/Makefile b/src/fmc-test/Makefile new file mode 100644 index 0000000..0cd5524 --- /dev/null +++ b/src/fmc-test/Makefile @@ -0,0 +1,50 @@ +# put your *.o targets here, make should handle the rest! +SRCS = main.c stm32f4xx_hal_msp.c stm32f4xx_it.c stm-fmc.c +#main.c stm_init.c stm32f4xx_it.c stm32f4xx_hal_msp.c + +# all the files will be generated with this name +PROJ_NAME=fmc-test + +TOPLEVEL=../.. +include $(TOPLEVEL)/common.mk + +OBJS = $(SRCS:.c=.o) + +################################################### + +.PHONY: lib proj + +all: lib proj + +lib: + $(MAKE) -C $(STD_PERIPH_LIB) STDPERIPH_SETTINGS="$(STDPERIPH_SETTINGS) -I $(PWD)/include" + +proj: $(PROJ_NAME).elf + +$(PROJ_NAME).elf: $(SRCS) + $(CC) $(CFLAGS) $^ -o $@ -L$(STD_PERIPH_LIB) -lstmf4 -L$(LDSCRIPT_INC) -T$(MCU_LINKSCRIPT) -g + $(OBJCOPY) -O ihex $(PROJ_NAME).elf $(PROJ_NAME).hex + $(OBJCOPY) -O binary $(PROJ_NAME).elf $(PROJ_NAME).bin + $(OBJDUMP) -St $(PROJ_NAME).elf >$(PROJ_NAME).lst + $(SIZE) $(PROJ_NAME).elf + +clean: + find ./ -name '*~' | xargs rm -f + rm -f *.o + rm -f $(PROJ_NAME).elf + rm -f $(PROJ_NAME).hex + rm -f $(PROJ_NAME).bin + rm -f $(PROJ_NAME).map + rm -f $(PROJ_NAME).lst + +really-clean: clean + $(MAKE) -C $(STD_PERIPH_LIB) clean + +debug: + $(GDB) -ex "target remote localhost:3333" \ + -ex "set remote hardware-breakpoint-limit 6" \ + -ex "set remote hardware-watchpoint-limit 4" $(PROJ_NAME).elf + +flash-target: + $(OPENOCD) -f $(OPENOCD_BOARD_DIR)/$(OPENOCD_PROC_FILE) \ + -c "program $(PROJ_NAME).elf verify reset" |