cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging Nucleo-H723ZG with Segger J-Link?

MHoop.1
Senior

I am trying to debug my Nucleo H723ZG board using the CN5 (MIPI10) and a Segger J-Link Pro. But I have tried both methods described in the UM2407 6.3.3 "Using an external debug tool to program and debug the on-boards
STM32H7" and neither allows the J-Link to connect to H7. When I attempt to start a debugging session, I get the following error message:

could_not_verify_ST_device.png

And the J-Link startup dialog looks like this:

 

 

 

SEGGER J-Link GDB Server V7.84e Command Line Version

JLinkARM.dll V7.84e (DLL compiled Feb  1 2023 16:41:41)

Command line: -port 2331 -s -device STM32H723ZG -endian little -speed 4000 -if swd -vd
-----GDB Server start settings-----
GDBInit file:                  none
GDB Server Listening port:     2331
SWO raw output listening port: 2332
Terminal I/O port:             2333
Accept remote connection:      localhost only
Generate logfile:              off
Verify download:               on
Init regs on start:            off
Silent mode:                   off
Single run mode:               on
Target connection timeout:     0 ms
------J-Link related settings------
J-Link Host interface:         USB
J-Link script:                 none
J-Link settings file:          none
------Target related settings------
Target device:                 STM32H723ZG
Target device parameters:      none
Target interface:              SWD
Target interface speed:        4000kHz
Target endian:                 little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link Pro V4 compiled Sep 22 2022 15:00:37
Hardware: V4.00
S/N: 174403180
Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
Checking target voltage...
Target voltage: 3.32 V
ERROR: Failed to listen at socket (Err = -1)
ERROR: Failed to open listener port 2331
Restoring target state and closing J-Link connection...
Shutting down...
Failed to open listener port 2331

 

 

 

This appears to be an issue with the GDB server, but I can't figure out why? Or perhaps it might be that the CPU is not running?

Any thoughts would be appreciated.

Thanks,

MikeH

 

 

5 REPLIES 5
AScha.3
Chief III

the CN5 connects to the onboard st-linkV3 . did you disable this ? 

so dont connect j-link , use the onboard st-linkV3 , connect PC to CN1 USB (micro usb probably).

is it (still) working?

If you feel a post has answered your question, please click "Accept as Solution".

AScha,

"so dont connect j-link , use the onboard st-linkV3 ,"

I need to use the J-link for more complex dual-board debugging. I don't want to use the on-board ST-Link.

"the CN5 connects to the onboard st-linkV3"



..not according to the documentation. CN5 is the MIPI debugging connector as shown below. 

cn5.png

"did you disable this ? "

I did jumper the STLINK-RST pin, but this appears to also disable the power supplied to the CPU. My J-Link cannot connect to the CPU.

Again, I prefer to use the more powerful J-Link Pro for debugging. How can I do this with the Nucleo board?

Thx,

Mike

ok, so you want/need j-link...hmm.

look at circuit:

https://www.st.com/en/evaluation-tools/nucleo-h723zg.html#cad-resources

jumper the STLINK-RST pin, ok. but seems, hse + lse not fitted on board, so you cannot run with external clocks, except you have mount them on board + connect (solder bridges); (and st-link under reset -> no clock to H7 cpu !)

then decide, how to power it...and st-link needs to be powered also, even in reset, because connects also to cn5.

you should get connect with j-link, "under reset", because cpu starting then on internal HSI clock.

so: some work, to run it with j-link. :)

If you feel a post has answered your question, please click "Accept as Solution".

Probably move jumper from JP3 to JP1. And JP2 to CHGR if using USB-C to power.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
MHoop.1
Senior

Tesla, "Probably move jumper from JP3 to JP1. And JP2 to CHGR if using USB-C to power"

This does let the J-Link to connect to the MCU, but as mentioned by Ascha, the chip is now not receiving a clock from the debugger. Seems a bit confusion that the documentation clearly implies that this can be done.

6.3.3 Using an external debug tool to program and debug the on-boards
STM32H7
There are two basic ways to support an external debug tool:
1.Keep the embedded STLINK-V3E running.
Power on the STLINK-V3E at first until the COM LED lights RED. Then connect your external debug tool through the MIPI-10 debug connector (CN5).
2. Set the embedded STLINK-V3E in the high-impedance state:
When the STLK_RST jumper (JP1) is ON, the embedded STLINK-V3E is in the RESET state, and all GPIOs are in high impedance. Then it is possible to connect the external debug tool to the debug connector (CN5).