cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WL33 Debug prove ST-LINK(ST-LINK GDB server) not working

ola
Associate III

Hi All,

I have just started a project with STM32WL33CC1 MCU. To get started I am trying to run and debug the example MRSUBG_Chat project.
The project builds fine but refuses to enter debugging.

I can program the WL33 using STM32CubeProgrammer and STM32_Programmer_CLI.exe version 2.18. An earlier version of the STM32_Programmer_CLI.exe
version 2.14 that I had on my laptop did not work. 

I can debug using OpenOCD option but I can not seem to debug using the ST-LINK GDB server option. Is there something that I am missing?
I noticed that the STM32CubeIDE calls the STM32CubeProgrammer_CLI.exe using the same command tool that works when ran manually. 

I noticed that if I ran STM32CubeProgrammer_CLI.exe with mode=HwRstPulse then the error I get is similar to what the STM32CubeIDE throws.


As mention earlier I can manually use STM32_Programmer_CLI.exe to connect with the following 

C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>STM32_Programmer_CLI.exe --connect port=SWD

-------------------------------------------------------------------
STM32CubeProgrammer v2.18.0
-------------------------------------------------------------------

ST-LINK SN : 004200293331511234333834
ST-LINK FW : V3J15M7B5S1
Board : NUCLEO-WL33CC
Voltage : 3.30V
SWD freq : 8000 KHz
Connect mode: Normal
Reset mode : Software reset
Device ID : 0x027
Revision ID : Rev A
Device name : STM32WL33
Flash size : 256 KBytes (default)
Device type : MCU
Device CPU : Cortex-M0+
BL Version : --

 

########################################################################

STM32CubeIDE version 1.17.0 error 

########################################################################

Copyright (c) 2024, 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
SWD Debug : Enabled

Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
-------------------------------------------------------------------
STM32CubeProgrammer v2.18.0
-------------------------------------------------------------------

Log output file: C:\Users\UserName\AppData\Local\Temp\STM32CubeProgrammer_a22696.log
ST-LINK SN : 004200293331511234333834
ST-LINK FW : V3J15M7B5S1
Board : NUCLEO-WL33CC
Voltage : 3.30V
Error: ST-LINK error (DEV_TARGET_RESET_ERR)
2nd connect tentative with frequency (8MHz)
ST-LINK SN : 004200293331511234333834
ST-LINK FW : V3J15M7B5S1
Board : NUCLEO-WL33CC
Voltage : 3.30V
Error: ST-LINK error (DEV_TARGET_RESET_ERR)
Encountered Error when opening C:\ST\STM32CubeIDE_1.17.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.2.0.202409170845\tools\bin\STM32_Programmer_CLI.exe
Error in STM32CubeProgrammer
Shutting down...
Exit.

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @ola 

Thank you so much for the work around you have implemented, I suggest you sold SB30 (on the back of the MB180-NoUSB-D02) board. 

PS: this should work fine will using the MB180-NoUSB-D03.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

8 REPLIES 8

Hi Andrew,

I am using the NUCLEO-WL33CC1 

https://www.st.com/en/evaluation-tools/nucleo-wl33cc1.html

Regards

Ola

ola
Associate III

HI Andrew,

Just for completion. Please find below.

1. [Part Number] NUCLEO-WL33CC1 
2. [Environment] Windows 11 laptop
3. [Schematics] Using ST Nucleo board.
4. [Details] STM32CubeIDE would not enter debug.
5. [Expected behavior] It should enter debug like other STM32 micros
6. [How to reproduce] Simply connect to USBC socket on PC
7. [Occurrence] The problem is constant
8. [Sanity checks] Changed cable. Confirmed boards with STM32CubeProgrammer, STM32CubeProgrammer_CLI.exe, OpenOCD

Many thanks in advance.

Regards

Ola

STTwo-32
ST Employee

Hello @ola 

I'm escalating this behavior to the concerned team (under internal ticket number 199780). I will be back to you as soon as I have any updates.

For the STM32CubeProgarmmer V2.14.0, this is due to the fact that the STM32WL3 is a new product (after the release of the V2.14.0)

Best Regards.

STTwo-32

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi STTwo-32,

Thank you for your reply. Yes I can understand why an old tool does not support a new device that was not available when the tool was being built. This is not an issue as this was easily solved by using STM32CubeProgrammer V2.18.0.

I look forward to hearing from your team.

Regards

Ola

ola
Associate III

Hi All,

While ST sort out the bug reported in this thread. In the meanwhile as a work around we can use OpenOCD as a debugger and connect to multiple boards using the following steps outline below.

  1. Select Debugger tab for Debug Configuration
  2. From Debug probe using the drop down combo box select ST-LINK (ST-LINK GDB server)
  3. From the Interface section check the ST-LINK S/N radio button followed by pressing the Scan button. This would populate the combo box with list of board serial number attached to your PC.
  4. Identify each boards serial number and create separate configuration for the board as show below do forget to click apply to save your changes.
  5. From Debug probe using the drop down combo box select ST-LINK (OpenOCD)
  6. In the section OpenOCD Setup, enter into the Edit box -c "hla_serial DEADBEFE3331511234333834" Note that the -c is not in the quoted string but outside.
  7. Click apply to save your configuration.
  8. Happy debugging

 

ola_0-1736337062707.png

 

Hello @ola 

Thank you so much for the work around you have implemented, I suggest you sold SB30 (on the back of the MB180-NoUSB-D02) board. 

PS: this should work fine will using the MB180-NoUSB-D03.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi STTwo-32,

I can confirm that by soldering the SB30 connection located on the back of the NUCLEO-WL33CC1 causes the ST-LINK(ST-LINK GDB server) Debug probe option to work.

Many thanks one again.

Regards

Ola