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 Visual Micro compile now smaller than standard Arduino after trying a debug. (Read 4950 times)
matt15
Newbies
*
Offline


Posts: 8
Joined: Feb 19th, 2014
Visual Micro compile now smaller than standard Arduino after trying a debug.
Mar 3rd, 2014 at 3:34am
Print Post  
Hi all,

I've been using the VM for a week or so now, it's a lifesaver on this project...thanks Tim!

I bumped into something today that is some kind of user error I'm sure.  

Up until today, I would get exactly the same number of compiled bytes in Visual Micro as I did with the Arduino tool.  I am not using VM to upload, but using Arduino, so I've seen this number every time and used it as a means of verifying the Arduino compile.

Today, however, I tried running the Visual Micro debugger.  I wasn't really going to use it, just curious about it.  I got a number of errors, no big deal.  If/when I need it, I'll get to it.

However, now when I compile, VM reports less bytes compiled than Arduino.  

For example, VM reports: 
Binary sketch size: 221996 bytes (used 86% of a 258048 byte maximum) (7.06 secs)
and Arduino reports:
Binary sketch size: 222,432 bytes (of a 258,048 byte maximum)

With a few changes to the code, VM reports:
Binary sketch size: 231462 bytes (used 90% of a 258048 byte maximum) (8.88 secs)
and Arudino reports:
Binary sketch size: 231,898 bytes (of a 258,048 byte maximum)

So the difference is 436 bytes every time.  

I'm assuming there is some setting in VM that got set when I tried the debugger that is now making them different. 

I did have to go in and turn the debugger off in the options settings, so I figure there is some other setting that got changed perhaps?  I'd like to get back to defaults (I've tried reset tool chain and re-opening).

Any ideas what I did and how to get it back?

Thanks,
Matt





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


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Micro compile now smaller than standard Arduino after trying a debug.
Reply #1 - Mar 3rd, 2014 at 4:05am
Print Post  
Hi matt,

Thanks for the message.

What are you clicking to perform the build? Start without debug, just build or start with debug?

If you click Build>Clean does that make a difference to the size?

If not then please switch on tools>options>visual micro>compiler>verbose. click build clean then compile.

Do those things make a difference?

Thanks



  
Back to top
IP Logged
 
matt15
Newbies
*
Offline


Posts: 8
Joined: Feb 19th, 2014
Re: Visual Micro compile now smaller than standard Arduino after trying a debug.
Reply #2 - Mar 3rd, 2014 at 4:37am
Print Post  
Hi Tim,

I've just been building with "Build" and then the project (or build-> solution, same results).   

I did a build->clean just now, then rebuilt at the project level.  The size is now the same as Arduino., so thanks!

I'll keep this in mind if I bump into it again.  Any idea what might have happened?

Thanks,
Matt

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


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Micro compile now smaller than standard Arduino after trying a debug.
Reply #3 - Mar 3rd, 2014 at 4:44am
Print Post  
Great thanks for the update. Which board are you using?
« Last Edit: Mar 3rd, 2014 at 4:44am by Tim@Visual Micro »  
Back to top
IP Logged
 
matt15
Newbies
*
Offline


Posts: 8
Joined: Feb 19th, 2014
Re: Visual Micro compile now smaller than standard Arduino after trying a debug.
Reply #4 - Mar 3rd, 2014 at 4:55am
Print Post  
An APM 2.5
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Micro compile now smaller than standard Arduino after trying a debug.
Reply #5 - Mar 3rd, 2014 at 5:03am
Print Post  
Oh yes sorry forgot. I would say that was the libs cached but some pre-processors had changed.  The apm project heavily uses pre-processor defines.

There are project properties that allow you to decide what level of re-compile happens when pre-processors change but build clean can be the easiest sometimes.

I don't think you will get the debug stuff working with apm, it's changed too much and needs an overhaul + the apm code does everything different and strips away half of the arduino stuff. 

I am not even sure if softwareSerial will work in apm. If you see what object is being used for serial in the apm code that would be a useful start to adding support.

Interested to hear how you get on
  
Back to top
IP Logged
 
matt15
Newbies
*
Offline


Posts: 8
Joined: Feb 19th, 2014
Re: Visual Micro compile now smaller than standard Arduino after trying a debug.
Reply #6 - Mar 3rd, 2014 at 6:23am
Print Post  
Thanks Tim.  I doubt I'll try to debug again with the APM unless this project really, really needs it.  It'll take more time relying on printf statements (geez, last time I did that was 86?), but the project is just a migration of some custom code from the last APM version of DIY code that they had to the new one.  We'll see though...

Thanks again for all your help,
Matt
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint