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
Hot Topic (More than 8 Replies) Debug not compiling (Read 11822 times)
RussellC
Newbies
*
Offline


Posts: 7
Joined: Jan 13th, 2014
Debug not compiling
Jan 14th, 2014 at 8:24pm
Print Post  
Hi,

Forgive the newbie...

VS2012 Ultimate, installed latest version (having tried previous version also that had the same issue) 1.1401.12.

When I CTRL-F5, the sketch builds and runs as I expect (including the bugs that I am trying to remove with the debugger!)

When I F5 I get a compile error...

Compiling 'AquariumMonitor' for 'Arduino Due (Programming Port)'
Binary sketch size: 28104 bytes (used 5% of a 524288 byte maximum) (17.65 secs)
Compiling debug version of 'AquariumMonitor' for 'Arduino Due (Programming Port)'
AquariumMonitor.ino:No such file or directory
:compilation terminated.
VM_DBG.cpp:In file included from
VM_DBG.h:No such file or directory
:compilation terminated.
Error compiling

So two questions...


1. How can I fix the compile error?

2. Why is my compile, with or without debugging now taking ~17 secs for a hundred lines of code?

I have seen a few other posts on here about problem 1 - but I think I've been through all suggestions - no doubt I've missed something?

Any idea's?

Cheers,

Russ.
« Last Edit: Jan 15th, 2014 at 2:42pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug not compiling
Reply #1 - Jan 14th, 2014 at 8:41pm
Print Post  
Hi Russ,

1)

Sorry you have the confusing error message during debug compile. 

Actually the first thing is to close the Ide and install the latest pre-release of Visual Micro from here. One useful fix in the release is better error messages (the dbl click drill down still works too!)

When we see the error I hope the reason will become clear. Normally this is caused by a breakpoint being outside of code, on a complex code line, or invalid syntax in a breakpoint "condition" or "when hit" property.

2)

To track down why the build is going haywire you best turn on Tools>options>visual micro>compiler>verbose then email the output after a build to info [at] visualmicro.com. 

Tips

a) If you click Build>Clean Solution, how long does the next compile take and how long does another compile take after that?

b) What do you have set for these project properties in the "Micro Optimise Build (Project Global)" section
Mcu defines Affect Core
Mcu defines Affect Libs
Project defines affect core
Project defines affect libs

c)
One thing to be aware of with Arduino is that to remove code from a project you have to delete/move or rename the file extension. Sometimes people remove entries from the project in Atmel thinking that excludes them from the compile. Visual Micro should add them back again the next time the project opens to make the point. Do you have any source code in the sketch folder that should not be there?

Thanks
« Last Edit: Jan 14th, 2014 at 8:47pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug not compiling
Reply #2 - Jan 14th, 2014 at 9:30pm
Print Post  
Okay got your output thanks. It would be useful if you emailed the code from AquariumMonitor.ino.

1) Look forward to seeing the error message using the latest release.

2)17 second compile ...

You can ignore what I said about possibility of files in the sketch folder. I can see from the output that you have only one source file. 

Whilst you only have 100 lines of code, you have included libraries such as Spi, Ethernet and SD in your sketch which is why so much is being compiled. Actually I can see from the output that the Arduino core api is cached otherwise the compilation would take even longer. 

The speed will depend on your machine but it looks like the Visual Micro compiler cache is failing for newer format Arduino libraries. I can see some of the new format libs in your compile. This area has recently been through extensive changes which must have affected the cache. We will fix it thanks!

Question: How long does 1st and 2nd compile take in the Arduino Ide?

Normally we do expect a Visual Micro compile to be sub 5 seconds, your compile should take 1 second after the first compilation. Caching has not historically been a part of the Arduino Ide although more recently they have started to cache, the core at least. Visual Micro has always cached  and you were right to report this.

Thanks again.

Thanks
  
Back to top
IP Logged
 
RussellC
Newbies
*
Offline


Posts: 7
Joined: Jan 13th, 2014
Re: Debug not compiling
Reply #3 - Jan 14th, 2014 at 9:51pm
Print Post  
Hi Tim,

Thank you for the quick response...

1) I think I already have done - v1.1401.12 ?

2) email sent - verbose turned back off;

clean & build 23.75secs; build 2 17.57secs;

Mcu defines Affect Core - True
Mcu defines Affect Libs - True
Project defines affect core - False
Project defines affect libs - False

I can't find any other .ino files in the solution directory when I searched it.

Sorry!




  
Back to top
 
IP Logged
 
RussellC
Newbies
*
Offline


Posts: 7
Joined: Jan 13th, 2014
Re: Debug not compiling
Reply #4 - Jan 14th, 2014 at 10:06pm
Print Post  
Code sent...

Error message is the same - I think I am running the latest version - 1.1401.12 ?

Compiling 'AquariumMonitor' for 'Arduino Due (Programming Port)'
Binary sketch size: 25200 bytes (used 5% of a 524288 byte maximum) (17.46 secs)
Compiling debug version of 'AquariumMonitor' for 'Arduino Due (Programming Port)'
AquariumMonitor.ino:No such file or directory
:compilation terminated.
VM_DBG.cpp:In file included from
VM_DBG.h:No such file or directory
:compilation terminated.
Error compiling

