first commit
This commit is contained in:
6
tools/download.cmd
Normal file
6
tools/download.cmd
Normal file
@@ -0,0 +1,6 @@
|
||||
set HEXFILE=%1
|
||||
|
||||
set "HEXFILE=%HEXFILE:\=/%"
|
||||
|
||||
openocd -f ./tools/wch-riscv.cfg -c init -c halt -c "flash erase_sector wch_riscv 0 last " -c "program %HEXFILE%" -c "verify_image %HEXFILE%" -c wlink_reset_resume -c exit
|
||||
|
||||
1
tools/erase.cmd
Normal file
1
tools/erase.cmd
Normal file
@@ -0,0 +1 @@
|
||||
openocd -f .\tools\wch-riscv.cfg -c "flash init; init; reset halt; flash erase_sector 0 1 last"
|
||||
18
tools/wch-riscv.cfg
Normal file
18
tools/wch-riscv.cfg
Normal file
@@ -0,0 +1,18 @@
|
||||
#interface wlink
|
||||
adapter driver wlinke
|
||||
adapter speed 6000
|
||||
transport select sdi
|
||||
|
||||
wlink_set_address 0x00000000
|
||||
set _CHIPNAME wch_riscv
|
||||
sdi newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x00001
|
||||
|
||||
set _TARGETNAME $_CHIPNAME.cpu
|
||||
|
||||
target create $_TARGETNAME.0 wch_riscv -chain-position $_TARGETNAME
|
||||
$_TARGETNAME.0 configure -work-area-phys 0x20000000 -work-area-size 10000 -work-area-backup 1
|
||||
set _FLASHNAME $_CHIPNAME.flash
|
||||
|
||||
flash bank $_FLASHNAME wch_riscv 0x00000000 0 0 0 $_TARGETNAME.0
|
||||
|
||||
echo "Ready for Remote Connections"
|
||||
Reference in New Issue
Block a user