From 28a93739db99920431b5d72d948bfc1cddd0a8a7 Mon Sep 17 00:00:00 2001 From: xengineering Date: Sat, 24 Oct 2020 18:14:58 +0200 Subject: Add USART Code --- usart/Makefile | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 usart/Makefile (limited to 'usart/Makefile') diff --git a/usart/Makefile b/usart/Makefile new file mode 100644 index 0000000..7ce252d --- /dev/null +++ b/usart/Makefile @@ -0,0 +1,33 @@ +PROJECT = usart +BUILD_DIR = bin + +#SHARED_DIR = ../libraries +CFILES = main.c +#CFILES += api.c +#AFILES += api-asm.S + +# TODO - you will need to edit these two lines! +DEVICE=stm32f103c8 +#OOCD_FILE = board/stm32f4discovery.cfg + +# You shouldn't have to edit anything below here. +VPATH += $(SHARED_DIR) +INCLUDES += $(patsubst %,-I%, . $(SHARED_DIR)) +OPENCM3_DIR=../libopencm3 + +include $(OPENCM3_DIR)/mk/genlink-config.mk +include ../rules.mk +include $(OPENCM3_DIR)/mk/genlink-rules.mk + + +# Black Magic Probe: + +GDB=/usr/bin/arm-none-eabi-gdb +BMP_DEVICE=/dev/ttyACM0 + +bmp: $(PROJECT).elf + $(GDB) $(PROJECT).elf \ + -ex 'set confirm off' \ + -ex 'target extended-remote $(BMP_DEVICE)' \ + -ex 'monitor swdp_scan' \ + -ex 'attach 1' -- cgit v1.2.3-70-g09d2