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 "Project > Add/Import Sketch Library > User" is dimmed (Read 1732 times)
wolf
Junior Member
**
Offline


Posts: 33
Joined: Sep 19th, 2014
"Project > Add/Import Sketch Library > User" is dimmed
Sep 26th, 2014 at 6:30am
Print Post  
I am attempting to create my first user library, but the "Project > Add/Import Sketch Library > User" is dimmed:

How to add a user library in Visual Micro?

The User Guide shows how to add core libraries, but omits how to create user libraries:
http://www.visualmicro.com/page/User-Guide.aspx?doc=Add-Libraries.html

This tutorial shows how to create a user library:
http://arduino.cc/en/Hacking/LibraryTutorial

Thank you.
« Last Edit: Sep 26th, 2014 at 6:46am by wolf »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: "Project > Add/Import Sketch Library > User" is dimmed
Reply #1 - Sep 26th, 2014 at 11:16am
Print Post  
Hi,

What is your sketchbook folder set to? It's okay if it is empty/not set but you need to say what it is?

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


Posts: 33
Joined: Sep 19th, 2014
Re: "Project > Add/Import Sketch Library > User" is dimmed
Reply #2 - Sep 26th, 2014 at 2:49pm
Print Post  
I set "sketchbook location" to project location.
     Tools > Options > Projects and Solutions > General > Project location:
     C:\Users\wolf\Documents\Atmel Studio\6.2\test_atmel\Sketch1
What is "sketchbook location" supposed to be?


The "Configure Visual Micro" form does not remember "Teensy", it reverts to "Arduino 1.0x" when I reopen the form.

Also, the Output shows a different Sketchbook location:
Quote:
Compiling 'Sketch1' for 'Teensy 2.0'
Build folder: file:///C:/Users/wolf/AppData/Local/VMicro/Arduino/Builds/Sketch1/teensy2
Summary: Header=1 Prototypes=3 Imports=1
Additional Defines: F_CPU=16000000L;USB_SERIAL;LAYOUT_US_ENGLISH;VISUALMICRO_COMPILER_VER=1;
Architecture Tools: C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\
GCC: 4.3.2
Sketchbook: file:///C:/Users/wolf/Documents/Arduino
All import libraries will be re-compiled
Core Include Paths
Include Path 'C:\Program Files (x86)\Arduino\hardware\teensy\cores\teensy'
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -fno-exceptions -ffunction-sections -fdata-sections -Wall -mmcu=atmega32u4 -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -felide-constructors -I"C:\Program Files (x86)\Arduino\hardware\teensy\cores\teensy" -o "    -DF_CPU=16000000L -DUSB_SERIAL -DLAYOUT_US_ENGLISH -DVISUALMICRO_COMPILER_VER=1  -DTEENSYDUINO=118 
Sketch1.ino:1:18: error: wait.h: No such file or directory
Sketch1.ino:In function 'void loop()'
Sketch1.ino:19: error: 'Wait' was not declared in this scope
Error compiling


« Last Edit: Sep 26th, 2014 at 7:41pm by wolf »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: "Project > Add/Import Sketch Library > User" is dimmed
Reply #3 - Sep 26th, 2014 at 9:09pm
Print Post  
Hi,

The way Arduino works is that the user libraries are located off the Sketch Book/Libraries Folder

So the sketch book folder is best left blank which defaults to "my documents\arduino" where the user libraries folder is located. 

When blank it will also use the settings from the Arduino Ide if they have been overridden but it's best left at defaults until you know Arduino.

A sketch book folder is NOT a sketch folder. A sketch book folder is a place where all of your sketches can be located. So it also does not make sense to add the name of a sketch to the sketch book folder.

Sketches can be saved anywhere you like regardless of the sketch book folder. To move sketches you should move them using windows explorer because using SaveAs will confuse things.

All of these rules are how Arduino works and enforced by Visual Micro to ensure code compatibility with the Arduino IDE
« Last Edit: Sep 26th, 2014 at 9:11pm by Tim@Visual Micro »  
Back to top
IP Logged
 
wolf
Junior Member
**
Offline


Posts: 33
Joined: Sep 19th, 2014
Re: "Project > Add/Import Sketch Library > User" is dimmed
Reply #4 - Sep 26th, 2014 at 11:25pm
Print Post  
Thank you for the explanation.  I got my first library running Smiley.
I could not have figured this out from the user guide.

What is the 6.2 folder for?
     Documents\Atmel Studio\6.2\

Thank you.

The following information needs to be added to http://www.visualmicro.com/page/User-Guide.aspx?doc=Add-Libraries.html

ABOUT SKETCHBOOK
A sketchbook folder is Arduino's standard place to store your sketches.
sketchbook folder defaults to:                  my documents\arduino
Arduino-user libraries folder is in sketchbook:      arduino\Libraries
For every user library you create, create a subfolder in Arduino's "Libraries" folder.

When "Configuration Manager > sketchbook location" field is blank, Visual Micro will use the settings from the Arduino Ide.
Until you know Arduino, it's best leave the Arduino defaults and leave the "sketchbook location" field blank.

ABOUT SKETCH FOLDERS
A sketch folder contains one sketch.
Sketch folders can be saved anywhere you like, regardless of the sketchbook folder.
Use Windows Explorer to move sketch folders.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: "Project > Add/Import Sketch Library > User" is dimmed
Reply #5 - Sep 27th, 2014 at 1:47pm
Print Post  
Hi Wolf,

Thanks for the feedback. I will add a note to the documentation that explains that users can/must use arduino.cc for all rules and how to use Arduino. Basically users must use the Arduino Ide for a day or a week until the way it works is understood then use an alternative tool.
« Last Edit: Sep 27th, 2014 at 1:48pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint