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 STM32 specific libraries not found by vm (Read 2537 times)
Captain Credible
Junior Member
**
Offline


Posts: 11
Joined: Feb 6th, 2018
STM32 specific libraries not found by vm
Mar 1st, 2018 at 10:07am
Print Post  
I am using visual micro with Arduino 1.8.5. In the Arduino IDE I can compile a sketch for STM32F103C with the USBHID_stm32f1 library. But in visual micro I cant find the library (it doesnt show up in the "add library" menu), and attempting to compile the same sketch with the same board++ in with visual micro results in a "no such file" error: 

"
midiin.ino: 2:21: fatal error: USBMIDI.h: No such file or directory
   #include <USBMIDI.h>
   compilation terminated
"

This is a library that in the Arduino IDE will not show up unless a compatible board (i.e. STM32F103C) is selected. So I guess the root of the problem might be there somewhere? How does Arduino and Visual Micro determine what libraries are allowed? Is there a quick fix that can be applied to some file in the library in question?

  
Back to top
 
IP Logged
 
Captain Credible
Junior Member
**
Offline


Posts: 11
Joined: Feb 6th, 2018
Re: STM32 specific libraries not found by vm
Reply #1 - Mar 2nd, 2018 at 1:37pm
Print Post  
As suspected, removing or quoting out the line: 
architectures=STM32F1
from the file library.properties in the root of said library allows visual micro to find it (regardless of what board you have selected). 

why isn't visual micro detecting the architecture to be STM32F1 when the Arduino IDE is detecting it?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: STM32 specific libraries not found by vm
Reply #2 - Mar 2nd, 2018 at 1:51pm
Print Post  
The correct settingfor "any board" would be architectures=*

That's the correct design for the library spec however many lib producers set the wrong architectures so the arduino ide has recently ignored the architectures setting for compilation but continues not to show the library on the ide library menus if the architecture doesn't match the current board.

Recent releases of visual micro are also supposed to ignore the architectures= during compile.

... question ...

Which version of visual micro are you using and which ide? You can see the visual micro version in tools>extensions and updates.

Which tool chain have you installed for your board (or json file path)

Is the library a standard lib if not how installed/from where?



« Last Edit: Mar 2nd, 2018 at 1:51pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Captain Credible
Junior Member
**
Offline


Posts: 11
Joined: Feb 6th, 2018
Re: STM32 specific libraries not found by vm
Reply #3 - Mar 2nd, 2018 at 5:12pm
Print Post  
Visual micro 1702.15.1 on Visual studio community 2015
And on another machine exhibiting the same behaviour 
Visual micro 1801.27.9

The board tool chain is this one: https://github.com/rogerclarkmelbourne/Arduino_STM32

The library is this one: https://github.com/arpruss/USBHID_stm32f1

Tried with with Arduino IDE 1.8.4 and 1.8.5.



« Last Edit: Mar 2nd, 2018 at 5:13pm by Captain Credible »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: STM32 specific libraries not found by vm
Reply #4 - Mar 3rd, 2018 at 3:05pm
Print Post  
Thanks for the great info and this report.

The issue was a case comparison issue when resolving the architecture= param.

Fixed in the next release due over the next few days

  • Fix: Library architecture resolution failed for some libraries due to an incorrect string case comparison resolving architecture= for library.properties
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint