cancel
Showing results for 
Search instead for 
Did you mean: 

Error when trying to debug code on custom board with ST-Link V3

DBurr
Senior

Hi,

I have a custom board and am trying to debug live code on the target MCU with STM32CubeIDE but constantly getting the below error. I should note that I'm running Ubuntu 18.04 and have so far been successful in loading my built code with STM32CubeProgrammer and the same ST-Link V3 JTAG adaptor so I know that the JTAG port is working but STM32CubeIDE is not happy using it. I've also successfully debugged live code on a Nucleo dev board.

STMicroelectronics ST-LINK GDB server. Version 5.5.0
Copyright (c) 2019, STMicroelectronics. All rights reserved.
 
Starting server with the following options:
        Persistent Mode            : Disabled
        Logging Level              : 1
        Listen Port Number         : 61234
        Status Refresh Delay       : 15s
        Verbose Mode               : Disabled
 
Waiting for debugger connection...
Debugger connected
      -------------------------------------------------------------------
                        STM32CubeProgrammer v2.4.0                  
      -------------------------------------------------------------------
 
ST-LINK SN  : 003D00253038511834333935
ST-LINK FW  : V3J6M2B4S1
Voltage     : 3.31V
Error: ST-LINK error (DEV_UNKNOWN_MCU_TARGET)
2nd connect tentative with a lower frequency (8MHz)
ST-LINK SN  : 003D00253038511834333935
ST-LINK FW  : V3J6M2B4S1
Voltage     : 3.31V
Error: ST-LINK error (DEV_UNKNOWN_MCU_TARGET)
Encountered Error when opening /opt/st/stm32cubeide_1.1.0/plugins/com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.linux64_1.3.0.202002181050/tools/bin/STM32_Programmer_CLI
Error in STM32CubeProgrammer
Debugger connection lost.
Shutting down...

Thanks,

Doug Burrell

5 REPLIES 5
Markus GIRDLAND
ST Employee

Make sure wiring and the hardware aspects of your custom board is set up correctly. Do you have CubeProgrammer as a stand-alone application as well? If so, do you receive the same issue when you try to connect to CubeProgrammer stand-alone?

DBurr
Senior

I've already been able to load the firmware onto the board using STM32CubeProgrammer stand along application so the hardware and JTAG connection appears to be working correctly.

Uwe Bonnes
Principal II

STLinkv3 denies working with non-STM32 parts and is more picky to connect to STM32 parts in certain run states. If you have another debugger, try that first.

DBurr
Senior

Are you suggesting some other type of JTAG adaptor than the ST-LinkV3? This is the only HW debugger I have. I've already verified it works along with my board since I've been able to program the board using STM32CubeProgrammer so there is some problem with STM32CubeIDE and am hoping someone here can suggest a fix.

Uwe Bonnes
Principal II

First test is always to connect under reset. Expect also misbehaving cables and connectors