[chore][openocd] update openocd tool,add openocd rule and exe in linux

This commit is contained in:
jzlv 2021-08-25 16:43:15 +08:00
parent 9d772dc35e
commit 2ec02357c9
18 changed files with 22 additions and 146 deletions

View File

@ -0,0 +1,3 @@
# Future Technology Devices International, Ltd FT2232C Dual USB-UART/FIFO IC
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403",ATTRS{idProduct}=="6010", MODE="664", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor} =="0403",ATTR{idProduct} =="6010", MODE="664", GROUP="plugdev"

Binary file not shown.

View File

@ -0,0 +1,3 @@
# Future Technology Devices International, Ltd FT2232C Dual USB-UART/FIFO IC
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403",ATTRS{idProduct}=="6010", MODE="664", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor} =="0403",ATTR{idProduct} =="6010", MODE="664", GROUP="plugdev"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

View File

@ -1,16 +1,16 @@
# BouffaloLab USB-JTAG/TTL adapter
interface ftdi
ftdi_vid_pid 0x0403 0x6010
ftdi_channel 1
ftdi_tdo_sample_edge falling
transport select jtag
adapter_khz 10000
ftdi_layout_init 0x00f8 0x00fb
#ftdi_layout_signal nTRST -data 0x0400
#ftdi_layout_signal nSRST -ndata 0x0020
#reset_config srst_only srst_push_pull
#adapter_nsrst_delay 100
#adapter_nsrst_assert_width 100
# BouffaloLab USB-JTAG/TTL adapter
adapter driver ftdi
ftdi_vid_pid 0x0403 0x6010
ftdi_channel 1
ftdi_tdo_sample_edge falling
transport select jtag
adapter speed 10000
ftdi_layout_init 0x00f8 0x00fb
#ftdi_layout_signal nTRST -data 0x0400
#ftdi_layout_signal nSRST -ndata 0x0020
#reset_config srst_only srst_push_pull
#adapter_nsrst_delay 100
#adapter_nsrst_assert_width 100

View File

@ -1,7 +0,0 @@
# USB-JTAG/TTL based on FT2232D
interface jlink
transport select jtag
adapter_khz 12000

View File

@ -1,21 +0,0 @@
# BouffaloLab USB-JTAG/TTL adapter
interface ftdi
#adapter driver ftdi
ftdi_vid_pid 0x0403 0x6010
ftdi_channel 0
#ftdi_tdo_sample_edge falling
transport select jtag
adapter_khz 5000
#adapter speed 1000
ftdi_layout_init 0x00f8 0x00fb
#ftdi_layout_signal nTRST -data 0x0400
#ftdi_layout_signal nSRST -ndata 0x0020
#reset_config srst_only srst_push_pull
#adapter_nsrst_delay 100
#adapter_nsrst_assert_width 100
#bindto 0.0.0.0

View File

@ -1,15 +0,0 @@
/*************************************************************************************************/
reg --- show all registers
reg pc --- show register pc
reg a0 0 --- set register x1 to 0
mdw --- Memory Dump Word
mww --- Memory Write Word
help mww --- Show help info of command "mww"
dump_image --- dump image from memory to file
load_image --- load image from file to memory
halt --- stop core
step --- execute instructions
run --- let the target run
bp --- set breakpoint
help --- Show all help info
/*************************************************************************************************/

BIN
tools/openocd/libftdi1.dll Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
tools/openocd/libusb0.dll Normal file

Binary file not shown.

BIN
tools/openocd/openocd Normal file

Binary file not shown.

View File

@ -1,40 +0,0 @@
# SiPEED USB-JTAG/TTL based on FT2232D
interface ftdi
ftdi_vid_pid 0x0403 0x6010
# http://blog.sipeed.com/p/727.html
ftdi_channel 0
transport select jtag
adapter_khz 10000
ftdi_layout_init 0x0508 0x0f1b
ftdi_layout_signal nTRST -data 0x0200 -noe 0x0100
ftdi_layout_signal nSRST -data 0x0800 -noe 0x0400
set _CHIPNAME riscv
#jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x20000001
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x0
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME.0 riscv -chain-position $_TARGETNAME
#$_TARGETNAME.0 configure -work-area-phys 0x80000000 -work-area-size 10000 -work-area-backup 1
#$_TARGETNAME.0 configure -work-area-phys 0x50000000 -work-area-size 32768 -work-area-backup 0
echo "SiPEED USB-JTAG/TTL Ready for Remote Connections"
proc install_bootrom {} {
# sleep 1000
init
reset init
load_image chiptest_bootrom.bin 0x21000000 bin
sleep 500
reg pc 0x21000000
# sleep 500
# bp 0x21002f0c 4 hw
# resume
}
echo "Start loading BOOTROM under project folder"
install_bootrom
echo "flash the XIP code before debugging"
echo "ONLY load symbol in GDB"
echo "use [gdb_breakpoint_override hard] for XIP debugging"

View File

@ -1,24 +0,0 @@
# SiPEED USB-JTAG/TTL based on FT2232D
interface ftdi
ftdi_vid_pid 0x0403 0x6010
# http://blog.sipeed.com/p/727.html
ftdi_channel 0
transport select jtag
adapter_khz 1000
ftdi_layout_init 0x0508 0x0f1b
ftdi_layout_signal nTRST -data 0x0200 -noe 0x0100
ftdi_layout_signal nSRST -data 0x0800 -noe 0x0400
set _CHIPNAME riscv
#jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x20000001
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x0
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME.0 riscv -chain-position $_TARGETNAME
#$_TARGETNAME.0 configure -work-area-phys 0x80000000 -work-area-size 10000 -work-area-backup 1
#$_TARGETNAME.0 configure -work-area-phys 0x50000000 -work-area-size 32768 -work-area-backup 0
riscv set_prefer_sba on
echo "SiPEED USB-JTAG/TTL Ready for Remote Connections"

BIN
tools/openocd/openocd.exe Normal file

Binary file not shown.

View File

@ -1,23 +0,0 @@
# JTAG adapter setup
interface ftdi
ftdi_vid_pid 0x0403 0x6010
# ftdi_channel 0 is port ADBUS, ftdi_channel 1 is port BDBUS.
ftdi_channel 1
transport select jtag
adapter_khz 1000
ftdi_layout_init 0x00f8 0x00fb
ftdi_layout_signal nSRST -oe 0x0040
ftdi_layout_signal nTRST -oe 0x0010
set _CHIPNAME riscv
#jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x20000001
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x0
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME.0 riscv -chain-position $_TARGETNAME
#$_TARGETNAME.0 configure -work-area-phys 0x80000000 -work-area-size 10000 -work-area-backup 1
#$_TARGETNAME.0 configure -work-area-phys 0x50000000 -work-area-size 32768 -work-area-backup 0
echo "Ready for Remote Connections"