cancel
Showing results for 
Search instead for 
Did you mean: 

Cube IDE poor reliability when debugging

PHolt.1
Senior III

Here are some threads which describe the problems

https://community.st.com/t5/stm32-mcus-boards-and-hardware/32f417-how-to-use-swv-itm-swo-debug-output-without-cube-ide-or/td-p/843611/page/2

https://www.eevblog.com/forum/microcontrollers/stlink-debugger-configures-some-32f4-target-registers-e-g-swo-trace-macrocell/msg6056111/#msg6056111

Basically, if you want to do Statistical Profiling, you have to enable PC Sampling and then Cube leaks memory at around 100kbytes/sec. Eventually it crashes, obviously. The SWV ITM debug mode does not need PC Sampling and is thus a lot more reliable, but only in the OpenOCD debugger mode.

Instead of adding more stuff which nobody uses, ST should fix this program properly, starting with the famous "random file opening" issue which about 100 people have complained about.

Another way to crash Cube is to use a STLINK debugger with some unspecified fault on the USB side. Cube just leaks lots of memory and bombs. Poor error detection...

4 REPLIES 4
Ozone
Principal II

> Basically, if you want to do Statistical Profiling, you have to enable PC Sampling and then Cube leaks memory at around 100kbytes/sec. Eventually it crashes, obviously.

You might have a look at Segger Ozone, a freestanding debugger.
AFAIK it's free for non-commercial use.


PS: and not related to my moniker here ... ;)

AScha.3
Super User

>Cube IDE poor reliability when debugging

You forgot to tell: 

- IDE version

- PC system 

- st-link type/version

- target cpu

 

btw 

I use actual MxLinux, IDE 1.18.1 , debug openOCD and GDBmultiarch ,

st-link V2 ("stick", mod. for SWO ) , or V3 mods and miniE ;

targets: F103, F303 , F411, H563, H7A3, H743 , H7S3 .

About "poor reliability when debugging" i admit: (seldom) there is a problem, sometimes debug not starting, so i just click on debug again..then it starts usually, as it should. And "live expressions" i dont use/recommend to use, strange behaviour, sometimes working fine, most times not. But anyway no important feature for me, so no drama.

If you feel a post has answered your question, please click "Accept as Solution".
PHolt.1
Senior III

Various versions over past 5 years.
Win7-64, win10, 24GB, i7
STLINK V3 ISOL, V3 MINIE
32F407/417

I don't use live expressions. Normally Cube works for the usual cycle of download, breakpoints etc.

The fun starts if you want to use SWV / SWO stuff.

Yes everybody says Seggers are good but a) they are 1k+ and b) I much prefer to Cube-integrated system. I played with the cheap Edu one and saw no difference at all versus STLINK V3.

Didn't know the STLINK V2 does SWO. I used the V2 ISOL for a long time; works ok.

 

-- still no info:

- IDE version

you use.

+

 

>Didn't know the STLINK V2 does SWO

see manual:

AScha3_0-1759486697162.png

on cheap V2 "clones" you have to solder it yourself, to get swv :

AScha3_2-1759486903092.png

 

AScha3_1-1759486834344.png

 

If you feel a post has answered your question, please click "Accept as Solution".