use stlinkv2 flasher
This commit is contained in:
parent
f2e80bf28d
commit
717047d1f9
3
Makefile
3
Makefile
|
@ -110,7 +110,7 @@ ARCH_FLAGS = -mthumb -mcpu=cortex-m3 $(FP_FLAGS) -mfix-cortex-m3-ldrd
|
|||
|
||||
# SWD adapter used
|
||||
# supported are : st-link v2 (STLINKV2), black magic probe (BMP)
|
||||
SWD_ADAPTER ?= BMP
|
||||
SWD_ADAPTER ?= STLINKV2
|
||||
ifeq ($(SWD_ADAPTER),STLINKV2)
|
||||
# OpenOCD configuration
|
||||
OOCD ?= openocd
|
||||
|
@ -191,6 +191,7 @@ endif
|
|||
# debug using GDB
|
||||
debug: $(BINARY).elf
|
||||
ifeq ($(SWD_ADAPTER),STLINKV2)
|
||||
# for GDB to work with openOCD the firmware needs to be reloaded
|
||||
$(Q)$(GDB) --eval-command="target remote | $(OOCD) --file interface/$(OOCD_INTERFACE).cfg --file target/$(OOCD_TARGET).cfg --command \"gdb_port pipe; log_output /dev/null; init\"" --eval-command="monitor reset halt" --eval-command="load" --eval-command="monitor reset init" $(<)
|
||||
else ifeq ($(SWD_ADAPTER),BMP)
|
||||
$(Q)$(GDB) --eval-command="target extended-remote $(BMPPORT)" --eval-command="monitor version" --eval-command="monitor swdp_scan" --eval-command="attach 1" $(<)
|
||||
|
|
Loading…
Reference in New Issue