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) Library Compilation (Read 454 times)
davidcoward
Junior Member
**
Offline


Posts: 54
Joined: Oct 5th, 2012
Library Compilation
Nov 19th, 2024 at 12:57am
Print Post  
I see this is on another thread but there was no conclusion. 

I've created a fresh, simple project intending to enhance it. But I notice that the libraries are compiled every time. With a simple project, this adds only a few seconds, but bigger projects are taking as long as 70sec to build.

I'm sure it didn't do this before I recently upgraded.

The build log output is attached.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12166
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Library Compilation
Reply #1 - Nov 19th, 2024 at 3:05am
Print Post  
you need to have the verbose compile enabled on the vmicro menu. The build detail is missing from your attachment.
  
Back to top
IP Logged
 
davidcoward
Junior Member
**
Offline


Posts: 54
Joined: Oct 5th, 2012
Re: Library Compilation
Reply #2 - Nov 19th, 2024 at 3:26am
Print Post  
Here you go.

On inspection. it seems to use previously compiled things for some, but not all, libraries.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2500
Joined: Feb 13th, 2019
Re: Library Compilation
Reply #3 - Nov 19th, 2024 at 8:54am
Print Post  
Can you confirm if you upgraded any libraries recently (e.g. SDFat) and if so was this done manually from ZIP files or using the Arduino or Visual Micro IDE?
« Last Edit: Nov 19th, 2024 at 9:36am by Simon@Visual Micro »  
Back to top
IP Logged
 
davidcoward
Junior Member
**
Offline


Posts: 54
Joined: Oct 5th, 2012
Re: Library Compilation
Reply #4 - Nov 19th, 2024 at 3:33pm
Print Post  
Yes, I upgraded sdfat using a zip file.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2500
Joined: Feb 13th, 2019
Re: Library Compilation
Reply #5 - Nov 19th, 2024 at 3:42pm
Print Post  
Thanks for confirming, that could explain some of the oddities we are seeing in the logs.

When you installed the Teensyduino software, did you also install all libraries with it? 
(If so there is a version of SDFat, Time, FlexCAN, Meto and Adafruit_NeoPixel already available in C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries)

If you run Build > Clean Solution, and then build your project again, and then again, it should cache all of the files.

If it does not, it may be the Sketchbook\libraries are not correctly deployed (e.g your SDFat library shows v1.0.7 but has files in the log which were introduced in v2.x).  If these are moved elsewhere, the ones installed with Teensyduino will be used instead.
  
Back to top
IP Logged
 
davidcoward
Junior Member
**
Offline


Posts: 54
Joined: Oct 5th, 2012
Re: Library Compilation
Reply #6 - Nov 19th, 2024 at 4:59pm
Print Post  
Thanks.

I did that, but the libraries still compile. 

I am using a relatively old version of Teensyduino/Arduino because the newer version have a later GCC complier which is not as efficient as the old one. This wouldn't normally matter but one of my widely deployed things uses 96% of the available space in a Teensy and the later compilers won't fit it in.

This is also why I can't/don't install the libraries with Teensyduino. It deploys the latest, which sometimes are not backwards compatible with the old (SDFat is a good example) and usually have increased sizes meaning that they compromise the code.



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


Posts: 2500
Joined: Feb 13th, 2019
Re: Library Compilation
Reply #7 - Nov 19th, 2024 at 5:03pm
Print Post  
Thanks for the update.

I assume the optimization options (e.g. Smallest) don't help with the newer compilers?

Can you confirm it is the Teensyduino 1.5.7 version in use? (The log suggests this but want to be 100%)

Can you try deleting the Sketchbook\Libraries\SDFat folder, and then unpacking the ZIP copy again, and then doing the clean build again.

After this please attach the build output again so we can review again with the clean library and build folder?
  
Back to top
IP Logged
 
davidcoward
Junior Member
**
Offline


Posts: 54
Joined: Oct 5th, 2012
Re: Library Compilation
Reply #8 - Nov 19th, 2024 at 5:43pm
Print Post  
I found the optimisations tended to miss out bits of code and the application requires real-time monitoring of certain things.

TeensyDuino is 1.57

I deleted, re-installed manually, cleaned, built and re-built and here would be the log, except the attachment box has disappeared. I'll email it.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2500
Joined: Feb 13th, 2019
Re: Library Compilation
Reply #9 - Dec 11th, 2024 at 9:24pm
Print Post  
Please install the latest release (2024.1211.0) from the top of the below board, this should resolve the caching issue:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
  
Back to top
IP Logged
 
davidcoward
Junior Member
**
Offline


Posts: 54
Joined: Oct 5th, 2012
Re: Library Compilation
Reply #10 - Dec 12th, 2024 at 5:08pm
Print Post  
Thanks!!!

Works a treat. Subsequent compilations on my example were 40s. Now down to 6s, so problem solved Grin
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint