mirror of
https://github.com/pvvx/RTL00_WEB.git
synced 2026-07-03 09:55:39 +00:00
update cmsis-dap
This commit is contained in:
parent
9292f63c37
commit
09a4286889
12 changed files with 85 additions and 50 deletions
|
|
@ -38,21 +38,21 @@ PADDING = $(TOOLS_PATH)padding$(EXE)
|
|||
CHCKSUM = $(TOOLS_PATH)checksum$(EXE)
|
||||
|
||||
# openocd tools
|
||||
OPENOCD = $(OPENOCD_PATH)openocd
|
||||
OPENOCD = $(OPENOCD_PATH)openocd.exe
|
||||
|
||||
JLINK_GDB ?= JLinkGDBServer.exe
|
||||
JLINK_EXE ?= JLink.exe
|
||||
|
||||
ifeq ($(FLASHER), Jlink)
|
||||
# Jlink FLASHER_SPEED ..4000 kHz
|
||||
FLASHER_SPEED = 3500
|
||||
FLASHER_SPEED ?= 3500
|
||||
else
|
||||
ifeq ($(FLASHER),stlink-v2)
|
||||
# stlink-v2 FLASHER_SPEED ..1800 kHz
|
||||
FLASHER_SPEED = 1800
|
||||
FLASHER_SPEED ?= 1800
|
||||
else
|
||||
# over FLASHER_SPEED ..500 kHz ?
|
||||
FLASHER_SPEED = 500
|
||||
# over FLASHER_SPEED ..1000 kHz ?
|
||||
FLASHER_SPEED ?= 1000
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
@ -164,48 +164,53 @@ flash_OTA:
|
|||
#@taskkill /F /IM $(JLINK_GDBSRV)
|
||||
|
||||
else
|
||||
ifeq ($(FLASHER_TYPE),cmsis-dap)
|
||||
FLASHER:=cmsis-dap
|
||||
|
||||
flashburn:
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c "transport select swd" -f $(FLASHER_PATH)rtl8710.ocd -c "init" -c "adapter_khz $(FLASHER_SPEED)" -c "reset halt" \
|
||||
-c "rtl8710_flash_auto_erase 1" -c "rtl8710_flash_auto_verify 1" \
|
||||
-c "rtl8710_flash_write $(RAM1P_IMAGE) 0" \
|
||||
-c "rtl8710_flash_write $(RAM2P_IMAGE) 0xb000" \
|
||||
-c "rtl8710_reboot" -c "reset run" -c shutdown
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
|
||||
-f $(FLASHER_PATH)rtl8710.ocd -c 'init' -c 'reset halt' -c 'adapter_khz $(FLASHER_SPEED)' \
|
||||
-c 'rtl8710_flash_auto_erase 1' -c 'rtl8710_flash_auto_verify 1' \
|
||||
-c 'rtl8710_flash_write $(RAM1P_IMAGE) 0' \
|
||||
-c 'rtl8710_flash_write $(RAM2P_IMAGE) 0xb000' \
|
||||
-c 'rtl8710_reboot' -c 'reset run' -c shutdown
|
||||
|
||||
flashimage2p:
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c "transport select swd" -f $(FLASHER_PATH)rtl8710.ocd -c "init" -c "adapter_khz $(FLASHER_SPEED)" -c "reset halt" \
|
||||
-c "rtl8710_flash_auto_erase 1" -c "rtl8710_flash_auto_verify 1" \
|
||||
-c "rtl8710_flash_write $(RAM2P_IMAGE) 0xb000" \
|
||||
-c "rtl8710_reboot" -c "reset run" -c shutdown
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
|
||||
-f $(FLASHER_PATH)rtl8710.ocd -c 'init' -c 'reset halt' -c 'adapter_khz $(FLASHER_SPEED)' \
|
||||
-c 'rtl8710_flash_auto_erase 1' -c 'rtl8710_flash_auto_verify 1' \
|
||||
-c 'rtl8710_flash_write $(RAM2P_IMAGE) 0xb000' \
|
||||
-c 'rtl8710_reboot' -c 'reset run' -c shutdown
|
||||
|
||||
flashwebfs:
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c "transport select swd" -f $(FLASHER_PATH)rtl8710.ocd -c "init" -c "adapter_khz $(FLASHER_SPEED)" -c "reset halt" \
|
||||
-c "rtl8710_flash_auto_erase 1" -c "rtl8710_flash_auto_verify 1" \
|
||||
-c "rtl8710_flash_write $(BIN_DIR)/WEBFiles.bin 0xd0000" \
|
||||
-c "rtl8710_reboot" -c "reset run" -c shutdown
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
|
||||
-f $(FLASHER_PATH)rtl8710.ocd -c 'init' -c 'reset halt' -c 'adapter_khz $(FLASHER_SPEED)' \
|
||||
-c 'rtl8710_flash_auto_erase 1' -c 'rtl8710_flash_auto_verify 1' \
|
||||
-c 'rtl8710_flash_write $(BIN_DIR)/WEBFiles.bin 0xd0000' \
|
||||
-c 'rtl8710_reboot' -c 'reset run' -c shutdown
|
||||
|
||||
flashespfs:
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c "transport select swd" -f $(FLASHER_PATH)rtl8710.ocd -c "init" -c "adapter_khz $(FLASHER_SPEED)" -c "reset halt" \
|
||||
-c "rtl8710_flash_auto_erase 1" -c "rtl8710_flash_auto_verify 1" \
|
||||
-c "rtl8710_flash_write $(BIN_DIR)/webpages.espfs 0xd0000" \
|
||||
-c "rtl8710_reboot" -c "reset run" -c shutdown
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
|
||||
-f $(FLASHER_PATH)rtl8710.ocd -c 'init' -c 'reset halt' -c 'adapter_khz $(FLASHER_SPEED)' \
|
||||
-c 'rtl8710_flash_auto_erase 1' -c 'rtl8710_flash_auto_verify 1' \
|
||||
-c 'rtl8710_flash_write $(BIN_DIR)/webpages.espfs 0xd0000' \
|
||||
-c 'rtl8710_reboot' -c 'reset run' -c shutdown
|
||||
|
||||
reset:
|
||||
# @$(JLINK_PATH)$(JLINK_EXE) -Device CORTEX-M3 -If SWD -Speed $(FLASHER_SPEED) flasher/RTLreset.JLinkScript
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c "transport select swd" -f $(FLASHER_PATH)rtl8710.ocd -c "init" -c "adapter_khz $(FLASHER_SPEED)" -c "reset halt" \
|
||||
-c "rtl8710_reboot" -c shutdown
|
||||
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
|
||||
-f $(FLASHER_PATH)rtl8710.ocd -c 'init' -c 'reset halt' -c 'adapter_khz $(FLASHER_SPEED)' \
|
||||
-c 'mww 0x40000210 0x111157' -c 'rtl8710_reboot' -c shutdown
|
||||
|
||||
runram:
|
||||
# @$(JLINK_PATH)$(JLINK_GDB) -device Cortex-M3 -if SWD -ir -endian little -speed $(FLASHER_SPEED)
|
||||
# @$(GDB) -x flasher/gdb_run_ram.jlink
|
||||
# @taskkill.exe -F -IM $(JLINK_GDB)
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c "transport select swd" -f $(FLASHER_PATH)rtl8710.ocd -c "init" -c "adapter_khz $(FLASHER_SPEED)" -c "reset halt" \
|
||||
-c "load_image $(RAM1R_IMAGE) 0x10000bc8 bin" \
|
||||
-c "load_image $(RAM2_IMAGE) 0x10006000 bin" \
|
||||
-c "mww 0x40000210 0x20200113" \
|
||||
-c "reset run" -c shutdown
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
|
||||
-f $(FLASHER_PATH)rtl8710.ocd -c 'init' -c 'reset halt' -c 'adapter_khz $(FLASHER_SPEED)' \
|
||||
-c 'load_image $(RAM1R_IMAGE) 0x10000bc8 bin' \
|
||||
-c 'load_image $(RAM2_IMAGE) 0x10006000 bin' \
|
||||
-c 'mww 0x40000210 0x20200113' \
|
||||
-c 'reset run' -c shutdown
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
$(NMAPFILE): $(ELFFILE)
|
||||
@echo "==========================================================="
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#---------------------------
|
||||
SDK_PATH ?= ../SDKRTLA/USDK/
|
||||
#GCC_PATH = d:/MCU/GNU_Tools_ARM_Embedded/6.2017-q1-update/bin/# + or set in PATH
|
||||
#OPENOCD_PATH = d:/MCU/OpenOCD/bin/# + or set in PATH
|
||||
OPENOCD_PATH = d:/MCU/OpenOCD/bin/
|
||||
TOOLS_PATH ?= $(SDK_PATH)component/soc/realtek/8195a/misc/iar_utility/common/tools/
|
||||
FLASHER_TYPE ?= Jlink
|
||||
#FLASHER_TYPE ?= OCD
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue