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) Arduino 1.5 custom hardware - unable to include the SoftwareSerial library (Read 13152 times)
matt vdl
Newbies
*
Offline


Posts: 7
Joined: Oct 11th, 2014
Arduino 1.5 custom hardware - unable to include the SoftwareSerial library
Oct 11th, 2014 at 10:47am
Print Post  
Hello,

I am trying to add the softwareSerial library to my project?

When I go to project Add\Import Sketch Library\Core it is not listed, there are about 16 listed but software serial is not.

If I hit refresh - then the SoftwareSerial library shows up in the list, but selecting it from the menu it does not put the include in the file.  If I manually add it, it does not work and reports an error.

If I restart the ide the menu item disappears also.

I have Arduino ide 1.5 and VS 2013.

The softwareSerial library is located here - C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\.  Is this correct?

Not sure what I am doing wrong, any help would be appreciated.
« Last Edit: Oct 11th, 2014 at 11:43am by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: unable to include the SoftwareSerial library
Reply #1 - Oct 11th, 2014 at 10:52am
Print Post  
Hi,

Which board are you using?

Thanks
  
Back to top
IP Logged
 
matt vdl
Newbies
*
Offline


Posts: 7
Joined: Oct 11th, 2014
Re: unable to include the SoftwareSerial library
Reply #2 - Oct 11th, 2014 at 11:07am
Print Post  
The board is a pololu a-star, 

And just tested - problem does not occur when I select the Micro?

What is the difference here?
« Last Edit: Oct 11th, 2014 at 11:09am by matt vdl »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: unable to include the SoftwareSerial library
Reply #3 - Oct 11th, 2014 at 11:32am
Print Post  
Thanks for the info

Arduino 1.5 allows libraries to be assigned a list of supported architectures.

If you switch to, for example, the Arduino Due you will see that SoftwareSerial disappears from the list of available Core libraries. This is because SoftwareSerial is defined to be for avr chips and not 32 bit sam chips.

This is one major change of the Arduino 1.5 beta which has been re-worked a few times but should now be stable. 

Question

Does the library show up and compile okay in the arduino ide when the pololu is selected?

Based on your answer we will know if we have to change a file in the arduino 1.5 beta or a vm change to fix the issue.

Thanks
« Last Edit: Oct 11th, 2014 at 11:34am by Tim@Visual Micro »  
Back to top
IP Logged
 
matt vdl
Newbies
*
Offline


Posts: 7
Joined: Oct 11th, 2014
Re: unable to include the SoftwareSerial library
Reply #4 - Oct 11th, 2014 at 11:36am
Print Post  
Yes - it does compile in the Adruino environment ok, it's just in the VS 2013 it does not work.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Arduino 1.5 custom hardware - unable to include the SoftwareSerial library
Reply #5 - Oct 11th, 2014 at 11:43am
Print Post  
Okay thanks

As I said it has been a fast moving area in Arduino beta and we can use your example for some final tweaks to visual micro in the next release.

For now you can navigate to the SoftwareSerial library folder [arduinoide]\hardware\arduino\avr\libraries\SoftwareSerial and move it to [arduinoide]\hardware\arduino\libraries\SoftwareSerial

Then in Visual Micro click "tools>visual micro>reload toolchains" or re-start the ide.

Alternatively use the latest Arduino 1.0.6 release instead of the beta which should contain the same functionality for your board.

I hope this helps and thanks for the heads up that non-standard arduino hardware fails to find architecture specific libraries.
« Last Edit: Oct 11th, 2014 at 11:44am by Tim@Visual Micro »  
Back to top
IP Logged
 
matt vdl
Newbies
*
Offline


Posts: 7
Joined: Oct 11th, 2014
Re: Arduino 1.5 custom hardware - unable to include the SoftwareSerial library
Reply #6 - Oct 11th, 2014 at 12:25pm
Print Post  
Ok,

I have copied from

C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries
To 
C:\Program Files (x86)\Arduino\hardware\arduino\libraries\

This included the SoftwareSerial folder

I have tried to restart the IDE and it does not appear to have fixed the issue - the Software library still does not appear?

Anything else to try?

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Arduino 1.5 custom hardware - unable to include the SoftwareSerial library
Reply #7 - Oct 11th, 2014 at 12:40pm
Print Post  
Oh sorry I didn't realize that the library was not only in the architecture specific folder but also contains a library.properties text using another new arduino format to specify architectures (applies to lib menu items).

