fix: separate makefile for openocd cmds
This commit is contained in:
31
rtl8710-openocd.mk
Normal file
31
rtl8710-openocd.mk
Normal file
@@ -0,0 +1,31 @@
|
||||
# override if importing as submodule
|
||||
RTL8710_PATH ?= .
|
||||
RTL8710_SCRIPT_PATH ?= $(RTL8710_PATH)/script
|
||||
|
||||
INTERFACE ?= stlink
|
||||
|
||||
OPENOCD_BASE = openocd -f interface/$(INTERFACE).cfg -f $(RTL8710_SCRIPT_PATH)/rtl8710.ocd -c "init" -c "reset" -c "halt"
|
||||
|
||||
rtl-test:
|
||||
$(OPENOCD_BASE) -c "rtl8710_flash_read_id" -c "shutdown"
|
||||
|
||||
rtl-mac:
|
||||
$(OPENOCD_BASE) -c "rtl8710_flash_read_mac" -c "shutdown"
|
||||
|
||||
rtl-dump:
|
||||
$(OPENOCD_BASE) -c "rtl8710_flash_read_id" -c "rtl8710_flash_read dump.bin 0 1048576" -c "shutdown"
|
||||
|
||||
rtl-full-erase:
|
||||
$(OPENOCD_BASE) -c "rtl8710_flash_mass_erase" -c shutdown
|
||||
|
||||
rtl-restore:
|
||||
$(OPENOCD_BASE) -c "rtl8710_flash_auto_erase 1" -c "rtl8710_flash_auto_verify 1" -c "rtl8710_flash_write dump.bin 0" -c shutdown
|
||||
|
||||
rtl-restore-nae:
|
||||
$(OPENOCD_BASE) -c "rtl8710_flash_auto_erase 0" -c "rtl8710_flash_auto_verify 1" -c "rtl8710_flash_write dump.bin 0" -c shutdown
|
||||
|
||||
rtl-verify:
|
||||
$(OPENOCD_BASE) -c "rtl8710_flash_verify dump.bin 0" -c shutdown
|
||||
|
||||
rtl-reset:
|
||||
$(OPENOCD_BASE) -c "rtl8710_reboot" -c shutdown
|
||||
Reference in New Issue
Block a user