Den ons 21 juni 2023 kl 15:09 skrev Tommy Murphy <tommy_mur...@hotmail.com>:

> > Just tried what's available on mainline
>
> You mean you built OpenOCD from the repo master branch?
>
Yes, built from latest master branch, fetched from git://
git.code.sf.net/p/openocd/code with the top SHA1:s looking like this:

eebcf3cff (HEAD, mainline/master) riscv/semihosting: Fix ebreak skip on
fileio mode
63f4e7c72 target/ti-cjtag: make switching to JTAG more reliable
d8c9f66d2 jep106: update to revision JEP106BG May 2023
9f23a1d7c semihosting: fix non-zero value on Windows isatty()
71180e675 gdb_server: refactor and unify function gdb_get_char_inner

This is my current reset configuration (seems as that the V3 will not
operate without a proper reset):

reset_config srst_push_pull srst_nogate connect_assert_srst


>
> https://github.com/openocd-org/openocd
>
> Or you got the latest from your OS's software repo?
> The latter may not be the very latest.
>
> > and it doesn't seem to be supported there.
>
> What happens?
> Verbose `-d3` log?
>

Open On-Chip Debugger 0.12.0+dev-00246-geebcf3cff (2023-06-21-12:24)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The
results might differ compared to plain JTAG/SWD

nRF52 device has a CTRL-AP dedicated to recover the device from AP lock.
A high level adapter (like a ST-Link) you are currently using cannot access
the CTRL-AP so 'nrf52_recover' command will not work.
Do not enable UICR APPROTECT.

Debug: 10 1 command.c:152 script_debug(): command - reset_config
srst_push_pull srst_nogate connect_assert_srst
Debug: 11 1 command.c:152 script_debug(): command - nrf52.cpu configure
-rtos FreeRTOS
Debug: 12 1 command.c:152 script_debug(): command - init
Debug: 13 1 command.c:152 script_debug(): command - target init
Debug: 14 1 command.c:152 script_debug(): command - target names
Debug: 15 1 command.c:152 script_debug(): command - nrf52.cpu cget -event
gdb-flash-erase-start
Debug: 16 1 command.c:152 script_debug(): command - nrf52.cpu configure
-event gdb-flash-erase-start reset init
Debug: 17 1 command.c:152 script_debug(): command - nrf52.cpu cget -event
gdb-flash-write-end
Debug: 18 1 command.c:152 script_debug(): command - nrf52.cpu configure
-event gdb-flash-write-end reset halt
Debug: 19 1 command.c:152 script_debug(): command - nrf52.cpu cget -event
gdb-attach
Debug: 20 1 command.c:152 script_debug(): command - nrf52.cpu configure
-event gdb-attach halt 1000
Debug: 21 1 target.c:1619 handle_target_init_command(): Initializing
targets...
Debug: 22 1 hla_target.c:183 adapter_init_target(): adapter_init_target
Debug: 23 1 semihosting_common.c:107 semihosting_common_init():
Debug: 24 1 hla_interface.c:110 hl_interface_init(): hl_interface_init
Debug: 25 1 hla_layout.c:83 hl_layout_init(): hl_layout_init
Debug: 26 1 adapter.c:213 adapter_khz_to_speed(): convert khz to adapter
specific speed value
Debug: 27 1 adapter.c:217 adapter_khz_to_speed(): have adapter set up
Debug: 28 1 adapter.c:213 adapter_khz_to_speed(): convert khz to adapter
specific speed value
Debug: 29 1 adapter.c:217 adapter_khz_to_speed(): have adapter set up
Info : 30 1 adapter.c:177 adapter_init(): clock speed 1000 kHz
Debug: 31 1 openocd.c:133 handle_init_command(): Debug Adapter init complete
Debug: 32 1 command.c:152 script_debug(): command - transport init
Debug: 33 1 transport.c:219 handle_transport_init(): handle_transport_init
Debug: 34 1 hla_transport.c:160 hl_transport_init(): hl_transport_init
Debug: 35 1 hla_transport.c:177 hl_transport_init(): current transport
hla_swd
Debug: 36 1 hla_interface.c:43 hl_interface_open(): hl_interface_open
Debug: 37 1 hla_layout.c:28 hl_layout_open(): hl_layout_open
Debug: 38 1 stlink_usb.c:3693 stlink_open(): stlink_open
Debug: 39 1 stlink_usb.c:3705 stlink_open(): transport: 4 vid: 0x0483 pid:
0x3744 serial:
Debug: 40 1 stlink_usb.c:3705 stlink_open(): transport: 4 vid: 0x0483 pid:
0x3748 serial:
Debug: 41 1 stlink_usb.c:3705 stlink_open(): transport: 4 vid: 0x0483 pid:
0x374b serial:
Debug: 42 1 stlink_usb.c:3705 stlink_open(): transport: 4 vid: 0x0483 pid:
0x374d serial:
Debug: 43 1 stlink_usb.c:3705 stlink_open(): transport: 4 vid: 0x0483 pid:
0x374e serial:
Debug: 44 1 stlink_usb.c:3705 stlink_open(): transport: 4 vid: 0x0483 pid:
0x374f serial:
Debug: 45 1 stlink_usb.c:3705 stlink_open(): transport: 4 vid: 0x0483 pid:
0x3752 serial:
Debug: 46 1 stlink_usb.c:3705 stlink_open(): transport: 4 vid: 0x0483 pid:
0x3753 serial:
Debug: 47 1 stlink_usb.c:3705 stlink_open(): transport: 4 vid: 0x0483 pid:
0x3754 serial:
Info : 48 6 stlink_usb.c:1434 stlink_usb_version(): STLINK V3J8M3 (API v3)
VID:PID 0483:374E
Debug: 49 6 stlink_usb.c:1659 stlink_usb_exit_mode(): MODE: 0x01
Info : 50 6 stlink_usb.c:1470 stlink_usb_check_voltage(): Target voltage:
3.306596
Debug: 51 6 stlink_usb.c:1727 stlink_usb_init_mode(): MODE: 0x01
Debug: 52 6 stlink_usb.c:3093 stlink_dump_speed_map(): Supported clock
speeds are:
Debug: 53 6 stlink_usb.c:3096 stlink_dump_speed_map(): 24000 kHz
Debug: 54 6 stlink_usb.c:3096 stlink_dump_speed_map(): 8000 kHz
Debug: 55 6 stlink_usb.c:3096 stlink_dump_speed_map(): 3300 kHz
Debug: 56 6 stlink_usb.c:3096 stlink_dump_speed_map(): 1000 kHz
Debug: 57 6 stlink_usb.c:3096 stlink_dump_speed_map(): 200 kHz
Debug: 58 6 stlink_usb.c:3096 stlink_dump_speed_map(): 50 kHz
Debug: 59 6 stlink_usb.c:3096 stlink_dump_speed_map(): 5 kHz
Debug: 60 8 stlink_usb.c:1787 stlink_usb_init_mode(): MODE: 0x02
Debug: 61 8 stlink_usb.c:3871 stlink_usb_init_access_port(): init ap_num = 0
Debug: 62 8 stlink_usb.c:1130 stlink_usb_error_check(): unknown/unexpected
STLINK status code 0x5
Debug: 63 8 stlink_usb.c:1130 stlink_usb_error_check(): unknown/unexpected
STLINK status code 0x5
Debug: 64 8 stlink_usb.c:3781 stlink_open(): Using TAR autoincrement: 1024
Error: 65 8 core.c:620 adapter_system_reset(): BUG: can't assert SRST
Debug: 66 8 hla_interface.c:68 hl_interface_init_target():
hl_interface_init_target
Debug: 67 8 stlink_usb.c:2020 stlink_usb_idcode(): IDCODE: 0x2BA01477
Debug: 68 8 command.c:152 script_debug(): command - dap init
Debug: 69 8 arm_dap.c:95 dap_init_all(): Initializing all DAPs ...
Debug: 70 8 openocd.c:150 handle_init_command(): Examining targets...
Debug: 71 8 target.c:1805 target_call_event_callbacks(): target event 19
(examine-start) for core nrf52.cpu
Debug: 72 8 hla_target.c:601 adapter_read_memory(): adapter_read_memory
0xe000ed00 4 1
Debug: 73 8 stlink_usb.c:1130 stlink_usb_error_check(): unknown/unexpected
STLINK status code 0x5
Debug: 74 8 target.c:2595 target_read_u32(): address: 0xe000ed00 failed
Debug: 75 8 target.c:1805 target_call_event_callbacks(): target event 20
(examine-fail) for core nrf52.cpu
Warn : 76 8 target.c:764 target_examine(): target nrf52.cpu examination
failed
Debug: 77 8 openocd.c:152 handle_init_command(): target examination failed
Debug: 78 8 command.c:152 script_debug(): command - flash init
Debug: 79 8 tcl.c:1363 handle_flash_init_command(): Initializing flash
devices...
Debug: 80 8 command.c:152 script_debug(): command - nand init
Debug: 81 8 tcl.c:484 handle_nand_init_command(): Initializing NAND
devices...
Debug: 82 8 command.c:152 script_debug(): command - pld init
Debug: 83 8 pld.c:210 handle_pld_init_command(): Initializing PLDs...
Debug: 84 8 command.c:152 script_debug(): command - tpiu init
Info : 85 8 gdb_server.c:3774 gdb_target_start(): starting gdb server for
nrf52.cpu on 3333
Info : 86 8 server.c:297 add_service(): Listening on port 3333 for gdb
connections
Debug: 87 8 command.c:152 script_debug(): command - reset halt
Debug: 88 8 target.c:1824 target_call_reset_callbacks(): target reset 2
(halt)
Debug: 89 8 command.c:152 script_debug(): command - target names
Debug: 90 8 command.c:152 script_debug(): command - nrf52.cpu invoke-event
reset-start
Debug: 91 8 command.c:152 script_debug(): command - transport select
Debug: 92 8 command.c:152 script_debug(): command - transport select
Debug: 93 8 command.c:152 script_debug(): command - nrf52.cpu invoke-event
examine-start
Debug: 94 8 command.c:152 script_debug(): command - nrf52.cpu arp_examine
allow-defer
Debug: 95 8 hla_target.c:601 adapter_read_memory(): adapter_read_memory
0xe000ed00 4 1
Debug: 96 9 stlink_usb.c:1130 stlink_usb_error_check(): unknown/unexpected
STLINK status code 0x5
Debug: 97 9 target.c:2595 target_read_u32(): address: 0xe000ed00 failed
Debug: 98 9 command.c:541 run_command(): Command 'nrf52.cpu arp_examine'
failed with error code -4
Debug: 99 9 command.c:152 script_debug(): command - nrf52.cpu invoke-event
examine-fail
Debug: 100 9 command.c:152 script_debug(): command - nrf52.cpu invoke-event
reset-assert-pre
Debug: 101 9 command.c:152 script_debug(): command - transport select
Debug: 102 9 command.c:152 script_debug(): command - nrf52.cpu arp_reset
assert 1
Debug: 103 9 target.c:2161 target_free_all_working_areas_restore(): freeing
all working areas
Debug: 104 9 hla_target.c:336 hl_assert_reset(): hl_assert_reset
Debug: 105 9 stlink_usb.c:1130 stlink_usb_error_check(): unknown/unexpected
STLINK status code 0x5
Debug: 106 9 stlink_usb.c:1130 stlink_usb_error_check(): unknown/unexpected
STLINK status code 0x5
Debug: 107 9 stlink_usb.c:1130 stlink_usb_error_check(): unknown/unexpected
STLINK status code 0x5
Debug: 108 9 stlink_usb.c:1130 stlink_usb_error_check(): unknown/unexpected
STLINK status code 0x5
Debug: 109 9 command.c:541 run_command(): Command 'nrf52.cpu arp_reset'
failed with error code -4
Debug: 110 9 command.c:541 run_command(): Command 'reset' failed with error
code -4
User : 111 9 command.c:613 command_run_line():
Debug: 112 9 target.c:2161 target_free_all_working_areas_restore(): freeing
all working areas
Debug: 113 9 hla_interface.c:118 hl_interface_quit(): hl_interface_quit
Debug: 114 9 stlink_usb.c:1659 stlink_usb_exit_mode(): MODE: 0x02
make: *** [scripts/make/flash.mk:100: server_st] Error 1


>
>

> Is this of any use perhaps?
>
>
> https://forum.electro-smith.com/t/openocd-with-st-link-v3-mini-resolved/2308
>

Thanks, will have a look at it as well. But any input on the output above
is highly appreciated.


>
>
> BR,
> Aleks
>
>


Reply via email to