cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to enter debug mode

Jvan.19
Associate

I'm new to ST32 series, I bought a NUCLEO-L476RG and a B-L475E-IOT01A to get started. When I plug in either of these boards, it installs itself as a ST-Dongle and ST-Virtual COM port. When I execute my code it flashes the board, it starts my code but the Console states this:

Waiting for debugger connection...

Debugger connected

   -------------------------------------------------------------------

            STM32CubeProgrammer v2.1.0          

   -------------------------------------------------------------------

Log output file:  C:\Users\Jan\AppData\Local\Temp\STM32CubeProgrammer_a01432.log

Error: No debug probe detected.

Encountered Error when opening C:\ST\STM32CubeIDE_1.0.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_1.0.0.201904021149\tools\bin\STM32_Programmer_CLI.exe

Error in STM32CubeProgrammer

Any breakpoint I set is skipped, I can only pause the program and continue again. Any pointers to what I do wrong? I was expecting it to stop at the main function allowing me to step through the code step by step.

1 ACCEPTED SOLUTION

Accepted Solutions

Thanks for the support. The problem was caused by a bad USB port, when the HUB was replaced it works fine.

View solution in original post

8 REPLIES 8
Markus GIRDLAND
ST Employee

Do you have CubeProgrammer stand alone? If so, do you experience a problem with it?

If you look in C:\ST\STM32CubeIDE_1.0.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_1.0.0.201904021149\tools\bin\STM32_Programmer_CLI.exe directory, is the CLI.exe placed there?

Thanks for the support. The problem was caused by a bad USB port, when the HUB was replaced it works fine.

Piono
Associate II

I have a similar problem. I'm new to STM32. I have STM32496G-discovery board and STMCubeIDE. When I compile one of the provided examples or generate one with the code generator in Cube, I get the following in console when entering debug:

Log output file:  C:\Users\<user>\AppData\Local\Temp\STM32CubeProgrammer_a09132.log

Error: No debug probe detected.

Encountered Error when opening C:\ST\STM32CubeIDE_1.0.2\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_1.0.0.201904021149\tools\bin\STM32_Programmer_CLI.exe

Error in STM32CubeProgrammer

The board seems to reset but then enters back into the preloaded GUI demo. I can pause and restart it with the debug controls in the IDE, but it certainly is not the code that I was trying to load. Just in case, I do have STM32_Programmer_CLI.exe in that long directory above.

Regards,

-p

A separate issue is that for the life of me I cannot figure out how to build and load production code (without the debugger) either in this IDE. Please suggest resources that can clarify this.

JKnut
Associate

I am also new to the ST world and was having the same problem with a stm32f4-discovery board. When I tried to debug my program, I get an "Error: No debug probe detected. " message AFTER the debugger has connected.

It seems that the debugger does not want to work with external USB ports. I can get the debugger to run when plugged directly into a laptop USB port but it will fail when using any external USB port including ports on my "official" HP docking station.

Piono
Associate II

Thank you for your comment. I downloaded an IAR Workbench (kick-start / code limited eval). It works just fine and I can compile upload and debug small examples with the same ST-link driver and USB cable / port, so it is not the hardware. I'd be perfectly happy with the IAR, except I need a full license to build the larger examples due to the code limit, which we are not ready to do. This is clearly a software rather then hardware issue ;) I get this results with compiling a firmware example or starting with a CubeMX boiler tape code. The only thing I have not done is try to re-flash the firmware on the debugger into J-link and use one of their drivers. It is supposedly possible but I am not sure if it would be reversible and I feel I should not have to do this since IAR Workbench works just fine with the ST-link driver.

Piono
Associate II

Update: I have installed STM32CubeIDE on my new laptop with the intention to flash the board to J-Link, but what do you know it works now with ST-Link and the debugger finally connects to the board. Perhaps there was a patch in the mean time since I do not think I did anything with the install as far as I know...

I have a new problem now. With the higher screen resolution of the new laptop the STM32Cube part of the IDE require a microscope to see. The only solution that I found so far is to reduce the screen resolution of the machine. Is there any way to change the font size in the STM32Cube?

BTW, does ST every visit this board?

I have the same problem and in my directory, there is no cli.exe it has only file:///C:/ST/STM32CubeIDE_1.0.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_1.0.0.201904021506/tools/bin/STM32_Programmer_CLI0693W00000Sv03pQAB.png