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 Build folders and other options (Read 2460 times)
herman
Junior Member
**
Offline


Posts: 47
Joined: Jan 11th, 2017
Build folders and other options
Feb 27th, 2022 at 12:27pm
Print Post  
Hi,
Have a license now and busy to have vmicro confiured to my liking.

The questions for now.

1/ Build folders.
By default vmicro uses [temp]\VMBCore and [temp]\VMBuils. (correct ?)
I'd like to have them both in the project directory structure (no files in a temp directory)
Have set the "Build in Project intermediate" option to true;

This puts the "project files" into the [project]\[release|debug] directory as expected.
But still creates a directory [temp]\projectname with several directories. 
See the screen snippet for the structure after the project "BuildDir" has been built for both Debug and Release
A "Clean project" removes [temp]\projectname\[release|debug] but leaves the [project]\[release|debug] directory in place.

For the core, it does create a [project]\[release|debug]\core directory
But still builds in the [temp]\VMBCore 
A "Clean project" does not remove the previous core build.

What settings should I use ?

2/ Include library.h in project.ino when adding library.
I have "Add lib #includes On install" = false.
But when including a library in the project, it still adds the library.h in the ino file.

After the lines are included, when re-opening the file there is an errormessage : "The line endings in the following file are not consistent" 
This is for the projectname.ino file.

Are there additional settings needed ? [edit : this is not always happening, checking further] 

3/ Duplicate boards.
I have the option "Allow duplicate Boards" set to true.
Does that give the possibility to have multiple versions of one core installed ? 
Is there any additional information on this option ? 

[edit 2]
4/ cpp only
There is a option "Project Folder -| " description : ....cpp only projects will automatically set this....

What is the way to create cpp only project ? (no projectname.ino file)

« Last Edit: Feb 28th, 2022 at 1:20pm by herman »  

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: Build folders and other options
Reply #1 - Feb 27th, 2022 at 3:41pm
Print Post  
It's not a good idea to have the full build in a temp folder below the current project folder. the intermediate gets a copy of the final output object and hex files but do not get a copy of the sources. This avoids having sources below the project that are not real project code. It's not a major issue but much cleaner, we do not support copied temp source files below a project because many users will end up in a mess.


Quote:
By default vmicro uses [temp]\VMBCore and [temp]\VMBuils. (correct ?)


The core can either be built once and shared for each project or built for each project. The default is shared because that uses a lot less disk space.

The vMicro>Compiler menu gives option to use hared core or not. If you do not use the shared core the core will be build into a sub folder of the same temp folder that the project sources are built in.

Quote:
A "Clean project" removes [temp]\projectname\[release|debug] but leaves the [project]\[release|debug] directory in place.


That is how "clean project" works, the "clean solution" removes the lot including the cached core. 

Quote:
A "Clean project" does not remove the previous core build.


Yes, that makes sense when using a shared core.

Quote:
Include library.h in project.ino when adding library.


This is how arduino is designed. Changing it would confusion for many users. We might look at a future option to give you control of this. Each library can specify which .h files are automatcially added. 

You can remove them if you don't need them in the .ino code. 

Quote:
I have "Add lib #includes On install" = false.


That relates to what happens when installing libraries via library manager, does not relate to when the are already installed and simply being used but maybe it should we will consider it thanks.

Quote:
After the lines are included, when re-opening the file there is an errormessage : "The line endings in the following file are not consistent"


We will look into this. The message simply means there is a mix of \n and \r\n line endings. You can click okay to have visual studio change them to be consistent. Line endings in windows are aways annoying. Adding a library is probably the cause, we will review our line endings.

Quote:
Duplicate boards. I have the option "Allow duplicate Boards" set to true. Does that give the possibility to have multiple versions of one core installed ?


No the duplicate boards does not do what you are suggesting. The way to achieve that is to add your own app to the applications list and have that app use it's own downloaded board manager path. You can try similar by using both the arduino 1.6-1.8 app and the (alt) version. See the IDE locations window for more information, this feature is quite new and experimental.

Quote:
cpp only


Do not use the .cpp only option unles you know the downside. It is for advanced users who really know the arduino build system. You do not have to put code in the .ino files except the setup and loop.

There is no way to create a cpp only project without you deleting .ino and renaming a cpp. This is to prevent users from thinking it is a sensible or recommended option. It is to be avoided, a few projects want to work cpp only in that case they usually also implement/override the main.cpp . If you do that you could no longer seek advice from this forum, you would be on your own in expert mode.



  
Back to top
WWW  
IP Logged
 
herman
Junior Member
**
Offline


Posts: 47
Joined: Jan 11th, 2017
Re: Build folders and other options
Reply #2 - Feb 28th, 2022 at 12:56pm
Print Post  
Build Dirs : 

This is what I see when creating project and building.

Definition : 
[temp] = c:\users\herman\appdata\temp\vmbuilds
[project] = c:\userdata\vmicro\projects
projectname = BuildDirTest.
Core = esp32 v2.0.2
Shared Cache for Core = false

Create Vmicro empty project BuildDirTest
- in [temp] a directory is created  "BuildDirTest\esp32_d32\Debug\.vm_sys" only containing arduino_version.txt
- in [project] a directory is created which contains the project structure, including the BuildDirTest.ino

First build.
- in [temp] no change
- in [project] a directory is created "Debug" which holds 
     on toplevel the BuildDirTest.ino & .cpp & the compile intermediate (.o & .d files)
     in subdir core the compile intermediates from core.
     
Second build.
- in [temp] no change
- in [project] a directory is created "Debug\Debug" which contains BuildDirTest.cpp

Third build.
- in [temp] no change
- in [project] a directory is created "Debug\Debug\Debug" which contains another BuildDirTest.cpp

Clean project.
from Micro build output. "Deleted temporary build folder 'C:\Users\Herman\AppData\Local\Temp\VMBuilds\BuildDirTest\esp32_d32\Debug'
- in [temp] the debug directory is deleted
- in [project] no change

I see three issues in this : 
- Unnecessary creation of diretory in [temp]
- Adding unnecessary additional levels of Debug in [project]
- Clean function deletes wrong directory.


CPP only : 
Understand the "non arduino compliance". Will stick to the "empty project.ino".

Remove library from project
What is the correct way to remove a library from a project ?
I add a library to a project. See it in the src\_micro-api-readonly\libraries directory.
Looks like the library.h file is only visible to .cpp files when I have a inlcude library.h in the ino file ??
But when I do that I can use it.
Then I delete the library by rightclick on it's name, Delete. It is correctly removed from the display.
But I still can include the library.h in the project.
Looking in the projects vcxproj I see the library in the AdditionalIncludeDirectories.

Code
Select All
aries\MessageTransfer\src;
 



IDE configuration.
Still struggling with correct setup, busy with that.
When trying to install STM32 MCU Boards, I get the error message "The UF2 tool is not available for windows". It displays "Downloading or unpacking 1 Package. But does not finish.
Is there a way to see what is happening ?

In every IDE the boardmanager is already loaded with the autodiscovery. Is there  way to prevent this and only see the ones added in the view ?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Build folders and other options
Reply #3 - Feb 28th, 2022 at 2:18pm
Print Post  
When you make reports please follow the guide in yellow above. This gives is clear information.

I hope you are not creating your projects in the temp build folder that visual micro creates. You must create your projects using either our or the arduino published guidelines. That will be well away from the build folders that must remain seperate.

The build folder should not be a concern to you at all. It is how the arduino build process works.

To remove libraries it is simply a matter of removing the #includes from your code.

If you have used the "vmicro>show hidden files" that will add short cuts to the project for all lib and core sources. These shortcuts do not affect the build project because they are located in the specal /src/_.... folder of the solution. They can be deleted using the visual studio menu items and commands or you can click "vMicro>Show/hide hidden files" again.

If you have used the "clone" feature or the feature to add shared library projects to your solution then you can simply remove them from the solution.

It will probably help to state what you want to achieve.

  
Back to top
WWW  
IP Logged
 
herman
Junior Member
**
Offline


Posts: 47
Joined: Jan 11th, 2017
Re: Build folders and other options
Reply #4 - Feb 28th, 2022 at 4:57pm
Print Post  
For a long time I am working with sloeber eclipse on various home projects.
That includes multiple cores (esp8266/32, stm32, attiny, avr, seeduino, rp2040) , multiple libraries.
Both on the application as on core sourcelevel.

Sloeber is not very stable at this moment so I am checking whether it is a good idea to move to vmicro.

That means that I am looking allover vmicro, to see how my habits, way of work, dev environment settings and so on can stay the same or need to be adapted when moving to vmicro.

I am trying to get structure in this search but for now I am installing, making testprograms, and learning terminology & possibilities of vmicro.

So sorry for the many questions I ask here, but expect to be on a good level of knowledge expertise quickly.

Another question. 

Rebuid core.
When one file of the core is chnaged, the whole core is being rebuild instead of a partial compile.
How/what shoud I configure that I get partial builds ?




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


Posts: 2145
Joined: Feb 13th, 2019
Re: Build folders and other options
Reply #5 - Mar 1st, 2022 at 2:28pm
Print Post  
The latest version (22.02.18-1) should resolve the inconsistent line endings when adding a library, and is available from the top of the board below:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

Currently there is not an option to partially recompile the core files when one file has changed, however we will update when this becomes available in a future version.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint