Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • 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
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Create Arduino Library using Visual Micro (Read 11885 times)
sticks
Junior Member
**
Offline



Posts: 10
Create Arduino Library using Visual Micro
Dec 26th, 2011 at 8:42pm
 
Hi,
I'm trying to create my own reusable Arduino Library and I don't see how to do this with VM. A library won't have a .pde file and this is the main VM trigger. I've cobbled something together, but was wondering if I'm just doing something wrong?

thanks.
Back to top
 

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



Posts: 10706
United Kingdom
Re: Create Arduino Library using Visual Micro
Reply #1 - Dec 27th, 2011 at 3:41pm
 
arduino libs are .h and c/cpp files. you would need to add the lib to your normal arduino libs folder and then restart vs

use project>view all arduino files to see libs that are included in the current sketch.

if in doubt copy the servo library or some other small lib and make sure you can see it in the arduino ide. this will prove you have a correct lib setup for vs
Back to top
 

Please Register or Login to the Forum to see File Attachments

WWW  
IP Logged
 
sixeyes2
Junior Member
**
Offline



Posts: 93
Guildford, United Kingdom
Re: Create Arduino Library using Visual Micro
Reply #2 - Dec 29th, 2011 at 12:42pm
 
Trying the same thing here. View all Arduino Files is great but it appears 15 times in the menu!

Arduino project builds correctly so obviously picking up the library for compilation / linking but _libraries is empty.

How do I add the library source files to my solution so I can edit them in VM?

BTW I love the _core\inc and _core\src. It's great to be able to view these files easily.

Iain
Back to top
 

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



Posts: 10706
United Kingdom
Re: Create Arduino Library using Visual Micro
Reply #3 - Dec 29th, 2011 at 6:20pm
 
to clean up the duplicate items please run the resetaddin documented on the main site. to be certain of the resetaddin working, ensure vs and all envdte.exe processes are closed/shutdown before running the resetaddin.

please copy the #inlcludes from your source into a reply to this topic please. also please confirm where you have the _library located. arduino\libraries or sketch book folder/libraries?. also confirm the name of the library folder(s)

thanks
Back to top
 

Please Register or Login to the Forum to see File Attachments

WWW  
IP Logged
 
sixeyes2
Junior Member
**
Offline



Posts: 93
Guildford, United Kingdom
Re: Create Arduino Library using Visual Micro
Reply #4 - Dec 30th, 2011 at 3:28pm
 
Visual Micro wrote on Dec 29th, 2011 at 6:20pm:
to clean up the duplicate items please run the resetaddin documented on the main site. to be certain of the resetaddin working, ensure vs and all envdte.exe processes are closed/shutdown before running the resetaddin.

Just done this. It's fixed all my issues with the Boards / Serial Port selection. The error I got when starting VS2008 with Arduino v1.0 has also disappeared.

Quote:
please copy the #inlcludes from your source into a reply to this topic please. also please confirm where you have the _library located. arduino\libraries or sketch book folder/libraries?. also confirm the name of the library folder(s)

thanks

By chance I decided to recreate the VS files for my project (before resetting the addin) and now the libraries all appear.

Minor enhancement: Would it be possible to add inc / src filters for each library. I've just added them to my current project but if VM did this automatically...


Iain†
Back to top
 

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



Posts: 10706
United Kingdom
Re: Create Arduino Library using Visual Micro
Reply #5 - Dec 31st, 2011 at 3:27pm
 
good news.

do you mean split .c/cpp and .h files under each [library Name] tree node?
Back to top
 

Please Register or Login to the Forum to see File Attachments

WWW  
IP Logged
 
sixeyes2
Junior Member
**
Offline



Posts: 93
Guildford, United Kingdom
Re: Create Arduino Library using Visual Micro
Reply #6 - Dec 31st, 2011 at 10:07pm
 
Visual Micro wrote on Dec 31st, 2011 at 3:27pm:
do you mean split .c/cpp and .h files under each [library Name] tree node?

Yes. I was hoping each library could look like _core where the header and source files were in separate folders.
So instead of having a collection of files under each library there would be two filters, inc and src and the appropriate files under each.

BTW despite resetting the addin twice I get two Show All Arduino Files menu items (but not the 15 times I got before the reset). I'm not sure if it's relevant but with no project loaded I get a single greyed out Show All Arduino Files in the project menu. Nothing else is in the menu.

Iain
Back to top
 

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



Posts: 10706
United Kingdom
Re: Create Arduino Library using Visual Micro
Reply #7 - Dec 31st, 2011 at 11:13pm
 
yes you should not see the grayed out item(s)

i have a look at the show all files
Back to top
 

Please Register or Login to the Forum to see File Attachments

WWW  
IP Logged
 
sixeyes2
Junior Member
**
Offline



Posts: 93
Guildford, United Kingdom
Re: Create Arduino Library using Visual Micro
Reply #8 - Jan 1st, 2012 at 12:48am
 
Perhaps this is another limitation with VS2008?

Iain
Back to top
 

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



Posts: 10706
United Kingdom
Re: Create Arduino Library using Visual Micro
Reply #9 - Jan 1st, 2012 at 1:35am
 
i've done more 2010 testing than 2008. hopefully it's easy to fix
Back to top
 

Please Register or Login to the Forum to see File Attachments

WWW  
IP Logged
 
sixeyes2
Junior Member
**
Offline



Posts: 93
Guildford, United Kingdom
Re: Create Arduino Library using Visual Micro
Reply #10 - Jan 12th, 2012 at 8:42pm
 
sixeyes2 wrote on Dec 31st, 2011 at 10:07pm:
BTW despite resetting the addin twice I get two Show All Arduino Files menu items (but not the 15 times I got before the reset). I'm not sure if it's relevant but with no project loaded I get a single greyed out Show All Arduino Files in the project menu. Nothing else is in the menu.

I've just installed VS2008 on my older laptop (it has XP SP3) and I'm only seeing one instance of Show All Arduino Files. When no solution is loaded the Project menu is empty. On my newer laptop (Win7 SP1) I see Show All Arduino Files when no solution is loaded and twice once a solution is loaded. I'm not sure whether the OS is important. But it does indicate that you can get both behaviours with VS2008.

Iain
Back to top
 

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



Posts: 10706
United Kingdom
Re: Create Arduino Library using Visual Micro
Reply #11 - Jan 13th, 2012 at 9:24pm
 
thanks for the info. I'll try and add some trace messages for that menu item which might help us see the difference.

can you confirm that all other menu items and tool bar controls are okay? please also check right clicks (in solution explorer) on solution and project. look okay? got some arduino options?
Back to top
 

Please Register or Login to the Forum to see File Attachments

WWW  
IP Logged
 
sixeyes2
Junior Member
**
Offline



Posts: 93
Guildford, United Kingdom
Re: Create Arduino Library using Visual Micro
Reply #12 - Jan 14th, 2012 at 1:23am
 
Visual Micro wrote on Jan 13th, 2012 at 9:24pm:
thanks for the info. I'll try and add some trace messages for that menu item which might help us see the difference.

can you confirm that all other menu items and tool bar controls are okay? please also check right clicks (in solution explorer) on solution and project. look okay? got some arduino options?


Which VS2008 are you asking about? I'm currently working on the old laptop which appears to be functioning correctly (current number of menu items in project menu). Just right clicked on Solution and an Arduino menu is listed. However couldn't see any Arduino menus when right clicking on the project, what should I see. All Tools/Arduino menu items appear to be correct.

Until this week all my previous experience of VM had been on the other laptop.

Iain
Back to top
 

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



Posts: 10706
United Kingdom
Re: Create Arduino Library using Visual Micro
Reply #13 - Jan 29th, 2012 at 10:35pm
 
this was sorted wasn't it?
Back to top
 

Please Register or Login to the Forum to see File Attachments

WWW  
IP Logged
 
sixeyes2
Junior Member
**
Offline



Posts: 93
Guildford, United Kingdom
Re: Create Arduino Library using Visual Micro
Reply #14 - Jan 30th, 2012 at 1:30am
 
Visual Micro wrote on Jan 29th, 2012 at 10:35pm:
this was sorted wasn't it?


No. Win 7 laptop is still showing 2 instances of the Show All Arduino Files using V26 from Codeplex (but reported as 25 in tools/options).

Perhaps there's an issue with this install of VS2008 because tool window docking doesn't work either. Planning a reinstall of VS when I get time.

Iain
Back to top
 

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



Posts: 10706
United Kingdom
Re: Create Arduino Library using Visual Micro
Reply #15 - Jan 31st, 2013 at 5:57pm
 
Off-Topic replies have been moved to this Topic.
Back to top
 

Please Register or Login to the Forum to see File Attachments

WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print