Author Topic: STM32CubeIde Unable to debug  (Read 3528 times)

0 Members and 1 Guest are viewing this topic.

Offline failsafinhoTopic starter

  • Newbie
  • Posts: 5
  • Country: gb
STM32CubeIde Unable to debug
« on: September 27, 2020, 03:21:40 pm »
Hi all,

I have a board known as blue pill based on the STM32F103C8T6 microcontroller and also a st-link V2 chinese clone. When I am trying to debug on the software mentioned, I am able to program the board and then it disconnects and I am unable to debug any. When setting up the device, in system I used "serial wire" in the debug option. The debugger is fully being detected and as mentioned is able to program the micro with no issues at all, but after programming, it just disconnects.


1075048-0

Things I tried: changing the probe to OPENOCD in the debugger settings, completely erasing the micro with the STM32Programmer, reduced the frequency of the debugger, all the reset options available with no luck.

Any ideas of how to fix it? Thanks in advance
 

Offline Ario

  • Regular Contributor
  • *
  • Posts: 54
  • Country: za
Re: STM32CubeIde Unable to debug
« Reply #1 on: September 28, 2020, 01:38:19 pm »
Hi,

Are you running Mac? I did some quick googling and found the following, thread:

https://community.st.com/s/question/0D50X0000BVnlm0/debugger-not-working-after-upgrade-to-stm32cubeide-110

 

Offline failsafinhoTopic starter

  • Newbie
  • Posts: 5
  • Country: gb
Re: STM32CubeIde Unable to debug
« Reply #2 on: September 28, 2020, 03:51:29 pm »
Hi and thank you for your response,

no, I am working on Windows, what it is weird is that I am able to halt the micro and step in st link utility. :-//



I tried more things, completely empty project, just with the debug enabled by serial, connecting a reset line to the debugger, downgrading the firmware version with the st link utility (and then cube ide complained asking for an upgrade again, but same result). It is very weird.
 

Offline MosherIV

  • Super Contributor
  • ***
  • Posts: 1530
  • Country: gb
Re: STM32CubeIde Unable to debug
« Reply #3 on: September 28, 2020, 05:38:26 pm »
This usually happens if you have configured the pins used for the debugger.

Check the schematics and make sure the pins used for the debugger are not configured for your use.
I have not used stmcube so I do not know if there is pin/port config option for debugger
 

Offline failsafinhoTopic starter

  • Newbie
  • Posts: 5
  • Country: gb
Re: STM32CubeIde Unable to debug
« Reply #4 on: September 28, 2020, 05:45:30 pm »
No I didn´t, have a look to the third picture on the first post, pins are set up right when I selected the option to tell the software I would like to use the debugger. Pins PA13 as SWDIO and pin PA14 as SWCLK. It is very strange, but I will eventually make it work. In a few moments I will start with a completely blank project and erase the full memory of the micro and see what happens.

Thanks!
 

Offline MosherIV

  • Super Contributor
  • ***
  • Posts: 1530
  • Country: gb
Re: STM32CubeIde Unable to debug
« Reply #5 on: September 28, 2020, 05:50:04 pm »
Another reason for disconnect is that there is something wrong during the boot up and the processor is reset. The debugger can then not talk to the processor.

Try a simple led blinky to see if the program boots ok.
 
The following users thanked this post: failsafinho

Offline failsafinhoTopic starter

  • Newbie
  • Posts: 5
  • Country: gb
Re: STM32CubeIde Unable to debug
« Reply #6 on: September 28, 2020, 05:59:16 pm »
That´s is very interesting, I will have a look into that also, thanks!
 

Offline failsafinhoTopic starter

  • Newbie
  • Posts: 5
  • Country: gb
Re: STM32CubeIde Unable to debug
« Reply #7 on: September 28, 2020, 06:52:48 pm »
With a completely empty project I am able to debug it. So now I am really sure there is something fishy on my code that is not allowing it to debug, I will find it.

Thank you very much all for your help, at least now I know there is something on my code!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf