Browse Source

Build: Makefile add clean

makefile_for_cmsis
heck 2 years ago
parent
commit
6eea0cba39
  1. 9
      Makefile

9
Makefile

@ -3,17 +3,20 @@ OCD_BIN=/opt/local/bin/openocd
OCD_SCRIPTS=/opt/local/share/openocd/scripts OCD_SCRIPTS=/opt/local/share/openocd/scripts
OCD_BOARD=stm32f4discovery.cfg OCD_BOARD=stm32f4discovery.cfg
PHONY: all compile run .PHONY: all compile run clean
all: compile run all: run
compile: compile:
cmake --build cmake-build-debug --verbose cmake --build cmake-build-debug --verbose
run: run: compile
$(OCD_BIN) -s $(OCD_SCRIPTS) -f board/$(OCD_BOARD) \ $(OCD_BIN) -s $(OCD_SCRIPTS) -f board/$(OCD_BOARD) \
-c "tcl_port disabled" \ -c "tcl_port disabled" \
-c "gdb_port disabled" \ -c "gdb_port disabled" \
-c "program ./cmake-build-debug/raw407cxx.elf" \ -c "program ./cmake-build-debug/raw407cxx.elf" \
-c reset \ -c reset \
-c shutdown -c shutdown
clean:
cmake --build cmake-build-debug --verbose -t clean
Loading…
Cancel
Save