From fe924003e53ecfa3ef0df06d0ca3b2356a7225ae Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 5 Apr 2021 18:56:28 +0100 Subject: [PATCH] add stlink directdap config --- openocd_stlink_usb.cfg | 21 +++++++++++++++++++++ openocd_stlinkv2.cfg | 8 +++++--- 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 openocd_stlink_usb.cfg diff --git a/openocd_stlink_usb.cfg b/openocd_stlink_usb.cfg new file mode 100644 index 0000000..1db9cb4 --- /dev/null +++ b/openocd_stlink_usb.cfg @@ -0,0 +1,21 @@ +debug_level 4 + +interface st-link +adapter speed 9000 +#jtag_rclk 300 +transport select dapdirect_jtag +st-link backend usb +st-link vid_pid 0x0483 0x3748 + +# this should be irlen=4 +jtag newtap libresoc cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id 0x000018ff + +#hla newtap libresoc tap -irlen 4 -irmask 0xf -ircapture 0xf -expected-id 0x000018ff + +#set _TARGETNAME libresoc.tap +#target create $_TARGETNAME.0 ppc64 -chain-position $_TARGETNAME -rtos hwthread + +# Configure work area in on-chip SRAM +#$_TARGETNAME.0 configure -work-area-phys 0x80000000 \ +# -work-area-size 1000 -work-area-backup 0 + diff --git a/openocd_stlinkv2.cfg b/openocd_stlinkv2.cfg index 8958565..787a00f 100644 --- a/openocd_stlinkv2.cfg +++ b/openocd_stlinkv2.cfg @@ -1,13 +1,15 @@ +debug_level 4 + interface hla hla_layout stlink hla_device_desc "ST-LINK" hla_vid_pid 0x0483 0x3744 0x0483 0x3748 0x0483 0x374b -transport select hla_jtag #jtag_rclk 300 -adapter_khz 25 +adapter speed 9 +transport select hla_jtag # this should be irlen=4 -hla newtap libresoc tap -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id 0x000018ff +jtag newtap libresoc cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id 0x000018ff #hla newtap libresoc tap -irlen 4 -irmask 0xf -ircapture 0xf -expected-id 0x000018ff -- 2.30.2