Skip to content

Commit

Permalink
Merge pull request #294 from USC-ACTLab/bugfixMakeFlash
Browse files Browse the repository at this point in the history
Improved debugger support
  • Loading branch information
ataffanel authored Feb 12, 2018
2 parents 63b6b49 + e583c7d commit ead57a1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,13 @@ endif
#Flash the stm.
flash:
$(OPENOCD) -d2 -f $(OPENOCD_INTERFACE) $(OPENOCD_CMDS) -f $(OPENOCD_TARGET) -c init -c targets -c "reset halt" \
-c "flash write_image erase $(PROG).elf" -c "verify_image $(PROG).elf" -c "reset run" -c shutdown
-c "flash write_image erase $(PROG).bin $(LOAD_ADDRESS) bin" \
-c "verify_image $(PROG).bin $(LOAD_ADDRESS) bin" -c "reset run" -c shutdown

#verify only
flash_verify:
$(OPENOCD) -d2 -f $(OPENOCD_INTERFACE) $(OPENOCD_CMDS) -f $(OPENOCD_TARGET) -c init -c targets -c "reset halt" \
-c "verify_image $(PROG).bin $(LOAD_ADDRESS) bin" -c "reset run" -c shutdown

flash_dfu:
$(DFU_UTIL) -a 0 -D $(PROG).dfu
Expand Down
5 changes: 5 additions & 0 deletions tools/make/config.mk.example
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,8 @@

## Compile positioning system for TDoA mode
# LPS_TDOA_ENABLE=1

## Use J-Link as Debugger/flasher
# OPENOCD_INTERFACE ?= interface/jlink.cfg
# OPENOCD_TARGET ?= target/stm32f4x.cfg
# OPENOCD_CMDS ?= -c "transport select swd"

0 comments on commit ead57a1

Please sign in to comment.