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) Deep Search bug ? (Read 12337 times)
testato
Junior Member
**
Offline


Posts: 48
Joined: Feb 11th, 2014
Deep Search bug ?
May 23rd, 2017 at 3:51pm
Print Post  
the simple project that I attached do not compile on AtmelStudio7
On Arduino 1.8.2 it work.

« Last Edit: May 23rd, 2017 at 3:52pm by testato »  

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: Deep Search bug ?
Reply #1 - May 23rd, 2017 at 6:20pm
Print Post  
You need to provide verbose output with "show build properties" with all reports so we can see what you have installed in board manager, which board you are using, which libraries you have installed and from which location.

Without this information I can never help.

You should also provide the atmel cpproj (project) that you are using in your project. Otherwise I can check that you have included your source code in your project correctly.

You should also only use sub folder "src" or sub folders below that. Arduino does not support other sub folders although the odd header might work it's not right to do that.

Thanks

« Last Edit: May 23rd, 2017 at 6:23pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
testato
Junior Member
**
Offline


Posts: 48
Joined: Feb 11th, 2014
Re: Deep Search bug ?
Reply #2 - Jun 3rd, 2017 at 2:26pm
Print Post  
I attached a .zip, it is a very simple examples, no library, no code.
All that you need is inside the .zip

It use a subfolder named "SomeDir", that on Arduino work regularly. But I tried also whit the special "src" folder with the same negative result.

I using last arduino and last visualmicro on last atmelstudio7

I'm sure that my attached .zip do not work on your PC also
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Deep Search bug ?
Reply #3 - Jun 3rd, 2017 at 2:32pm
Print Post  
Thanks,

Please switch on vmicro>compiler>verbose and then click build. Post or email the output.

Then we can easily see the paths that are being passed to the compiler and also where and what error has been shown.

Thanks



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


Posts: 48
Joined: Feb 11th, 2014
Re: Deep Search bug ?
Reply #4 - Jun 3rd, 2017 at 2:37pm
Print Post  
Code
Select All
Compiling 'pippo' for 'Arduino Fio'
Build Folder: file:///C:/Users/win10/AppData/Local/Temp/VMBuilds/pippo/fio/Debug
Summary: Header=1 Prototypes=3 Imports=0
Additional Defines:
Architecture Tools: /avr/bin/
Api: 1705.7
Sketch Book: file:///D:/DATI/PERSONALE/Varie/Elettronica/ARDUINO/SKETCH
Sketch Include Paths
Core Include Paths
Include Path no/avr/cores/arduino
Include Path no/avr/variants/eightanaloginputs
Searching for libraries ...
n\avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=8000000L -DARDUINO=10802 -DARDUINO_AVR_FIO -DARDUINO_ARCH_AVR r\cores\arduino" r\variants\eightanaloginputs" "C:\Users\win10\AppData\Local\Temp\VMBuilds\pippo\fio\Debug\pippo.cpp" -o "nul"
n\avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=8000000L -DARDUINO=10802 -DARDUINO_AVR_FIO -DARDUINO_ARCH_AVR r\cores\arduino" r\variants\eightanaloginputs" "C:\Users\win10\AppData\Local\Temp\VMBuilds\pippo\fio\Debug\pippo.cpp" -o "nul"

pippo.ino: 2:55: fatal error: SomeDir\test.h: No such file or directory
   #include "SomeDir\test.h" // This is the ISSUE request
   compilation terminated



	An error was encountered during the 'Deep Search' library discovery process.
Build failed for project 'pippo' 

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Deep Search bug ?
Reply #5 - Jun 3rd, 2017 at 2:40pm
Print Post  
Thanks

Is the header actually included in the project?

Please ensure the button above the solution explorer called "Show all files" is not selected and then tell me if the header can be seen in the solution tree ?

If the header does not appear then switch back to "show all files", right click and "Include in Project"
« Last Edit: Jun 3rd, 2017 at 2:40pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
testato
Junior Member
**
Offline


Posts: 48
Joined: Feb 11th, 2014
Re: Deep Search bug ?
Reply #6 - Jun 3rd, 2017 at 2:47pm
Print Post  
No, the SameDir folder is not included in the rpoject, the Show all files is not active, so i do not view the SomeDir folder.

I activated the Show all files, and manually included the SomeDir folder, and now it work.

But it is not a standard behaviour right ?
Because the target of VisualMicro is that a .ino working on ArduinoIDE will work also on VisualMIcro without modification, if I remember.

and also the special "src" folder do not work without modification
  
Back to top
 
IP Logged
 
testato
Junior Member
**
Offline


Posts: 48
Joined: Feb 11th, 2014
Re: Deep Search bug ?
Reply #7 - Jun 3rd, 2017 at 2:55pm
Print Post  
i made another test, i opened a project that contain simply a tab (so there is two .ino in the project folder), and the second .ino it is not visible in the solution Explorer and also it is not working.

are you made this kind of test for the last version ?
seems that visualmicro work on AtmelStudio only for a single .ino project

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Deep Search bug ?
Reply #8 - Jun 3rd, 2017 at 2:55pm
Print Post  
Hi

Actually it's a bit more complicated than that. Here is some information

1) I will extend Visual Micro so that the project folder is added as a -I compiler include. This must be a recent addition for the Arduino IDE which never used to allow this. Visual Micro used to allow it but users complained it made Visual Micro different to the Arduino IDE for something that is not easy for users to clearly see. Uggh Smiley This would allow the header files to be discovered without needing to have them included in the project.

2) The Arduino IDE does not really support code in folders other than the project folder and the \src folder + \src sub folders. You need to understand this important fact otherwise you might try to add .cpp and .c files to other folders such as SomeDir. The Arduino IDE will not compile that code! It will only compile the code in the folders I have mentioned.

3) Visual Micro allows you to put code in any folder. This is how normal IDE's work and is more powerful and flexible but it always involves "Including" the code into the project. Otherwise it would mean looking at the project folder, which might contain other "test folders", but attempting to compile everything it finds. That is not how any IDE works.

So point 1) is the confusion that I can solve however you should also know that Atmel Studio and Visual Studio usually expect the files to be included in the project, then it can better determine intellisense.

I hope this is all clear now, ask if anything is still unclear.
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Deep Search bug ?
Reply #9 - Jun 3rd, 2017 at 2:59pm
Print Post  
Quote:
second .ino it is not visible in the solution Explorer and also it is not working.


Have you right click included the .ino in the project. If atmel studio does not show the .ino file it means you have not included it in the project.

There is a visual micro "tools>option" for arduino compatibility in this area, the option governs if files are compiled automatically or not. However I think you should focus on understanding how atmel studio expects to work because it's better to see all your code correctly in the solution explorer.

When add new .ino files what do you click?
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Deep Search bug ?
Reply #10 - Jun 3rd, 2017 at 3:05pm
Print Post  
One other bit of info. I just looked at the "compatibility setting" and it seems to be ignored. It defaults to ON meaning all .ino files should be compiled even if not properly included in the project.

I will look at this for the next release but in the meantime you can hold the CTRL + Click any files you want to "Include" then right click and "Include" them easily
  
Back to top
WWW  
IP Logged
 
testato
Junior Member
**
Offline


Posts: 48
Joined: Feb 11th, 2014
Re: Deep Search bug ?
Reply #11 - Jun 3rd, 2017 at 3:08pm
Print Post  
On point 2) I do not agree.
Arduino IDE from many times, at least one year, probably two years, accept that you can use .h and .cpp under all kind of sobdirectory that you prefer.
If you try my examples .zip attached, you will find that Arduino compile it regularly.
It was one of mine request to the team, we can found the github Issue request.

So the special folder "src" is a deprecated folder, present only for retrocompatobility, but it is not necessary on ArduinoIDE.

For the Autoincluding of this kind of folder I understand your vision, but I think that the "standard" arduino target are important target foru you, so VisualMicro, imho, must follow the ArduinoIDE behaviour. If ArduinoTeam decided to Autoinclude all subfolder in the Arduino shetch folder, also VisualMicro must du this without think about other "standard ide filosophy"

my 2cent  Smiley

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Deep Search bug ?
Reply #12 - Jun 3rd, 2017 at 3:11pm
Print Post  
I didn't know that thanks. I will allow deep search to find everything then Smiley

Actually I have been thinking of adding an option where we can use the Arduino builder instead of visual micro for the compile. The builder is quite mature now and will make life easier Smiley It won't change what happens when editing code, just when building.
  
Back to top
WWW  
IP Logged
 
testato
Junior Member
**
Offline


Posts: 48
Joined: Feb 11th, 2014
Re: Deep Search bug ?
Reply #13 - Jun 3rd, 2017 at 3:14pm
Print Post  
this will be an important step, the power of ArduinoIDE is do not create building problem, so leave arduino builder work, and you can instead use you time for the other most importat thinks that VisualMicro can do
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Deep Search bug ?
Reply #14 - Jun 3rd, 2017 at 3:15pm
Print Post  
Yes very true, thanks very much for your patience.

but it means no serial debug
« Last Edit: Jun 3rd, 2017 at 3:16pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Deep Search bug ?
Reply #15 - Jun 3rd, 2017 at 5:12pm
Print Post  
This makes me laugh. The opposite problem Smiley

http://www.visualmicro.com/forums/YaBB.pl?num=1496509620

Just goes to show, you can't please all of the people all of the time   Smiley Smiley

Actually it means the Visual Studio version of Visual Micro is working how you want it to work for .ino and .cpp in the project folder.
« Last Edit: Jun 3rd, 2017 at 5:17pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
testato
Junior Member
**
Offline


Posts: 48
Joined: Feb 11th, 2014
Re: Deep Search bug ?
Reply #16 - Jun 4th, 2017 at 8:06am
Print Post  
yeha, i readed it  Grin

this means that VisualMicro for atmelstudio work differently from VisualMIcro for VisualSTudio.
This must be investigated.

But pay attention, i think that there is a misunderstanding.
Arduino do not automatically include a Folder inside it's Sketch folder, but only permit to include it.
Please use my .zip for test, the #define that i included must be present in the .ino. If i remove the #define the code inside SomeDir must not be included.

So:
1) the correct way imho is do all that ArduinoIDE do (on AtmelSTudio and VisualSTudio visualmicro version)
2) the .ino created by multiple tab creation, must be automatically included (for now visualmicro have problem on this on AtmelSTudio)
3) a folder, named src or any other name that you want, can be manually included, example 
#include "SomeDir\test.h"
This means that if I use this include the deep search on this include must work, so without manually add this folder on atmelstudio explorer i can compile.
4) on ArduinoIDE never a Folder inside Schetch folder is automatically included and compiled without manually # define it, so if this is the case for VisualMicro it is not correct, none for ArduinoIDE, none for standard IDE philosophy. So probably this is another bug to investigate.
« Last Edit: Jun 4th, 2017 at 8:14am by testato »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Deep Search bug ?
Reply #17 - Jun 4th, 2017 at 11:06am
Print Post  
I try to do as little as possible in atmel studio it is a dog when it comes to auto adding files.

1)

Anyone who uses normal IDE will complain that the compiler is not using the files they have included in the project/solution explorer. I tried this before and get a lot of complaints.

I think it makes sense for users to included the files in the way that the IDE has been designed and has been documented. However it can be an option to work a different way but not the default.

2)

.ino and sources in the main arduino folder are automatically added in Visual Studio when a project is opened but in atmel studio it can crash easily so I don't bother

3)

When using advanced features of VS such as shared projects it makes sense to understand that files must be included in a project.

4)

There is a new option in Visual Studio 2017 which allows for a "folder only" project, without project/solution. I might expand that option for Visual Micro where it would work the same as the arduino ide. There will be no confusion for users because they do not have a project and solution explorer.

5)

Adding debug breakpoints requires files to be included in a project. The debug/paid users are what is important to me. I have given free for 9 years and seen very few user blogs so free users are no longer of concern to me.

6)

Microsoft have mad a plugin for Visual Studio code which works exactly how you want it to work. Just does what the Arduino Ide does. Vscode is a cut down version of Visual Studio but it is fast and light and highly recommend.


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