1#interface wlink
2adapter driver wlink
3wlink_set
4set _CHIPNAME riscv
5jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x00001
6
7set _TARGETNAME $_CHIPNAME.cpu
8
9target create $_TARGETNAME.0 riscv -chain-position $_TARGETNAME
10$_TARGETNAME.0 configure  -work-area-phys 0x80000000 -work-area-size 10000 -work-area-backup 1
11set _FLASHNAME $_CHIPNAME.flash
12
13flash bank $_FLASHNAME wch_riscv 0x00000000 0 0 0 $_TARGETNAME.0
14
15echo "Ready for Remote Connections"
16