Skip to content

Commit dab1ec4

Browse files
committed
KARL: tcl: add interface/target files for wch parts
Add a more standard interface config and target config for wch parts and wlink driver. Change-Id: I767081b5f1087ab2634d193851f31259d3a18e0f Signed-off-by: Karl Palsson <[email protected]>
1 parent 332748b commit dab1ec4

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

tcl/interface/wlink.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Extracted from MRS wch-riscv.cfg to be just the "interface" portion
2+
adapter driver wlink
3+
wlink_set
4+

tcl/target/wch-riscv.cfg

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Extracted from MRS wch-riscv.cfg, split to be just the _target_ portion
2+
set _CHIPNAME wch-rv
3+
4+
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x00001
5+
6+
set _TARGETNAME $_CHIPNAME.cpu
7+
8+
target create $_TARGETNAME.0 riscv -chain-position $_TARGETNAME
9+
$_TARGETNAME.0 configure -work-area-phys 0x80000000 -work-area-size 10000 -work-area-backup 1
10+
set _FLASHNAME $_CHIPNAME.flash
11+
12+
flash bank $_FLASHNAME wch_riscv 0x00000000 0 0 0 $_TARGETNAME.0
13+

0 commit comments

Comments
 (0)