2021-08-05 04:21 PM
Hi everyone, thank you for your help.
Currently I can program the stm32h723 device at the nucleo board using the ST-Link V3 with the MCU voltage set to 3V3 but cannot with the voltage set to 1V8.
I bought the STLINK-V3SET and the STLINK-V3 voltage conversion expansion board, followed the mounting steps to stack the MB1441 (STlink V3) and the MB1598 (Voltage conversion) and I am still getting the same error message when I try to program the device through the MIPI 10 connector using the Cube IDE.
This is the complete error message I get when I try to program the device:
"Failed to start GDB server
Error in initializing ST-LINK device.
Reason: (13) Unknown. Please check power and cabling to target."
Regards
Edu.
2021-08-05 08:18 PM
Can you program via STM32CubeProgrammer? Does it detect the chip and voltage okay?
2021-08-06 01:45 AM
Hm, I had no trouble with nucleo-h723zg and the internal STLink-V3 at VDD 1.8V (by moving JP5). Same on nucleo-h7a3zi-q, in both cases with OpenOCD.
AFAIK GDB-server internally uses OpenOCD, so you might try this directly to diagnose the problem. The cfg file I'm using is attached.
BTW: You're using a bare nucleo-board without *any* external hardware attached?
2021-08-06 12:21 PM
Yes, it worked. Thank you for the suggestion. Any idea why it works with the STM32CubeProgrammer but not with the STM32CubeIDE?
2021-08-06 12:22 PM
Yes, I am using a bare nucleo board.
I will try using the OpenOCD and will give a feedback. Thank you for your suggestion.
2021-08-06 12:32 PM
I tried with OpenOCD as the debug probe at the CubeIDE and got all these messages:
Open On-Chip Debugger 0.11.0-rc2+dev-00037-g4c4dbd9 (2021-02-09-13:39)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : STLINK V3J7M2B4S1 (API v3) VID:PID 0483:374F
Info : Target voltage: 1.808417
Info : clock speed 8000 kHz
Info : stlink_dap_op_connect(connect)
Info : SWD DPIDR 0x6ba02477
Info : STM32H735ZGTx.cm7: hardware has 8 breakpoints, 4 watchpoints
Info : STM32H735ZGTx.cm7: external reset detected
Info : starting gdb server for STM32H735ZGTx.cm7 on 3333
Info : Listening on port 3333 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080005f8 msp: 0x20020000
Info : Device: STM32H72x/73x
Info : flash size probed value 1024
Info : STM32H7 flash has a single bank
Info : Bank (0) size is 1024 kb, base address is 0x08000000
Info : New GDB Connection: 1, Target STM32H735ZGTx.cm7, state: halted
Info : accepting 'gdb' connection on tcp/3333
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080005f8 msp: 0x20020000
Info : New GDB Connection: 2, Target STM32H735ZGTx.cm7, state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080005f8 msp: 0x20020000
Info : Padding image section 0 at 0x08001bcc with 20 bytes (bank write end alignment)
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080005f8 msp: 0x20020000
shutdown command invoked
Info : dropped 'gdb' connection
shutdown command invoked
So I do not know how to interpret that. it looks like it gets halted all the time by another debug request.
2021-08-07 10:50 AM
So far it looks ok. Yes, there seems to be a gdb instance connecting and then disconnecting. Looks like ST had modified the config files (i.e. target/stm32h7x.cfg) or the IDE starts the gdb server here automatically. But anyway, there should be no difference whether VDD is at 3.3V or 1.8V.
But why are there two GDB connections?
The original message "Error in initializing ST-LINK device." looks weird, as we see that there is no problem at all. Maybe there's an old gdb or openocd process still lurking around and blocking the STLink? Or always two gdb instances started?