1) edit the library.properties file with a text editor (notepad) and change 

Code
Select All
architectures=avr 



to

Code
Select All
architectures=* 



Thanks
« Last Edit: Oct 11th, 2014 at 12:41pm by Tim@Visual Micro »  
Back to top
IP Logged
 
matt vdl
Newbies
*
Offline


Posts: 7
Joined: Oct 11th, 2014
Re: Arduino 1.5 custom hardware - unable to include the SoftwareSerial library
Reply #8 - Oct 11th, 2014 at 1:01pm
Print Post  
Ok,

These folders don't have a library.properties file, do I need to create one?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Arduino 1.5 custom hardware - unable to include the SoftwareSerial library
Reply #9 - Oct 11th, 2014 at 1:10pm
Print Post  
Oh I was looking at a more recent version of the arduino beta than you. I just checked 1.5.7 and it does not have a properties file in the SoftwareSerial folder.

Sorry I will have to try it out over the next few days I am seeing all the std ide/libraries for my custom boards.

Out of interest if you use the "tools>visual micro>platform explorer" what are the names shown for your board type in the list and does softwareserial exist under "all libraries"?

what happens if you move the library to "mydocument\arduino\libraries"? Does it appear on the "User" library menu instead of "Core"?

Please give me a link to the custom core you have installed for the board so I can see what format it is. Thanks
« Last Edit: Oct 11th, 2014 at 1:11pm by Tim@Visual Micro »  
Back to top
IP Logged
 
matt vdl
Newbies
*
Offline


Posts: 7
Joined: Oct 11th, 2014
Re: Arduino 1.5 custom hardware - unable to include the SoftwareSerial library
Reply #10 - Oct 11th, 2014 at 1:11pm
Print Post  
I tried adding a library.properties file with the text of with only the text architectures=* in it.   

This had no impact on this.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Arduino 1.5 custom hardware - unable to include the SoftwareSerial library
Reply #11 - Oct 11th, 2014 at 1:12pm
Print Post  
No not needed, ignore the library properties thanks
  
Back to top
IP Logged
 
matt vdl
Newbies
*
Offline


Posts: 7
Joined: Oct 11th, 2014
Re: Arduino 1.5 custom hardware - unable to include the SoftwareSerial library
Reply #12 - Oct 11th, 2014 at 1:51pm
Print Post  
It does not appear platform explorer - see attached image,

moving the folders to mydocument\arduino\libraries worked and I can now use the library

the a-star is here http://www.pololu.com/file/0J743/a-star-1.0.1.zip ;

Would be great if this just worked

Thanks very much for your help so far
« Last Edit: Oct 11th, 2014 at 1:53pm by matt vdl »  

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Arduino 1.5 custom hardware - unable to include the SoftwareSerial library
Reply #13 - Oct 11th, 2014 at 3:27pm
Print Post  
Thanks for the link.

In have downloaded and tested here are my results.

1) Arduino 1.0.x release
The custom hardware is in Arduino Ide 1.0 format. The software serial library works fine in Visual Micro when using a standard Arduino 1.0.6 configuration.

2) Arduino 1.5.x beta

As mentioned there is a bug in visual micro that is not finding the libraries in arduino/hardware/arduino/avr/libraries for 1.0 format hardware definitions in the 1.5 ide.

As you can see Arduino is a bit confusing with versions at the moment but don't blame me Smiley

I was able to see and use the softwareSerial library by moving it to various locations such as ArduinoIDE\Libraries. 

Note: In my testing the "tools>vm>reload toolchains" did not immediately refresh the libs menu I had to switch board and back again or restart the ide.

Solution in 1.5

I suggest copying all the libs from arduino/hardware/arduino/avr/libraries to Documents\Arduino\hardware\pololu\avr\libraries

This will surely work or as mentioned earlier use the release version of the arduino ide 1.0.6
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Arduino 1.5 custom hardware - unable to include the SoftwareSerial library
Reply #14 - Oct 11th, 2014 at 7:52pm
Print Post  
One other point. When I mention documents/arduino/hardware you must use wherever you have installed the hardware. 

There are two locations 1) documents/hardware and 2)ide/hardware that you can use for custom arduino hardware.

Not sure if you knew that
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Arduino 1.5 custom hardware - unable to include the SoftwareSerial library
Reply #15 - Jan 11th, 2015 at 3:03am
Print Post  
fixed in dec 2014 releases
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint