33 lines
955 B
INI
33 lines
955 B
INI
#
|
||
# J-Link + GD32H737(H71x/H72x)OpenOCD 配置
|
||
# 使用 GD 官方 Flash 驱动,避免 J-Link 原生 GDB Server 读保护解锁卡住
|
||
#
|
||
|
||
adapter driver jlink
|
||
transport select swd
|
||
|
||
# 未接 NRST 时用系统复位请求
|
||
adapter speed 1000
|
||
source [find target/swj-dp.tcl]
|
||
source [find mem_helper.tcl]
|
||
|
||
set _CHIPNAME gd32h71x_72x
|
||
set _ENDIAN little
|
||
set _WORKAREASIZE 0x1000
|
||
set _FLASH_SIZE 0
|
||
set _CPUTAPID 0x0BD12477
|
||
|
||
swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
|
||
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
|
||
set _TARGETNAME $_CHIPNAME.cpu
|
||
target create $_TARGETNAME cortex_m -endian $_ENDIAN -dap $_CHIPNAME.dap
|
||
|
||
$_TARGETNAME configure -work-area-phys 0x24000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
|
||
|
||
set _FLASHNAME $_CHIPNAME.flash
|
||
flash bank $_FLASHNAME gd32h71x_72x 0x08000000 $_FLASH_SIZE 0 0 $_TARGETNAME
|
||
|
||
adapter srst delay 100
|
||
reset_config none
|
||
cortex_m reset_config sysresetreq
|