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) Allow project files to be organized in sub folders. (Read 10711 times)
Marc Jacobi
Junior Member
**
Offline


Posts: 28
Location: Netherlands
Joined: Feb 28th, 2012
Allow project files to be organized in sub folders.
Mar 3rd, 2012 at 3:44pm
Print Post  
At the moment, when I create a folder the Arduino menu options for the Add context menu are not available.

It would really help my large project if I could make use of sub folders to organize things.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Allow project files to be organized in sub folders.
Reply #1 - Mar 3rd, 2012 at 5:55pm
Print Post  
info please

what if you drag/move existing files into the sub folders. 

does it still compile? does the arduino ide still compile the sketch?
  
Back to top
WWW  
IP Logged
 
sixeyes2
Junior Member
**
Offline


Posts: 93
Location: Guildford, United Kingdom
Joined: Dec 19th, 2011
Re: Allow project files to be organized in sub folders.
Reply #2 - Mar 4th, 2012 at 7:39am
Print Post  
I was just about to post this enhancement request!

Some of my Arduino Mega projects are starting to contain a large number of files, lots of classes (all quite small).

I decided to place a group of files in a sub folder ("Routes") directly below the .ino file.

I created a new filter called "Routes" in the solution explorer and added all the files in the "Routes" sub folder to this filter using the context menu.

However when I try to compile, these files are not included in the build.

I then removed theses files and the filter, moved the files to the the .ino folder and added them into the solution and they were included in the build.

Iain
  
Back to top
 
IP Logged
 
Marc Jacobi
Junior Member
**
Offline


Posts: 28
Location: Netherlands
Joined: Feb 28th, 2012
Re: Allow project files to be organized in sub folders.
Reply #3 - Mar 4th, 2012 at 7:42pm
Print Post  
  • I created a new sub-folder in the project folder (that contains the project file).
  • I dragged a header file into the sub-folder of code that was previously compiling.
  • Build fails.
  • Changed the include to "SubFolder/FileName.h" -> build fails also tried backslash -> build fails.
  • Added the sub-folder to the project properties 'Include Directories' list -. build fails. (I would have expected that this would work!).


That was all I could think off at the time.
  
Back to top
 
IP Logged
 
Marius
Developer
****
Offline


Posts: 204
Location: Centurion RSA
Joined: Sep 7th, 2011
Re: Allow project files to be organized in sub folders.
Reply #4 - Apr 13th, 2012 at 5:56am
Print Post  
sixeyes2 wrote on Mar 4th, 2012 at 7:39am:

I then removed theses files and the filter, moved the files to the the .ino folder and added them into the solution and they were included in the build.

Iain


Iain,
Do I understand correctly, the sub directory did not work then? Huh

Marius
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Allow project files to be organized in sub folders.
Reply #5 - Apr 13th, 2012 at 7:52am
Print Post  
no it would break the arduino compile so wasn't supported but there is a new version due shortly that supports it Smiley
  
Back to top
WWW  
IP Logged
 
sixeyes2
Junior Member
**
Offline


Posts: 93
Location: Guildford, United Kingdom
Joined: Dec 19th, 2011
Re: Allow project files to be organized in sub folders.
Reply #6 - Apr 19th, 2012 at 4:30am
Print Post  
Marius wrote on Apr 13th, 2012 at 5:56am:
sixeyes2 wrote on Mar 4th, 2012 at 7:39am:

I then removed theses files and the filter, moved the files to the the .ino folder and added them into the solution and they were included in the build.

Iain


Iain,
Do I understand correctly, the sub directory did not work then? Huh

Marius

Well it didn't work as I had hoped. Basically files in sub folders are ignored by the build process. But their existence doesn't break the build so it's nearly there.

Iain
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Allow project files to be organized in sub folders.
Reply #7 - Apr 19th, 2012 at 6:43am
Print Post  
i think it will work ok in the next version, i made some changes.

the build clean is also done, thanks for testing
  
Back to top
WWW  
IP Logged
 
Marc Jacobi
Junior Member
**
Offline


Posts: 28
Location: Netherlands
Joined: Feb 28th, 2012
Re: Allow project files to be organized in sub folders.
Reply #8 - May 16th, 2012 at 8:25am
Print Post  
I also encountered the following issue:

I have a sub folder in my project containing some library/reusable files. I put them in a sub folder because I do not want to mix them with my project files.

I include the headers files from mu sub folder like #include "myLib\HeaderFile.h"

I get compile errors that the lib header files could not be found - and indeed when I look in the build cache location my sub folder was not copied there.

I tried adding a path to my sub-folder to the project Include folder setting, but it seems that these paths get regenerated with each build, removing my custom path.  Angry

To my mind this is a scenario that is very common and should work out of the box.

I am becoming very frustrated with Visual Micro because it hinders me in organizing my code the way I want to.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Allow project files to be organized in sub folders.
Reply #9 - May 16th, 2012 at 12:49pm
Print Post  
Yes I too would like the sub folders to be copied to the temp for compilation. 

Visual Micro is supposed to be Arduino compatible which is why it currently works as it does however I agree that it's time to optionlly ditch some Arduino compatibility for advanced users.

If you add this as a request to the codeplex issues list I will ensure it is in the next release due shortly

Thanks
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint