Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Re: Restarting IDE due to AS application has stopped working. (Read 2488 times)
Jerry Easley
Junior Member
**
Offline


Posts: 10
Joined: Dec 29th, 2014
Re: Restarting IDE due to AS application has stopped working.
Mar 5th, 2015 at 11:19pm
Print Post  
I, too, am having this problem.  I have tried all of the above suggestions to no avail.  If after I "start debug" the second time, I close the IDE and start PuTTY on COM3, and then press enter, the application starts running and the serial data appears as expected.

I added the following code to the application:

unsigned strokes = 0, rest = REST, firstTimeSwitch = 1;

void firstTimeBreakpoint()
{
     firstTimeSwitch = 0;
     Serial.println("first time break point");
}

I call this function as the last thing in the loop() function, as follows:

if (firstTimeSwitch)
           firstTimeBreakpoint();

I set only one breakpoint, on the println line.

If I initialize firstTimeSwitch as 0, firstTimeBreakpoint, is never called, if initialized as 1, it get called only on the first pass through loop().

So, if I :

1) reset the IDE
2) initialize firstTimeSwitch as 1
3) "start debug'
4) "STOP DEBUG"
5) "start debug" a second time

the application runs through the loop() function once and hangs.

If, on the other hand, I:

1) reset the IDE
2) initialize firstTimeSwitch as 0
3) "start debug'
4) "STOP DEBUG"
5) "start debug" a second time

The application runs as expected, but, the serial data does not show up on the serial monitor.  I can stop and start debugging as many times as I like but the serial data is missing.  If I "unclick" connect on the serial monitor and then start PuTTY the application is restarted and the serial data is present.  If I then close PuTTY and click "connect" on the serial monitor, it won't connect, the connect box becomes unclicked.

I have never had this problem before today and it is present on all applications I have tried.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Restarting IDE due to AS application has stopped working.
Reply #1 - Mar 6th, 2015 at 12:32am
Print Post  
Hi Jerry,

I split the thread because the one you picked covered a couple of things.

Can you first please conform what happens after the 2nd time debug starts? Does the app crash or just that debug fails?

Thanks
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint