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) How to clean a build (Read 2449 times)
Taurus Bass Pedals
Junior Member
**
Offline


Posts: 13
Joined: Jun 11th, 2021
How to clean a build
Jun 11th, 2021 at 5:04pm
Print Post  
Hi, I don't see any way to do a Clean in the extension.  I see icons for Build and Build&Upload, and menu items for the same.  No way to Clean that I can see.  I've attached a screenshot. Thanks
  

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to clean a build
Reply #1 - Jun 11th, 2021 at 5:16pm
Print Post  
The vMicro menu offers simple set of commands for people used to the Arduino IDE. All of the standard VS build and clean menus, commands also work. Please click the "Build" menu and clean the solution or an idividual project. + The "Debug>Start" commands upload.

nb: Shares cores are enabled by default. Build> "Clean Solution" cleans the core, "Clean Project" does not.
« Last Edit: Jun 11th, 2021 at 5:17pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Taurus Bass Pedals
Junior Member
**
Offline


Posts: 13
Joined: Jun 11th, 2021
Re: How to clean a build
Reply #2 - Jun 11th, 2021 at 5:39pm
Print Post  
Thanks Tim, but that didn't work for me.  I opened a Command Window, cleaned the debug folder manually, did a folder dir, built for Debug in VS, did another folder dir, cleaned the project in VS, did another folder dir, cleaned the solution in VS, did another folder dir.  Neither clean had any effect, although they both reported success in the output window:
Build Clean Complete
The shared cache for platform cores has been cleared.
  tip: Clean a project instead of a solution to preserve the shared cache.
Solution Clean Complete

Here's my command window:
E:\_Repos\_Code\Examples\ArduinoIDE\WiFiScan>REM FIRST I DELETED ALL THE CONTENTS OF THE DEBUG FOLDER

E:\_Repos\_Code\Examples\ArduinoIDE\WiFiScan>dir /o/s Debug
Volume in drive E is Windows
Volume Serial Number is 066A-8479

Directory of E:\_Repos\_Code\Examples\ArduinoIDE\WiFiScan\Debug

06/11/2021  01:24 PM    <DIR>          .
06/11/2021  01:24 PM    <DIR>          ..
               0 File(s)              0 bytes

     Total Files Listed:
               0 File(s)              0 bytes
               2 Dir(s)  811,959,111,680 bytes free

E:\_Repos\_Code\Examples\ArduinoIDE\WiFiScan>REM THEN I DID A DEBUG BUILD IN VS 2019

E:\_Repos\_Code\Examples\ArduinoIDE\WiFiScan>dir /o/s Debug
Volume in drive E is Windows
Volume Serial Number is 066A-8479

Directory of E:\_Repos\_Code\Examples\ArduinoIDE\WiFiScan\Debug

06/11/2021  01:27 PM    <DIR>          .
06/11/2021  01:27 PM    <DIR>          ..
06/11/2021  01:27 PM    <DIR>          VM_DBG
06/11/2021  01:27 PM    <DIR>          WiFi
06/11/2021  01:27 PM            57,353 board.buildinfo
06/11/2021  01:27 PM           703,600 WiFiScan.bin
06/11/2021  01:26 PM            22,058 WiFiScan.cpp.d
06/11/2021  01:26 PM           884,756 WiFiScan.cpp.o
06/11/2021  01:27 PM        10,639,288 WiFiScan.elf
06/11/2021  01:27 PM           703,600 WiFiScan.ino.bin
06/11/2021  01:27 PM        10,639,288 WiFiScan.ino.elf
06/11/2021  01:27 PM             3,072 WiFiScan.ino.partitions.bin
06/11/2021  01:27 PM             3,072 WiFiScan.partitions.bin
               9 File(s)     23,656,087 bytes

Directory of E:\_Repos\_Code\Examples\ArduinoIDE\WiFiScan\Debug\VM_DBG

06/11/2021  01:27 PM    <DIR>          .
06/11/2021  01:27 PM    <DIR>          ..
06/11/2021  01:26 PM            15,542 VM_DBG.cpp.d
06/11/2021  01:26 PM           816,376 VM_DBG.cpp.o
06/11/2021  01:26 PM               271 VM_mem_check_sam.cpp.d
06/11/2021  01:26 PM            14,900 VM_mem_check_sam.cpp.o
               4 File(s)        847,089 bytes

Directory of E:\_Repos\_Code\Examples\ArduinoIDE\WiFiScan\Debug\WiFi

06/11/2021  01:27 PM    <DIR>          .
06/11/2021  01:27 PM    <DIR>          ..
06/11/2021  01:26 PM            23,338 ETH.cpp.d
06/11/2021  01:26 PM           922,696 ETH.cpp.o
06/11/2021  01:26 PM            22,893 WiFi.cpp.d
06/11/2021  01:26 PM           915,704 WiFi.cpp.o
06/11/2021  01:26 PM            23,031 WiFiAP.cpp.d
06/11/2021  01:26 PM           939,032 WiFiAP.cpp.o
06/11/2021  01:26 PM            22,293 WiFiClient.cpp.d
06/11/2021  01:26 PM         1,088,380 WiFiClient.cpp.o
06/11/2021  01:26 PM            23,353 WiFiGeneric.cpp.d
06/11/2021  01:26 PM         1,179,728 WiFiGeneric.cpp.o
06/11/2021  01:26 PM            22,616 WiFiMulti.cpp.d
06/11/2021  01:26 PM         1,020,408 WiFiMulti.cpp.o
06/11/2021  01:26 PM            23,117 WiFiScan.cpp.d
06/11/2021  01:26 PM           926,248 WiFiScan.cpp.o
06/11/2021  01:26 PM            19,247 WiFiServer.cpp.d
06/11/2021  01:26 PM           861,500 WiFiServer.cpp.o
06/11/2021  01:26 PM            23,349 WiFiSTA.cpp.d
06/11/2021  01:26 PM           970,316 WiFiSTA.cpp.o
06/11/2021  01:26 PM            19,122 WiFiUdp.cpp.d
06/11/2021  01:26 PM           894,260 WiFiUdp.cpp.o
              20 File(s)      9,940,631 bytes

     Total Files Listed:
              33 File(s)     34,443,807 bytes
               8 Dir(s)  811,924,586,496 bytes free

E:\_Repos\_Code\Examples\ArduinoIDE\WiFiScan>REM THEN I DID Build->Clean WifiScan in VS

E:\_Repos\_Code\Examples\ArduinoIDE\WiFiScan>dir /o/s Debug
Volume in drive E is Windows
Volume Serial Number is 066A-8479

Directory of E:\_Repos\_Code\Examples\ArduinoIDE\WiFiScan\Debug

06/11/2021  01:27 PM    <DIR>          .
06/11/2021  01:27 PM    <DIR>          ..
06/11/2021  01:27 PM    <DIR>          VM_DBG
06/11/2021  01:27 PM    <DIR>          WiFi
06/11/2021  01:27 PM            57,353 board.buildinfo
06/11/2021  01:27 PM           703,600 WiFiScan.bin
06/11/2021  01:26 PM            22,058 WiFiScan.cpp.d
06/11/2021  01:26 PM           884,756 WiFiScan.cpp.o
06/11/2021  01:27 PM        10,639,288 WiFiScan.elf
06/11/2021  01:27 PM           703,600 WiFiScan.ino.bin
06/11/2021  01:27 PM        10,639,288 WiFiScan.ino.elf
06/11/2021  01:27 PM             3,072 WiFiScan.ino.partitions.bin
06/11/2021  01:27 PM             3,072 WiFiScan.partitions.bin
               9 File(s)     23,656,087 bytes

Directory of E:\_Repos\_Code\Examples\ArduinoIDE\WiFiScan\Debug\VM_DBG

06/11/2021  01:27 PM    <DIR>          .
06/11/2021  01:27 PM    <DIR>          ..
06/11/2021  01:26 PM            15,542 VM_DBG.cpp.d
06/11/2021  01:26 PM           816,376 VM_DBG.cpp.o
06/11/2021  01:26 PM               271 VM_mem_check_sam.cpp.d
06/11/2021  01:26 PM            14,900 VM_mem_check_sam.cpp.o
               4 File(s)        847,089 bytes

Directory of E:\_Repos\_Code\Examples\ArduinoIDE\WiFiScan\Debug\WiFi

06/11/2021  01:27 PM    <DIR>          .
06/11/2021  01:27 PM    <DIR>          ..
06/11/2021  01:26 PM            23,338 ETH.cpp.d
06/11/2021  01:26 PM           922,696 ETH.cpp.o
06/11/2021  01:26 PM            22,893 WiFi.cpp.d
06/11/2021  01:26 PM           915,704 WiFi.cpp.o
06/11/2021  01:26 PM            23,031 WiFiAP.cpp.d
06/11/2021  01:26 PM           939,032 WiFiAP.cpp.o
06/11/2021  01:26 PM            22,293 WiFiClient.cpp.d
06/11/2021  01:26 PM         1,088,380 WiFiClient.cpp.o
06/11/2021  01:26 PM            23,353 WiFiGeneric.cpp.d
06/11/2021  01:26 PM         1,179,728 WiFiGeneric.cpp.o
06/11/2021  01:26 PM            22,616 WiFiMulti.cpp.d
06/11/2021  01:26 PM         1,020,408 WiFiMulti.cpp.o
06/11/2021  01:26 PM            23,117 WiFiScan.cpp.d
06/11/2021  01:26 PM           926,248 WiFiScan.cpp.o
06/11/2021  01:26 PM            19,247 WiFiServer.cpp.d
06/11/2021  01:26 PM           861,500 WiFiServer.cpp.o
06/11/2021  01:26 PM            23,349 WiFiSTA.cpp.d
06/11/2021  01:26 PM           970,316 WiFiSTA.cpp.o
06/11/2021  01:26 PM            19,122 WiFiUdp.cpp.d
06/11/2021  01:26 PM           894,260 WiFiUdp.cpp.o
              20 File(s)      9,940,631 bytes

     Total Files Listed:
              33 File(s)     34,443,807 bytes
               8 Dir(s)  811,924,586,496 bytes free

E:\_Repos\_Code\Examples\ArduinoIDE\WiFiScan>REM THEN I DID Build->Clean Solution in VS

E:\_Repos\_Code\Examples\ArduinoIDE\WiFiScan>dir /o/s Debug
Volume in drive E is Windows
Volume Serial Number is 066A-8479

Directory of E:\_Repos\_Code\Examples\ArduinoIDE\WiFiScan\Debug

06/11/2021  01:27 PM    <DIR>          .
06/11/2021  01:27 PM    <DIR>          ..
06/11/2021  01:27 PM    <DIR>          VM_DBG
06/11/2021  01:27 PM    <DIR>          WiFi
06/11/2021  01:27 PM            57,353 board.buildinfo
06/11/2021  01:27 PM           703,600 WiFiScan.bin
06/11/2021  01:26 PM            22,058 WiFiScan.cpp.d
06/11/2021  01:26 PM           884,756 WiFiScan.cpp.o
06/11/2021  01:27 PM        10,639,288 WiFiScan.elf
06/11/2021  01:27 PM           703,600 WiFiScan.ino.bin
06/11/2021  01:27 PM        10,639,288 WiFiScan.ino.elf
06/11/2021  01:27 PM             3,072 WiFiScan.ino.partitions.bin
06/11/2021  01:27 PM             3,072 WiFiScan.partitions.bin
               9 File(s)     23,656,087 bytes

Directory of E:\_Repos\_Code\Examples\ArduinoIDE\WiFiScan\Debug\VM_DBG

06/11/2021  01:27 PM    <DIR>          .
06/11/2021  01:27 PM    <DIR>          ..
06/11/2021  01:26 PM            15,542 VM_DBG.cpp.d
06/11/2021  01:26 PM           816,376 VM_DBG.cpp.o
06/11/2021  01:26 PM               271 VM_mem_check_sam.cpp.d
06/11/2021  01:26 PM            14,900 VM_mem_check_sam.cpp.o
               4 File(s)        847,089 bytes

Directory of E:\_Repos\_Code\Examples\ArduinoIDE\WiFiScan\Debug\WiFi

06/11/2021  01:27 PM    <DIR>          .
06/11/2021  01:27 PM    <DIR>          ..
06/11/2021  01:26 PM            23,338 ETH.cpp.d
06/11/2021  01:26 PM           922,696 ETH.cpp.o
06/11/2021  01:26 PM            22,893 WiFi.cpp.d
06/11/2021  01:26 PM           915,704 WiFi.cpp.o
06/11/2021  01:26 PM            23,031 WiFiAP.cpp.d
06/11/2021  01:26 PM           939,032 WiFiAP.cpp.o
06/11/2021  01:26 PM            22,293 WiFiClient.cpp.d
06/11/2021  01:26 PM         1,088,380 WiFiClient.cpp.o
06/11/2021  01:26 PM            23,353 WiFiGeneric.cpp.d
06/11/2021  01:26 PM         1,179,728 WiFiGeneric.cpp.o
06/11/2021  01:26 PM            22,616 WiFiMulti.cpp.d
06/11/2021  01:26 PM         1,020,408 WiFiMulti.cpp.o
06/11/2021  01:26 PM            23,117 WiFiScan.cpp.d
06/11/2021  01:26 PM           926,248 WiFiScan.cpp.o
06/11/2021  01:26 PM            19,247 WiFiServer.cpp.d
06/11/2021  01:26 PM           861,500 WiFiServer.cpp.o
06/11/2021  01:26 PM            23,349 WiFiSTA.cpp.d
06/11/2021  01:26 PM           970,316 WiFiSTA.cpp.o
06/11/2021  01:26 PM            19,122 WiFiUdp.cpp.d
06/11/2021  01:26 PM           894,260 WiFiUdp.cpp.o
              20 File(s)      9,940,631 bytes

     Total Files Listed:
              33 File(s)     34,443,807 bytes
               8 Dir(s)  811,924,586,496 bytes free

E:\_Repos\_Code\Examples\ArduinoIDE\WiFiScan>
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to clean a build
Reply #3 - Jun 11th, 2021 at 5:47pm
Print Post  
I see thanks. Those are not the build folders they are the intermediate folder(s) where the results of the last build are copied too. 

If you switch on the verbose build you will see where the build folder is located, the clean clears that and also shared core if cleaning the solution.

If you want to open examples I suggest using the Visual Micro Platform Explorer that has an "Open Copy" function. Then the original example is undisturbed.

The vMicro>Compiler menu has an option that enables/disables copy of output to the intermediate folder. TheĀ  Intermediate folder location can be specified in the project Property Pages.
« Last Edit: Jun 11th, 2021 at 5:52pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Taurus Bass Pedals
Junior Member
**
Offline


Posts: 13
Joined: Jun 11th, 2021
Re: How to clean a build
Reply #4 - Jun 11th, 2021 at 6:38pm
Print Post  
I turned on verbose build (Tools->Options->Projects and Solutions->Build and Run->MSBuild project build output verbosity: Diagnostic), manually cleaned, and see this now in the Output window (the dropdown is set to Show output from Micro Build) when I rebuild:

Compiling debug version of 'WiFiScan' for 'ESP32 Dev Module'
C:\Program Files (x86)\Arduino\java\bin>if exist "E:\_Repos\_Code\Examples\ArduinoIDE\WiFiScan\partitions.csv" copy /y "E:\_Repos\_Code\Examples\ArduinoIDE\WiFiScan\partitions.csv" s.csv" 
C:\Program Files (x86)\Arduino\java\bin>if not exist s.csv" copy s\partitions\default.csv" s.csv" 
esptool.py v3.0-dev
Program size: 703,482 bytes (used 54% of a 1,310,720 byte maximum) (29.99 secs)
Minimum Memory Usage: 38316 bytes (12% of a 327680 byte maximum)
 
Nothing about where the build files are going.

I also check my project Properties->General Properties:
Output Directory: $(SolutionDir)$(Configuration)\
Intermediate Directory: $(Configuration)\

Since my solution (WifiScan.sln) and project files (WifiScan.vcxproj) are in the same folder, both intermediate and output files should end up under the same Debug folder, unless I'm mistaken about something.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to clean a build
Reply #5 - Jun 11th, 2021 at 6:45pm
Print Post  
The option to switch on verbose is shown in the yellow box near the top of this page. It is via the vMicro menu. We don't use MSBuild and the only Property Page option we make use of is the Intermediate Folder.

The output shows this as the build folder

Code
Select All
C:\Users\jmpor\AppData\Local\Temp\VMBuilds\WiFiScan\esp32_esp32\Debug 




The build happens in a temp folder similar to the arduino ide. The intermediate folder is for your reference only and is unused by Visual Micro. Many users requested it be used so we implemented it as an optional setting mentioned previously.
« Last Edit: Jun 11th, 2021 at 6:47pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Taurus Bass Pedals
Junior Member
**
Offline


Posts: 13
Joined: Jun 11th, 2021
Re: How to clean a build
Reply #6 - Jun 11th, 2021 at 7:21pm
Print Post  
Thanks, that showed me where to look, and the clean does in fact work.  Still learning my way around the extension...
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to clean a build
Reply #7 - Jun 12th, 2021 at 12:36pm
Print Post  
Great, I hope you enjoy using it.
  
Back to top
WWW  
IP Logged
 
Taurus Bass Pedals
Junior Member
**
Offline


Posts: 13
Joined: Jun 11th, 2021
Re: How to clean a build
Reply #8 - Jun 14th, 2021 at 2:39pm
Print Post  
Thanks, I'm looking forward to learning how to use it.

I was thinking about the "clean" think a little more.  I understand that it works as designed.  But I still find it a little confusing that the build files get copied from their true build folder to the usual VS build folder when building, yet they don't get removed from the usual VS build folder when cleaning.  Maybe something to consider for a future release of the extension...

Thanks again for the help.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to clean a build
Reply #9 - Jun 14th, 2021 at 3:10pm
Print Post  
The best solution might be to switch off the Intermediate folder usage. It sounds like you are trying to use the Clean to tidy up the folder structure than its usual usage of ensuring a clean build. That makes sense but is slightly outside of the original design of "Clean".

We will give some thought to clean of intermediate (or project folder cleanup). It might be that we simply clean the intermediate that relates to the currently selected configuration such as Debug or Release. A complexity is that users can create their own "Configurations". It can be difficult to establish which has been used and which is also used by users for custom actions. For example, the intermediate is unrelated to the actual Arduino build process, some people use it to send the results to a linux or remote mcu. In that case they might have added their own routines (bat;exe,py) to the folder. We would have to delete individual files extensions instead of the deleting the entire folder, in that case we would need a new config property to allow the list of file extensions that are deleted to be overriden by users (just in case).

It's a good post thanks
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to clean a build
Reply #10 - Jun 15th, 2021 at 3:41pm
Print Post  
Having another think about this. Ideally the solution should be in a parent folder. It makes source control easier but also means the intermediate can more easily be located outside of the project folder. 

That would keep the clutter away from the actual project code but when opening examples from the original locations it won't help. 
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint