Skip to content

Commit

Permalink
add gd32vw55x configuration file
Browse files Browse the repository at this point in the history
  • Loading branch information
JackChenHR committed Jan 22, 2024
1 parent 241ec27 commit 5987335
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions tcl/target/gd32vw55x.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#
# GigaDevice GD32VW55x target
#
# https://www.gigadevice.com/products/microcontrollers/gd32/risc-v/
#
set _CHIPNAME riscv
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x10307a6d

set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME riscv -chain-position $_TARGETNAME
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size 20480 -work-area-backup 0


# Work-area is a space in RAM used for flash programming
if { [info exists WORKAREASIZE] } {
set _WORKAREASIZE $WORKAREASIZE
} else {
set _WORKAREASIZE 0x5000
}

# Allow overriding the Flash bank size
if { [info exists FLASH_SIZE] } {
set _FLASH_SIZE $FLASH_SIZE
} else {
# autodetect size
set _FLASH_SIZE 0
}

# flash size will be probed
set _FLASHNAME $_CHIPNAME.flash

flash bank $_FLASHNAME gd32vw55x 0x08000000 0x400000 0 0 $_TARGETNAME
riscv set_reset_timeout_sec 1
init

halt

0 comments on commit 5987335

Please sign in to comment.