Hi @Jim, 
Thanks for your reply ^_^ 

Mr. Reuben Townsend sent me a configuration file that should be used for the 
GD32VF103 board with GD-Link (onboard probe): 

# Script for GD32VF103 with GD-Link 
# ================================== 
adapter_khz 1000 
reset_config srst_only 
adapter_nsrst_assert_width 100 

interface cmsis-dap 

transport select jtag 

set _CHIPNAME riscv 
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x1000563d 

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 gd32vf103 0x08000000 0 0 0 $_TARGETNAME 
riscv set_reset_timeout_sec 1 
init 
halt 
# ======================= END ========================== # 

Unfortunately, it doesn't work on my computer. I get the following output in 
OpenOCD: 



C:\beetle_projects\gd32vf103c_ start> "C:/embeetle/openocd_0.10.0_ 
dev01138_64b/bin/openocd.exe" -f openocd_chip.cfg -s 
"C:/embeetle/openocd_0.10.0_ dev01138_64b/scripts" -c "init; reset halt" 

Open On-Chip Debugger 0.10.0+ dev-01138-g1891c2d2 (2020-03- 21-09:19) 

Licensed under GNU GPL v2 

For bug reports, read 

[ http://openocd.org/doc/doxygen/bugs.html | 
http://openocd.org/doc/doxygen/bugs.html ] 


DEPRECATED! use 'adapter speed' not 'adapter_khz' 

DEPRECATED! use 'adapter srst pulse_width' not 'adapter_ nsrst_assert_width' 

DEPRECATED! use 'adapter driver' not 'interface' 

Error: flash driver ' gd32vf103' not found 

Error: Target has not been initialized 


Any idea what could be wrong? 
Kind regards, 
Kristof 



Van: "j. m. norris" <u17...@att.net> 
Aan: "kristof mulier" <kristof.mul...@telenet.be> 
Cc: "openocd-devel" <openocd-devel@lists.sourceforge.net> 
Verzonden: Woensdag 29 april 2020 18:10:40 
Onderwerp: Re: [OpenOCD-devel] Support for GigaDevice microcontrollers 

Kristof, 

The CMSIS-DAP related bits in that file should be fine. However, there are 
other 
things in the file that are specific to the ARM, e.g, flash and PLL bits. So 
you can't 
use the file as-is. You'll have to do some modifications for the RISCV (if 
any). 

As far as combining it, it's just a matter of hooking up the CMSIS-DAP block 
interface 
into the right places in the RISCV block in the Verilog. 

Regards, 
Jim 

============== 

On 4/29/20 10:34 AM, [ mailto:kristof.mul...@telenet.be | 
kristof.mul...@telenet.be ] wrote: 



Hi @jmn 
I just got the following reply from Reuben Townsend from GigaDevice: 

Hi Kristof, the GD-LINK uses the CMSIS-DAP interface 
and for the GD32E230 MCU, you can use the stm32f0x.cfg 
configuration file. 
Attached is a script you could use. 

It didn't work on my computer. I'll ask him what to do for the Risc-V board. 
Anyway, the script he sent me is this one: 

interface cmsis-dap 
transport select swd 
source [find target/stm32f0x.cfg] 

What surprises me is that the GD-Link is based on cmsis-dap - which is an ARM 
Cortex standard. Not sure how they combine that with a Risc-V processor. For 
the datasheet on this Risc-V processor, see: 
[ 
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=2ahUKEwja5ffQ-o3pAhX1JMUKHR90DC4QFjAAegQIDRAB&url=https%3A%2F%2Fdl.sipeed.com%2FLONGAN%2FNano%2FDOC%2FGD32VF103_Datasheet_Rev1.0.pdf&usg=AOvVaw3vDRLt14BC1Msb24ENRqRL
 | 
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=2ahUKEwja5ffQ-o3pAhX1JMUKHR90DC4QFjAAegQIDRAB&url=https%3A%2F%2Fdl.sipeed.com%2FLONGAN%2FNano%2FDOC%2FGD32VF103_Datasheet_Rev1.0.pdf&usg=AOvVaw3vDRLt14BC1Msb24ENRqRL
 ] 

Kind regards, 
Kristof 






_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to