diff --git a/DAPLink-RTL00Console.bat b/DAPLink-RTL00Console.bat index 1c90a5f..846a8b0 100644 --- a/DAPLink-RTL00Console.bat +++ b/DAPLink-RTL00Console.bat @@ -1,6 +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" +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 0x10000BA8" -c "exit" rem -c "shutdown" diff --git a/DAPLink-Reset.bat b/DAPLink-Reset.bat index 1c1b88c..53afe4b 100644 --- a/DAPLink-Reset.bat +++ b/DAPLink-Reset.bat @@ -1,4 +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" +openocd -f interface/cmsis-dap.cfg -c "adapter_khz 1000" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "restart_from_falsh" -c "shutdown" rem diff --git a/JLink_RdFullFlash.bat b/JLink_RdFullFlash.bat index cb4c1e4..c8a8b2c 100644 --- a/JLink_RdFullFlash.bat +++ b/JLink_RdFullFlash.bat @@ -1,6 +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" +openocd -f interface/Jlink.cfg -c "adapter_khz 1000" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "adapter_khz 3900" -c "rtl8710_flash_read_id" -c "rtl8710_flash_read ../fullflash.bin 0 1048576" -c "shutdown" echo flash read fullflash.bin pause diff --git a/flasher/cortex.ocd b/flasher/cortex.ocd index 37f2921..b0cdf18 100644 --- a/flasher/cortex.ocd +++ b/flasher/cortex.ocd @@ -87,3 +87,13 @@ proc restart_from_falsh {} { boot_from_flash cortex_reboot } + +proc load_ram_binary { local_filename address } { +# set address 0x10000BC8 + init + reset halt + set size [file size $local_filename] + load_image $local_filename $address bin $address $size + boot_from_ram + resume +} diff --git a/flasher/rtl8710.ocd b/flasher/rtl8710.ocd index 14a8c82..2f2b102 100644 --- a/flasher/rtl8710.ocd +++ b/flasher/rtl8710.ocd @@ -2,6 +2,10 @@ # OpenOCD script for RTL8710 # Copyright (C) 2016 Rebane, rebane@alkohol.ee # +set CHIPNAME rtl8195a +set CHIPSERIES ameba1 + +# Adapt based on what transport is active. source [find target/swj-dp.tcl] @@ -40,7 +44,7 @@ $_TARGETNAME configure -work-area-phys 0x10001000 -work-area-size $_WORKAREASIZE adapter_nsrst_delay 100 if {![using_hla]} { - cortex_m reset_config sysresetreq + cortex_m reset_config sysresetreq vectreset } set rtl8710_flasher_firmware_ptr 0x10001000