Probelm with MCUExpresso not being able to terminate running target.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Probelm with MCUExpresso not being able to terminate running target.

Jump to solution
7,501 Views
stevenjohnson
Contributor II

I have a LPCXpresso824-MAX board and i am just starting to play with MCU Expresso with this board. 

Often the IDE gets in a state where i try and re-download an app and debug, and the IDE complains "There is already a running debug session for the launch configuration '...'."

The target is running, usually because i remove the last breakpoint and say "Resume", and you can see its running, for example blinky will be blinking its LED,  but there is no way to terminate. The terminate Button is greyed out.  Even the "Terminate, Build and Debug '...'" command fails with the same error.

The only way I have found out of this is the shutdown MCUExpresso and restart it, which doesn't feel very robust.  I am just playing now, but if i was developing serious code this would be a very annoying scenario.  So am i doing something wrong?  Is there a hidden way to terminate a running app that im not seeing?

1 Solution
4,804 Views
BlackNight
NXP Employee
NXP Employee

Hi Steve,

from the screenshot the debugger shows that the programm is suspended (paused), so you cannot use the suspend button again. So you say the program is really running on target? If you are unsure what you changed in the launch configuration: simply delete that .lauch file, and if you start debug again, it will create a new and clean launch configuration for you.

I hope this helps,

Erich

View solution in original post

0 Kudos
15 Replies
4,804 Views
kuruibonny
Contributor III

Thanks was stuck at it wondering what was happening

0 Kudos
4,804 Views
danielholala
Senior Contributor II

The creators of MCUXpresso have heard our pleas.

Recent versions of MCUXpresso sport a new button to allow for cleaning up all debug sessions:

Capture Clear Debug Session.PNG

This button was helpful when a debug session seemed stuck. Give it a try.

0 Kudos
4,804 Views
steverudd
Contributor II

Hi I have similar problem

I have been running all OK this morning and then this afternoon I get this situation

pastedImage_1.png

Note the Suspend button is greyed, but also it says thread (suspended:Breakpoint) when in fact the program is running!

I have tried the "Clean Up Debug" button but still no joy.

I am using LPC-Link2 to control the target board.

MCUXpresso version 10.2.1

It is likely that I have altered something in the "Edit Launch configuration properties" page, but I cannot see what it may be!

Any suggestions?

0 Kudos
4,805 Views
BlackNight
NXP Employee
NXP Employee

Hi Steve,

from the screenshot the debugger shows that the programm is suspended (paused), so you cannot use the suspend button again. So you say the program is really running on target? If you are unsure what you changed in the launch configuration: simply delete that .lauch file, and if you start debug again, it will create a new and clean launch configuration for you.

I hope this helps,

Erich

0 Kudos
4,804 Views
steverudd
Contributor II

Thanks Erich - that has worked !

:smileyhappy:

0 Kudos
4,804 Views
nicolastoulouse
Contributor II

For me the solution was to clic on every line (near "main() at main.c:63 ...") in debug perspective and one of them that I didn't suspect let me clic on the stop button.DebugLineToClic.JPG

0 Kudos
4,804 Views
samuelleyden
Contributor I

You might try changing the disconnect behavior in the debugger.

MCUXpresso IDE: Terminate and Disconnect a Debug Session | MCU on Eclipse 

0 Kudos
4,804 Views
janblumenkamp
Contributor I

Same problem here with Ubuntu! I definitely have no broken chrystal...

0 Kudos
4,804 Views
lpcxpresso_supp
NXP Employee
NXP Employee

So please can clarify exactly what your problem is and we then might be able to advise better. For instance ...

  • What version of Ubuntu are you using?
  • What debug probe are you using and to what target board and MCU?
  • What exact behaviour do you see and when?

Note that if you are using LinkServer, then you can manually kill the debug related processes if necessary without restarting the IDE. For details, please see the supplied MCUXpresso IDE v10.0.2 User Guide, section 14.12.7 "Troubleshooting LPC-Link2" (much of this is applicable to other CMSIS-DAP probes too). But the main thing here is that  you can use the task manager or equivalent to kill any tasks called:

  • redlinkserv
  • arm-none-eabi_gdb*
  • crt_emu_*

Regards,

MCUXpresso IDE Support

4,805 Views
athmesh_n
Contributor IV

Thank You, this was really helpful.

Whenever I pop into error like this, I always restart my IDE.

Capture.PNG

I always get into situation of not being able to debug. even though there is NO DEBUG in background. 

I did just like what lpcxpresso_support‌ told. I stopped arm-none-eabi_gdb* using task manager.

But when I debug and cancel the debug in middle. I get the same error and there is no arm-none-eabi_gdb* in task manager. 

How to recover?

0 Kudos
4,805 Views
danielholala
Senior Contributor II

I use MCUXpresso IDE v10.1.1 [Build 606] [2018-01-02]  on Windows 10.

I'm running a simple "blinky" example on an LPCXpresso LPC1769 (rev. B) eval board and I observe the same behaviour: I was able to start a debugging session once and after I pressed "Terminate", all attempts to start a new debugging session immediately failed with the above quoted error message. I can not press the "the button with the big red square" (as suggested) because it's greyed out.

 

What seemed to have helped is to delete the launch configuration. Right-click on the project in Project Explorer and select your current launch configuration under Launch Configurations > Delete.

Additionally, I deselected "remember my selection" in the "available attached probes" window (that window opens when a launch configuration is created when a new debug sessions starts and there is no launch configuration in the root directory of your project).

4,805 Views
tomahola
Contributor II

I'm testing out a TWR-K65F180M board to evaluate the processor as a potential candidate for my next project.  Trying to Run or Debug an example project from NXP the project compiles and then nothing happens and Stop button is still greyed out.  Trying to Run/Debug again it complains there is already a running debug session.  Only restarting MCUExpresso help.  Maybe I'll look for another processor vendor..

4,805 Views
tomahola
Contributor II

An update for my case that might help others.  I found that my board had a broken chrystal.  This may have caused the strange behaviour of the debugger but I'm not sure.  The MCU starts with internal oscillator but when the code enables the chrystal oscillator the MCU stops and seems the debugger can not handle the condition.  One would expect the debugger still would be able to reset the MCU but no - only recovery is to restart MCUExpresso.

0 Kudos
4,805 Views
converse
Senior Contributor V

The problem is that you are still debugging (even is you press Resume). You need to stop debugging. IN the MCUXpresso User Guide (available from the Help menu), there is a section on Debugging. Near the bottom of that section, it describes "Stopping Debugging" in which it says "To stop debugging, just press the Stop button". The Stop button is the button with the big red square.

But, I recommend you read the User Guide..

0 Kudos
4,805 Views
stevenjohnson
Contributor II

Yes, I know that,  As I said in the original post, the Terminate (or Stop) button is greyed out when the IDE gets into this state.  Its not possible to press it, and the shortcut to terminate and re-download doesn't work either.