Interestingly the Arduino IDE is now taking a similar time to compile as VS - historically it was in the blink of an eye... with very similar code and includes..

The machine is an 8 core i7 with 16g and ssd's - it hardly breaks a sweat while either build runs which is why I am so surprised at the time involved.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug not compiling
Reply #5 - Jan 14th, 2014 at 10:44pm
Print Post  
Okay we certainly are not caching the libs but I was going to ask about your machine. I am running the same kit so your compile is painfully slow... 

Compile Time

Because the Arduino Ide has also slowed down this sounds like a virus checker or some other issue. I guess you have restarted your pc?

Even with the cache failing on libs it takes 2.5 seconds to compile your sketch on my machine. Your compiler output shows a normal compile so this is a pc issue but I wouldn't know what is causing it. 

1st Compile
Binary sketch size: 25344 bytes (used 5% of a 524288 byte maximum) (6.06 secs)

2nd
Binary sketch size: 25344 bytes (used 5% of a 524288 byte maximum) (2.42 secs)

For compile, both Arduino and Visual Micro use the files from the "arduinoIde/hardware/tools/g++_arm_none_eabi/bin" folder and there is nothing special about these files.

Anyway we will fix the cache asap which will reduce the build time for you.

Debug Compile Error

Your sketch debugs fine so the problem must be with the placement of a breakpoint or the properties of a breakpoint. After attempting a debug upload please zip and email your sketch folder including the 'Visual Micro'  sub directory
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug not compiling
Reply #6 - Jan 15th, 2014 at 2:05am
Print Post  
There is a new release 1401.15 in the beta channel which caches 1.5 format libraries correctly. Compile time for your sketch is down from 2.5 to .34 secs.

Binary sketch size: 25344 bytes (used 5% of a 524288 byte maximum) (0.34 secs)

Did you find the reason why the Arduino compiler has slowed down? How are you getting on with that?
  
Back to top
IP Logged
 
RussellC
Newbies
*
Offline


Posts: 7
Joined: Jan 13th, 2014
Re: Debug not compiling
Reply #7 - Jan 15th, 2014 at 6:19am
Print Post  
WooHoo - Kaspersky disabled - compile time 3.x secs. Need to have a look at the exclusions I think, thank you.

Installed v1.1401.15, first compile time 7.5 secs, subsequent build 0.95 secs. What an improvement over the 17 secs - thank you!

btw, with Kaspersky on and 1.1401.15 build time is down from ~17 to ~15secs.

F5 still generating exactly the same error..

I have zipped the entire folder and emailed after a clean and a F5

I am not adding any breakpoints at the moment - the debugger seems to add a single conditional one on void loop ? 


  
Back to top
 
IP Logged
 
RussellC
Newbies
*
Offline


Posts: 7
Joined: Jan 13th, 2014
Re: Debug not compiling
Reply #8 - Jan 15th, 2014 at 8:44am
Print Post  
Update - Upgraded Kaspersky from 2013 to 2014

Clean build 9.64 secs
Subsequent build  1.23 secs


  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug not compiling
Reply #9 - Jan 15th, 2014 at 1:36pm
Print Post  
Good to hear the Virus checker fixes some of the slowness with the Arduino tool chain. I suggest you dump kaspersky which is crippling your machine and go with avast which is free and well reviewed.

The compile times I published using similar hardware were the results with virus protection active. Currently I use McAffee but I think avast will perform just as well.

Can you try the debug without the virus protection running or exclude the Visual Micro program files sub folders which is where the debugger support files are located.

If you still get the error after that please try to upload a debug version then zip and email this folder

C:\Users\russell[YOUR SURNAME]\AppData\Local\VMicro\Arduino\Builds\AquariumMonitor\arduino_due_x_dbg

Thanks
  
Back to top
IP Logged
 
RussellC
Newbies
*
Offline


Posts: 7
Joined: Jan 13th, 2014
Re: Debug not compiling
Reply #10 - Jan 16th, 2014 at 4:37am
Print Post  
I've emailed the folder across as having AV on or off produces the same error in the output window...
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug not compiling
Reply #11 - Jan 16th, 2014 at 1:07pm
Print Post  
Hi Russ,

I think the problem is that you have switch the debugger to use SoftwareSerial which Arduino might not have released yet for the Due (I need to check).

The Due has so many hardware serial ports that you should not need softwareSerial anyway.

Looking at the config it might have been you made a mistake switching to SoftwareSerial because you have not set the tx/rx pin properties which are required to use SoftwareSerial.

Please switch the project property called RemoteTransport back to the default of empty or to HardwareSerial which is the default when empty  Smiley

Thanks
  
Back to top
IP Logged
 
RussellC
Newbies
*
Offline


Posts: 7
Joined: Jan 13th, 2014
Re: Debug not compiling
Reply #12 - Jan 18th, 2014 at 2:06pm
Print Post  
Hi Tim,

And that would be the solution, thank you very much for all your help!

Is there a "reset all to defaults" that I missed somewhere? 

Russ.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug not compiling
Reply #13 - Jan 18th, 2014 at 2:53pm
Print Post  
Hi Russel,

That's a good idea having a reset all but each property has a default so clearing a property is like setting the default. The hint below each property also describes the default.

Hope that helps, good to hear it is working now. Thanks for the update.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint