From 576aa3fecdb500571e7eb060d3cb9879ab9f2257 Mon Sep 17 00:00:00 2001 From: heck Date: Wed, 5 Jul 2023 16:22:52 +0200 Subject: [PATCH] Build: Add Makefile to build and run from shell --- Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1971f91 --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ + +OCD_BIN=/opt/local/bin/openocd +OCD_SCRIPTS=/opt/local/share/openocd/scripts +OCD_BOARD=stm32f4discovery.cfg + +PHONY: all compile run + +all: compile run + +compile: + cmake --build cmake-build-debug --verbose + +run: + $(OCD_BIN) -s $(OCD_SCRIPTS) -f board/$(OCD_BOARD) \ + -c "tcl_port disabled" \ + -c "gdb_port disabled" \ + -c "program ./cmake-build-debug/raw407cxx.elf" \ + -c reset \ + -c shutdown \ No newline at end of file