mirror of
https://github.com/Fishwaldo/bl_mcu_sdk.git
synced 2025-03-15 19:31:43 +00:00
[chore][openocd] add openocd config
This commit is contained in:
parent
240594aa20
commit
9e189b69cb
13 changed files with 215 additions and 0 deletions
3
tools/openocd/99-openocd.rules
Normal file
3
tools/openocd/99-openocd.rules
Normal 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"
|
16
tools/openocd/interface/ft2232d.cfg
Normal file
16
tools/openocd/interface/ft2232d.cfg
Normal file
|
@ -0,0 +1,16 @@
|
|||
# BouffaloLab USB-JTAG/TTL adapter
|
||||
adapter driver ftdi
|
||||
ftdi_vid_pid 0x0403 0x6010
|
||||
|
||||
ftdi_channel 0
|
||||
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
|
16
tools/openocd/interface/ft2232h.cfg
Normal file
16
tools/openocd/interface/ft2232h.cfg
Normal file
|
@ -0,0 +1,16 @@
|
|||
# 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
|
BIN
tools/openocd/libftdi1.dll
Normal file
BIN
tools/openocd/libftdi1.dll
Normal file
Binary file not shown.
BIN
tools/openocd/libusb-0-1-4.dll
Normal file
BIN
tools/openocd/libusb-0-1-4.dll
Normal file
Binary file not shown.
BIN
tools/openocd/libusb-1.0.dll
Normal file
BIN
tools/openocd/libusb-1.0.dll
Normal file
Binary file not shown.
BIN
tools/openocd/libusb0.dll
Normal file
BIN
tools/openocd/libusb0.dll
Normal file
Binary file not shown.
BIN
tools/openocd/openocd
Executable file
BIN
tools/openocd/openocd
Executable file
Binary file not shown.
BIN
tools/openocd/openocd.exe
Normal file
BIN
tools/openocd/openocd.exe
Normal file
Binary file not shown.
45
tools/openocd/target/tgt_602.cfg
Normal file
45
tools/openocd/target/tgt_602.cfg
Normal file
|
@ -0,0 +1,45 @@
|
|||
#target chip
|
||||
|
||||
set _CHIPNAME riscv
|
||||
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x20000c05
|
||||
|
||||
set _TARGETNAME $_CHIPNAME.cpu
|
||||
target create $_TARGETNAME.0 riscv -chain-position $_TARGETNAME
|
||||
$_TARGETNAME.0 configure -work-area-phys 0x22020000 -work-area-size 0x10000 -work-area-backup 1
|
||||
#$_TARGETNAME.0 configure -rtos auto
|
||||
|
||||
echo "Ready for Remote Connections"
|
||||
|
||||
$_TARGETNAME.0 configure -event reset-assert-pre {
|
||||
echo "reset-assert-pre"
|
||||
adapter speed 100
|
||||
}
|
||||
|
||||
$_TARGETNAME.0 configure -event reset-deassert-post {
|
||||
echo "reset-deassert-post"
|
||||
adapter speed 4000
|
||||
reg mstatus 0x7800
|
||||
reg mie 0x0
|
||||
# reg pc 0x22008000
|
||||
}
|
||||
|
||||
$_TARGETNAME.0 configure -event reset-init {
|
||||
echo "reset-init"
|
||||
# 4MHz for FPGA
|
||||
adapter speed 4000
|
||||
}
|
||||
|
||||
gdb_memory_map enable
|
||||
gdb_flash_program disable
|
||||
|
||||
riscv set_prefer_sba on
|
||||
riscv set_command_timeout_sec 1
|
||||
|
||||
init
|
||||
reset init
|
||||
|
||||
#jtag arp_init
|
||||
|
||||
#resume
|
||||
#exit
|
||||
|
45
tools/openocd/target/tgt_702.cfg
Normal file
45
tools/openocd/target/tgt_702.cfg
Normal file
|
@ -0,0 +1,45 @@
|
|||
#target chip
|
||||
|
||||
set _CHIPNAME riscv
|
||||
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x20000e05
|
||||
|
||||
set _TARGETNAME $_CHIPNAME.cpu
|
||||
target create $_TARGETNAME.0 riscv -chain-position $_TARGETNAME
|
||||
$_TARGETNAME.0 configure -work-area-phys 0x22020000 -work-area-size 0x10000 -work-area-backup 1
|
||||
#$_TARGETNAME.0 configure -rtos auto
|
||||
|
||||
echo "Ready for Remote Connections"
|
||||
|
||||
$_TARGETNAME.0 configure -event reset-assert-pre {
|
||||
echo "reset-assert-pre"
|
||||
adapter speed 100
|
||||
}
|
||||
|
||||
$_TARGETNAME.0 configure -event reset-deassert-post {
|
||||
echo "reset-deassert-post"
|
||||
adapter speed 4000
|
||||
reg mstatus 0x7800
|
||||
reg mie 0x0
|
||||
# reg pc 0x22008000
|
||||
}
|
||||
|
||||
$_TARGETNAME.0 configure -event reset-init {
|
||||
echo "reset-init"
|
||||
# 4MHz for FPGA
|
||||
adapter speed 4000
|
||||
}
|
||||
|
||||
gdb_memory_map enable
|
||||
gdb_flash_program disable
|
||||
|
||||
riscv set_prefer_sba on
|
||||
riscv set_command_timeout_sec 1
|
||||
|
||||
init
|
||||
reset init
|
||||
|
||||
#jtag arp_init
|
||||
|
||||
#resume
|
||||
#exit
|
||||
|
45
tools/openocd/target/tgt_c906.cfg
Normal file
45
tools/openocd/target/tgt_c906.cfg
Normal file
|
@ -0,0 +1,45 @@
|
|||
#target chip
|
||||
|
||||
set _CHIPNAME riscv
|
||||
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x10000b6f
|
||||
|
||||
set _TARGETNAME $_CHIPNAME.cpu
|
||||
target create $_TARGETNAME.0 riscv -chain-position $_TARGETNAME
|
||||
$_TARGETNAME.0 configure -work-area-phys 0x3eff0000 -work-area-size 0x10000 -work-area-backup 0
|
||||
#$_TARGETNAME.0 configure -rtos auto
|
||||
|
||||
echo "Ready for Remote Connections"
|
||||
|
||||
$_TARGETNAME.0 configure -event reset-assert-pre {
|
||||
echo "reset-assert-pre"
|
||||
adapter speed 100
|
||||
}
|
||||
|
||||
$_TARGETNAME.0 configure -event reset-deassert-post {
|
||||
echo "reset-deassert-post"
|
||||
adapter speed 4000
|
||||
reg mstatus 0x7800
|
||||
reg mie 0x0
|
||||
# reg pc 0x22008000
|
||||
}
|
||||
|
||||
$_TARGETNAME.0 configure -event reset-init {
|
||||
echo "reset-init"
|
||||
# 4MHz for FPGA
|
||||
adapter speed 4000
|
||||
}
|
||||
|
||||
gdb_memory_map enable
|
||||
gdb_flash_program disable
|
||||
|
||||
riscv set_prefer_sba off
|
||||
riscv set_command_timeout_sec 3
|
||||
|
||||
init
|
||||
#reset init
|
||||
|
||||
#jtag arp_init
|
||||
|
||||
#resume
|
||||
#exit
|
||||
|
45
tools/openocd/target/tgt_e907.cfg
Normal file
45
tools/openocd/target/tgt_e907.cfg
Normal file
|
@ -0,0 +1,45 @@
|
|||
#target chip
|
||||
|
||||
set _CHIPNAME riscv
|
||||
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x10000b6f
|
||||
|
||||
set _TARGETNAME $_CHIPNAME.cpu
|
||||
target create $_TARGETNAME.0 riscv -chain-position $_TARGETNAME
|
||||
$_TARGETNAME.0 configure -work-area-phys 0x40000000 -work-area-size 0x10000 -work-area-backup 0
|
||||
#$_TARGETNAME.0 configure -rtos auto
|
||||
|
||||
echo "Ready for Remote Connections"
|
||||
|
||||
$_TARGETNAME.0 configure -event reset-assert-pre {
|
||||
echo "reset-assert-pre"
|
||||
adapter speed 100
|
||||
}
|
||||
|
||||
$_TARGETNAME.0 configure -event reset-deassert-post {
|
||||
echo "reset-deassert-post"
|
||||
adapter speed 4000
|
||||
reg mstatus 0x7800
|
||||
reg mie 0x0
|
||||
# reg pc 0x22008000
|
||||
}
|
||||
|
||||
$_TARGETNAME.0 configure -event reset-init {
|
||||
echo "reset-init"
|
||||
# 4MHz for FPGA
|
||||
adapter speed 4000
|
||||
}
|
||||
|
||||
gdb_memory_map enable
|
||||
gdb_flash_program disable
|
||||
|
||||
riscv set_prefer_sba off
|
||||
riscv set_command_timeout_sec 3
|
||||
|
||||
init
|
||||
#reset init
|
||||
|
||||
#jtag arp_init
|
||||
|
||||
#resume
|
||||
#exit
|
||||
|
Loading…
Add table
Reference in a new issue