From ad23e91b43c1a05f050206b57027dda70386dd6d Mon Sep 17 00:00:00 2001 From: pvvx Date: Tue, 31 Jan 2017 06:46:49 +0300 Subject: [PATCH] add --- DAPLink-RTL00Console.bat | 6 ++++++ DAPLink-RdFullFlash.bat | 6 ++++++ DAPLink-Reset.bat | 4 ++++ DAPLink_WrFullFlash.bat | 5 +++++ JLinkGDB-WrFlash.bat | 7 +++++-- JLinkOCD-RdFullFlash.bat | 6 ++++++ JLink_RdFullFlash.bat | 6 ++++++ STLink-RdFullFlash.bat | 6 ++++++ STLink-Reset.bat | 4 ++++ 9 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 DAPLink-RTL00Console.bat create mode 100644 DAPLink-RdFullFlash.bat create mode 100644 DAPLink-Reset.bat create mode 100644 DAPLink_WrFullFlash.bat create mode 100644 JLinkOCD-RdFullFlash.bat create mode 100644 JLink_RdFullFlash.bat create mode 100644 STLink-RdFullFlash.bat create mode 100644 STLink-Reset.bat diff --git a/DAPLink-RTL00Console.bat b/DAPLink-RTL00Console.bat new file mode 100644 index 0000000..1c90a5f --- /dev/null +++ b/DAPLink-RTL00Console.bat @@ -0,0 +1,6 @@ +@echo off +cd flasher +openocd -f interface/cmsis-dap.cfg -c "adapter_khz 1000" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "load_ram_binary RTL00Console_ROM.bin" -c "exit" +rem -c "shutdown" + + diff --git a/DAPLink-RdFullFlash.bat b/DAPLink-RdFullFlash.bat new file mode 100644 index 0000000..8348bbf --- /dev/null +++ b/DAPLink-RdFullFlash.bat @@ -0,0 +1,6 @@ +@echo off +cd flasher +openocd -f interface/cmsis-dap.cfg -c "adapter_khz 1000" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "rtl8710_flash_read_id" -c "adapter_khz 5000" -c "rtl8710_flash_read ../fullflash.bin 0 1048576" -c "shutdown" +echo flash read fullflash.bin +pause + diff --git a/DAPLink-Reset.bat b/DAPLink-Reset.bat new file mode 100644 index 0000000..1c1b88c --- /dev/null +++ b/DAPLink-Reset.bat @@ -0,0 +1,4 @@ +@cd flasher +openocd -f interface/cmsis-dap.cfg -c "adapter_khz 1000" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "cortex_reboot" -c "shutdown" +rem + diff --git a/DAPLink_WrFullFlash.bat b/DAPLink_WrFullFlash.bat new file mode 100644 index 0000000..39f54d1 --- /dev/null +++ b/DAPLink_WrFullFlash.bat @@ -0,0 +1,5 @@ +@echo off +cd flasher +openocd -f interface/cmsis-dap.cfg -c "adapter_khz 3500" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "rtl8710_flash_read_id" -c "rtl8710_flash_auto_erase 1" -c "rtl8710_flash_auto_verify 1" -c "rtl8710_flash_write fullflash.bin 0" -c "shutdown" +pause + diff --git a/JLinkGDB-WrFlash.bat b/JLinkGDB-WrFlash.bat index bbfb3ae..4925001 100644 --- a/JLinkGDB-WrFlash.bat +++ b/JLinkGDB-WrFlash.bat @@ -1,8 +1,11 @@ @echo off PATH=D:\MCU\GNU_Tools_ARM_Embedded\5.2_2015q4\bin;D:\MCU\SEGGER\JLink_V610a;%PATH% -@if not %1x==x goto xxx -set img_file=build/bin/ram_all.bin +@if %1x==x goto xxx +set img_file=%1 +goto run :xxx +set img_file=build/bin/ram_all.bin +:run echo define call1>flasher/flash_file.jlink echo SetFirwareSize %img_file%>>flasher/flash_file.jlink echo end>>flasher/flash_file.jlink diff --git a/JLinkOCD-RdFullFlash.bat b/JLinkOCD-RdFullFlash.bat new file mode 100644 index 0000000..25661e2 --- /dev/null +++ b/JLinkOCD-RdFullFlash.bat @@ -0,0 +1,6 @@ +@echo off +cd flasher +openocd -f interface/Jlink.cfg -c "adapter_khz 3500" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "rtl8710_flash_read_id" -c "rtl8710_flash_read ../fullflash.bin 0 1048576" -c "shutdown" +echo flash read fullflash.bin +pause + diff --git a/JLink_RdFullFlash.bat b/JLink_RdFullFlash.bat new file mode 100644 index 0000000..cb4c1e4 --- /dev/null +++ b/JLink_RdFullFlash.bat @@ -0,0 +1,6 @@ +@echo off +cd flasher +openocd -f interface/Jlink.cfg -c "adapter_khz 1000" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "adapter_khz 3500" -c "rtl8710_flash_read_id" -c "rtl8710_flash_read ../fullflash.bin 0 1048576" -c "shutdown" +echo flash read fullflash.bin +pause + diff --git a/STLink-RdFullFlash.bat b/STLink-RdFullFlash.bat new file mode 100644 index 0000000..f227d0f --- /dev/null +++ b/STLink-RdFullFlash.bat @@ -0,0 +1,6 @@ +@echo off +cd flasher +openocd -f interface/stlink-v2.cfg -c "adapter_khz 1000" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "rtl8710_flash_read_id" -c "adapter_khz 5000" -c "rtl8710_flash_read ../fullflash.bin 0 1048576" -c "shutdown" +echo flash read fullflash.bin +pause + diff --git a/STLink-Reset.bat b/STLink-Reset.bat new file mode 100644 index 0000000..a72863d --- /dev/null +++ b/STLink-Reset.bat @@ -0,0 +1,4 @@ +@cd flasher +openocd -f interface/stlink-v2.cfg -c "adapter_khz 1000" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "cortex_reboot" -c "shutdown" +rem +