From 128856a2f923ff92ee4459d9f64bbcb61e6e165c Mon Sep 17 00:00:00 2001 From: chentianya Date: Thu, 6 Aug 2026 19:29:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20GD32H737=20=E7=9A=84=20Ope?= =?UTF-8?q?nOCD=20J-Link=20=E8=B0=83=E8=AF=95=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 使用 GD 官方 Flash 驱动与 SWD,便于在未接 NRST 时通过 sysresetreq 连接调试。 --- Configs/openocd_jlink_gd32h737.cfg | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Configs/openocd_jlink_gd32h737.cfg diff --git a/Configs/openocd_jlink_gd32h737.cfg b/Configs/openocd_jlink_gd32h737.cfg new file mode 100644 index 0000000..1f3736b --- /dev/null +++ b/Configs/openocd_jlink_gd32h737.cfg @@ -0,0 +1,32 @@ +# +# 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