cancel
Showing results for 
Search instead for 
Did you mean: 

Can a target affect or crash Cube IDE via a debugger?

PHolt.1
Senior II

This has been reported by many Cube IDE users.

The most common manifestation is that Cube drops the comms, stating

This can be due to a bad STLINK debug cable, but the weird thing is that it varies according to target software.

I have posted more details here
https://www.eevblog.com/forum/microcontrollers/32f4-can-a-target-crash-or-affect-cube-ide/

Another thing I have found is that the use of the SWV ITM debug console breaks Cube with the above error, sometimes within seconds, but right now I am not using this feature.

The debugger is currently STLINK V3 ISOL but it happens with both STLINK V2 and V3, both ISOL.

1 REPLY 1
AScha.3
Chief

on my almost finished audio-streamer/player, now in metal case (with mains filter ) i had debug running with SWV connected on a st-link V2 (stick, "clone" called by Mr. STM now ) some hours every day, just to see, if there still a problem.

this stopped debug (as the well known > debug connection dropped - retrying etc. < ) typical after some minutes or an hour. So i try the new stlink V3 (mods), with same USB2 cable, about 3m long (!), to see, if this is better.

No, drops debug connection every some minutes now. ok, so try slow clock...nothing better.

so again 24MHz swc, 16MHz swv . ("auto" setting)

but then other idea: what, if it catches some spike from mains ..? because target now separate supply and plugged in at wall outlet. so took a long cold appliance cable and plugged in at the master/slave socket strip , the PC is getting its power. and new mains cable close to USB cable to target now.

And surprise : no debug hang up, error or stop for hours at full speed of stlink V3 . (longer time i didnt test)

so it seems to be a problem of Interfering pulses coming from ground or mains connections.

furthermore there are other problems in IDE-debug connection, e.g. starting debug stops immediately with "cannot connect" or whatever, just start debug again, running fine.

( btw i use openOCD most time ; and system is Linux MX 18 (5 y old now) , CubeIDE 1.10.1  )

(at work, on Win 7 or 10 PCs, more problems: sometimes a java process hanging - need to kill it.)

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