aboutsummaryrefslogtreecommitdiff
path: root/fw/Makefile
diff options
context:
space:
mode:
authorjaseg <git@jaseg.net>2017-08-23 10:50:16 +0200
committerjaseg <git@jaseg.net>2017-08-23 10:50:16 +0200
commit95e1a0364847919a36cba5352e82ad56c9950251 (patch)
tree894fbe800b630d2e5a8c4ad8e3e7e73f8645526a /fw/Makefile
parente9f79a2e999502b86c733115d31729fbd435cbf2 (diff)
download7seg-95e1a0364847919a36cba5352e82ad56c9950251.tar.gz
7seg-95e1a0364847919a36cba5352e82ad56c9950251.tar.bz2
7seg-95e1a0364847919a36cba5352e82ad56c9950251.zip
Add transpose test
Diffstat (limited to 'fw/Makefile')
-rw-r--r--fw/Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/fw/Makefile b/fw/Makefile
index 6ff1686..8296708 100644
--- a/fw/Makefile
+++ b/fw/Makefile
@@ -34,6 +34,9 @@ LDFLAGS += -L$(CMSIS_PATH)/Lib/GCC -larm_cortexM0l_math
all: main.elf main.pdf
+cmsis_exports.c: $(CMSIS_DEV_PATH)/Include/stm32f030x6.h $(CMSIS_PATH)/Include/core_cm0.h
+ python3 gen_cmsis_exports.py $^ > $@
+
%.o: %.c
$(CC) -c $(CFLAGS) -o $@ $^
$(CC) -E $(CFLAGS) -o $(@:.o=.pp) $^
@@ -45,7 +48,7 @@ all: main.elf main.pdf
%.dot: %.elf
r2 -a arm -qc 'aa;agC' $< 2>/dev/null >$@
-main.elf: main.o startup_stm32f030x6.o system_stm32f0xx.o $(HAL_PATH)/Src/stm32f0xx_ll_utils.o base.o semihosting.o
+main.elf: main.o startup_stm32f030x6.o system_stm32f0xx.o $(HAL_PATH)/Src/stm32f0xx_ll_utils.o base.o semihosting.o cmsis_exports.o transpose.o
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
$(OBJCOPY) -O ihex $@ $(@:.elf=.hex)
$(OBJCOPY) -O binary $@ $(@:.elf=.bin)
@@ -55,6 +58,13 @@ main.elf: main.o startup_stm32f030x6.o system_stm32f0xx.o $(HAL_PATH)/Src/stm32f
program: main.elf openocd.cfg
openocd -f openocd.cfg -c "program $< verify reset exit"
+transpose.elf: transpose.c transpose_main.c
+ gcc -g -Wall -Wpedantic -o $@ $^
+
+.PHONY: transpose_test
+transpose_test: transpose.elf
+ ./transpose.elf
+
clean:
rm -f **.o
rm -f main.elf main.hex main.bin main.map main.lst