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 Why always cimpiling Core (Read 525 times)
laszlo.frank
Junior Member
**
Offline


Posts: 15
Joined: Feb 27th, 2017
Why always cimpiling Core
Oct 28th, 2024 at 12:34pm
Print Post  
I noticed that vMicro always compiles Core and I am wondering why is it necessary ? It takes ages and normally it doesn't change.

When working with C# projects, Visual Studio only compiles what has changed since the last compilation, sparing a lot of time. I am not sure how exactly this is achieved, but is the same not possible for vMicro and Arduino like projects ?
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2697
Joined: Feb 13th, 2019
Re: Why always cimpiling Core
Reply #1 - Oct 28th, 2024 at 12:54pm
Print Post  
Thanks for the report, and the caching should ensure the core is compiled only once, and only recompiled when any relevant options change.

Can you enable the options shown at the top of the page and attach the complete verbose output for us to review from a rebuild of the project?
  
Back to top
IP Logged
 
laszlo.frank
Junior Member
**
Offline


Posts: 15
Joined: Feb 27th, 2017
Re: Why always cimpiling Core
Reply #2 - Nov 2nd, 2024 at 3:07pm
Print Post  
I can't consistently reproduce the issue and couldn't get a firm sense on how and when the core gets compiled, but here are a few observations:
- When switching git branch, it will be recompiled
- When switcing between configuraitons like Release/Debug, then it will be compiled again.

These realy shouldn't happen or at least should be controllable.

Also, many times more than not, the followig also happens:
- Deep searching for libraries
- Compiling libraries

I would expect that only Project code gets compiled if the content of libraries and core is not changed.
Weren't compiling libraries and core so painful it really wouldn't matter, but since it takes ages, I'd be really happy to skip those unneccessary compilations.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Why always cimpiling Core
Reply #3 - Nov 2nd, 2024 at 7:49pm
Print Post  
Visual Micro looks at changes in build properties and file times to determine what needs to be rebuilt.

If only project code has changed then libraries and core should not be rebuilt.

If switching between debug and release when a previous core/library compilation exists for that configuration yet no other things have changed, the cached version of cores and libraries should be used.

Switching git branch doesn't give us any idea of what the git branch is changing so it is difficult to comment.

There is a lot of intelligence surrounding the cache of cores, libs and project code. It makes sense a compile of core would happen when switching between release and debug for example, but only the first time that happens. 

We would need the information requested in yellow near the top of the page to compare the build properties when you believe recompile should not have happened.

Yes, there are a few painful toolchains out there. The esp32 is one of the slowest.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint