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 Core recompile after board option change (Read 1712 times)
herman
Junior Member
**
Offline


Posts: 47
Joined: Jan 11th, 2017
Core recompile after board option change
Apr 28th, 2023 at 11:52am
Print Post  
Hi,

I am working with RP2040 Pico W, and the earlephilhower/arduino-pico repository.

In there, in board options 12, you choose the upload method to be used.

When changing this option, there is the possibility that compile time options are changed.
This when changing from/to the Pico-Debug option.

When doing this, no core recompile is initiated -> core and program compiles are using wrong -D options, until a clean project has happened.

PS : The Pico-Debug option is for using the majbthrd/pico-debug repository and is not the same as the vmicro RPI-debug which uses picoprobe.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2710
Joined: Feb 13th, 2019
Re: Core recompile after board option change
Reply #1 - Apr 28th, 2023 at 2:12pm
Print Post  
Thanks for the report, can you enable all options shown at the top of the page and send us the build output for both scenarios?
  
Back to top
IP Logged
 
herman
Junior Member
**
Offline


Posts: 47
Joined: Jan 11th, 2017
Re: Core recompile after board option change
Reply #2 - Apr 29th, 2023 at 10:52am
Print Post  
Sure,

This is the sketch : 

Code (C++)
Select All
void setup() {
	Serial.begin(115200);

}


void loop() {

}
 



Platform : earlephilhower/arduino-pico version 3.1.1
Vmicro : 2023.424.2200

I used option 10, First set to "Pico SDK"

Build result in "InitalBuild.txt"

Set option 10 to "USBStack no USB"

Build result in AfterOptionSetting.txt"

Clean solution

Build result in AfterClean.txt
  

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Core recompile after board option change
Reply #3 - Apr 29th, 2023 at 8:23pm
Print Post  
Thanks for the clear info. We will look into it but the issue is probably related to the fact you have enabled the "build in intermediate folder" via tools>options>vmicro>compiler? 

That shows in the build output as:-
vm.runtime.build.intermediate_output_path= [Path .......]
vm.runtime.build.intermediate_output_enabled=true

The best solution is the default, which uses "shared core cache". Then each core is strictly cached on the compiler settings.

The build in intermediate and "standard build without shared core cache" should indeed dump the cache and rebuild the core in your example. We will fix that but it is much faster to use the "shared core cache". Please try it.

Thanks
« Last Edit: Apr 29th, 2023 at 8:24pm by Tim@Visual Micro »  
Back to top
IP Logged
 
herman
Junior Member
**
Offline


Posts: 47
Joined: Jan 11th, 2017
Re: Core recompile after board option change
Reply #4 - Apr 30th, 2023 at 7:52am
Print Post  
I think the core can't be cached for cores like these.

If I am working on two projects with different option settings, the cores are different.
Can have them even in use simultaneously with two visual studio instances.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Core recompile after board option change
Reply #5 - Apr 30th, 2023 at 8:00am
Print Post  
Yes that works well, the default settings cover that common scenario. The cache is designed for that and the default Visual Micro settings are optimal. 

The same board can use the same or different options in multiple projects. It is not something that users would normally need to consider. 

Arduino always works in both the Arduino IDE and Visual Micro allow the same or different pojects to use any combination of settings. The Arduino IDE will rebuild the core more often, it only uses a single core cache per IDE instance. The default for Visual Micro is to use a different core cache for each set of settings. 

Bear in mind that the build of the core is entirely unrelated to project and library code. It is always seperate. Therefore the same core with the same build settings can cleanly be shared between different projects when/if required.

Make sure that you have not switched off "vMicro>Compiler>Shared Cache For Cores". This will give the best experience and is the default setting. It will avoid rebuilding the core when build options are changed to a previously used set.
« Last Edit: May 1st, 2023 at 6:27pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint