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) Frustrating Bug (Read 14440 times)
RonOhmer
Junior Member
**
Offline


Posts: 29
Joined: Feb 10th, 2015
Frustrating Bug
Feb 10th, 2015 at 4:40am
Print Post  
I really generally like the product, but I am running into a frustrating bug.

When I add an include path to my project that is required, stays.  Then I build and it disappears and my build fails.

So here is the process:
1. Right click project, hit properties
2. Goto AVR/GNU C++ Compiler/Directories
3. Add a directory.

Build. 

Poof it is gone and the build fails.

Atmel Studio 6.2, latest VM.
  
Back to top
 
IP Logged
 
RonOhmer
Junior Member
**
Offline


Posts: 29
Joined: Feb 10th, 2015
Re: Frustrating Bug
Reply #1 - Feb 10th, 2015 at 4:57am
Print Post  
Also it doesn't seem to be building dependencies before hand.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Frustrating Bug
Reply #2 - Feb 10th, 2015 at 8:12am
Print Post  
Hi Ron,

Sorry to say this is correct and it would be wrong, if arduino compatible, to support users adding their own include paths.

Right now Visual Micro performs a fully Arduino compatible compile, which uses Arduino libraries for additional sources. Use project "add/import sketch library" ro add Arduino libraries to the code. 

In this mode Visual Micro ensures that your sketch can build in both Atmel or the Arduino ide. To make libraries work and to ensure that atmel intellisense works Visual Micro has to manage the project settings. The compile uses the arduino toolchain to compile the way arduino compiles so atmel project properties would not be relevant.

Thanks

ps: we are working on a hybrid that allows you to break out of arduino into your own cpp project
pps: dependencies: when you see how arduino libraries work you will find extra benefit when you click "project>show sketch core and library files"
« Last Edit: Feb 10th, 2015 at 4:36pm by Tim@Visual Micro »  
Back to top
IP Logged
 
RonOhmer
Junior Member
**
Offline


Posts: 29
Joined: Feb 10th, 2015
Re: Frustrating Bug
Reply #3 - Feb 10th, 2015 at 5:13pm
Print Post  
Ok, this is a bit different than I am used to doing things in VS.  Do dependencies work normally in the VS2013 plugin?

I think I have a work around, I can just create a post build step in VS to copy my dependent libs over to the Arduino dir after compile (To verify syntax and whatnot).
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Frustrating Bug
Reply #4 - Feb 10th, 2015 at 5:20pm
Print Post  
Hi Ron,

You are using atmel studio and not visual studio. 

I think dependencies work okay in atmel but only after the build. the best way is to setup real Arduino format libraries and then use "project>show all core and libs" to view the source code easily within the current project.

If you want something added feel free to make a request.
« Last Edit: Feb 10th, 2015 at 5:20pm by Tim@Visual Micro »  
Back to top
IP Logged
 
RonOhmer
Junior Member
**
Offline


Posts: 29
Joined: Feb 10th, 2015
Re: Frustrating Bug
Reply #5 - Feb 10th, 2015 at 6:44pm
Print Post  
As I stated in email (Couldn't get to forums for some reason), I would be totally open to using the 2013 plugin.  I like 2013 much better than 2010, and don't esp need the Atmel extras since I am just working against Arduino.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Frustrating Bug
Reply #6 - Feb 10th, 2015 at 7:09pm
Print Post  
Hi Ron,

Thanks for the email which makes sense.

You can create libraries in sketchbook/libraries which is normally document/arduino/libraries

The library folder must have the same name as a .h file in the same folder. There are two types of arduino library format. The simplest just expects cpp and .h in the lib folder with private (to lib) extras in a sub folder called utility

Libraries are included by #include "mylib.h" but you can use the project>add/import sketch library to add the #includes automatically. You might need to select the project and click save before intellisense recognizes new #includes.

If you add new libs with the ide open then the "tools>Vsual micro?reload toolchains" menu will force the ide to re-look for lib changes if required which saves the need to re-start the ide.

Hope this helps
  
Back to top
IP Logged
 
RonOhmer
Junior Member
**
Offline


Posts: 29
Joined: Feb 10th, 2015
Re: Frustrating Bug
Reply #7 - Feb 10th, 2015 at 7:27pm
Print Post  
Wow, nothing like doing something new to feel thick.

Ok, my most current issue is this:
1. I imported my STL port to a library in the Arduino 1.5.8 IDE.  It shows in sketch/import library under the user section.
2. When I try to do the same in my project in Visual Studio 2013, the User section of import libraries is greyed out.

I have tried restarting VS, reloading tool chains and of course hitting the refresh.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Frustrating Bug
Reply #8 - Feb 10th, 2015 at 7:36pm
Print Post  
Yes well when you have good knowledge of program structure then Arduino is strange Smiley

I am a little confused by what you have said but it might just be an incorrect path ...

There are two places you can put libraries 1) ArduinoIde\Libraries and 2) SketchBookFolder\Libraries

The ones placed in the sketchbook are know as user libraries and the ones in ide are core libraries.

The sketch book folder has a default of "documents\arduino" but can be overridden in the arduino ide file>preferences.

If it is overridden then Visual Micro will detect this when it starts

You can also override the sketchbook location in the Visual Micro Ide locations dialog. On the locations dialog the property is shown as optional and can be configured for each registered ide (you probably only have one). If you have entered a path for sketch book then please clear it.

If you see a difference between library menus in Visual Micro then it is most likely that you have populated the sketchbook folder in Visual Micro.

Does this make sense? 

If not then switch on tools>options>visual micro>user interface>trace and re-start the ide. After the ide loads an output window should show some start-up trace info for visual micro. Please email it to me.

Thanks
« Last Edit: Feb 11th, 2015 at 6:26pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Frustrating Bug
Reply #9 - Feb 11th, 2015 at 11:18am
Print Post  
Hi Ron,

I have seen your email. The path you mention is not relevant. It is reported in case it exists but is optional.

You have not yet confirmed if you have an entry against the sketchbook folder in the ide location dialog?

Thanks
  
Back to top
IP Logged
 
RonOhmer
Junior Member
**
Offline


Posts: 29
Joined: Feb 10th, 2015
Re: Frustrating Bug
Reply #10 - Feb 11th, 2015 at 5:00pm
Print Post  
Yes, the sketchbook path is in my config.

I am going to try a couple of things.  I don't have the latest VS2013 patch, I am going to apply that and try reinstalling VM.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Frustrating Bug
Reply #11 - Feb 11th, 2015 at 5:03pm
Print Post  
Don't do that it not required

Please tell me what the path is
  
Back to top
IP Logged
 
RonOhmer
Junior Member
**
Offline


Posts: 29
Joined: Feb 10th, 2015
Re: Frustrating Bug
Reply #12 - Feb 11th, 2015 at 5:45pm
Print Post  
c:\users\rohmer\Arduino\libraries
  

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


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Frustrating Bug
Reply #13 - Feb 11th, 2015 at 6:25pm
Print Post  
Ron,

You need to clear that path. It's wrong and not required. Please see my note lower down about how it works and its default location.

Thanks
  
Back to top
IP Logged
 
RonOhmer
Junior Member
**
Offline


Posts: 29
Joined: Feb 10th, 2015
Re: Frustrating Bug
Reply #14 - Feb 11th, 2015 at 6:42pm
Print Post  
Well I again feel officially stupid.

Its weird, I didn't set that and did the same setup on the home machine..  Oh well.

I am looking forward to having some form of embedded projects, but thanks for your help
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Frustrating Bug
Reply #15 - Feb 11th, 2015 at 8:22pm
Print Post  
Great thanks for the update and best of luck
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint