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 Include broken for custom boards with new release (Read 4129 times)
Paul Martinsen
Junior Member
**
Offline


Posts: 14
Joined: Apr 12th, 2017
Include broken for custom boards with new release
Jul 14th, 2017 at 10:33am
Print Post  
Hello,

The latest version of Visual Micro has stopped building my project that uses a custom board definition. It no longer finds core Arduino libraries, namely SPI.h. 

I have a custom board definition as follows:
dragonfly.name=Weka Labs Dragonfly
dragonfly.build.mcu=atmega2560
dragonfly.build.f_cpu=11289600
dragonfly.build.board=WL_DRAGONFLY
dragonfly.build.core=arduino:arduino
dragonfly.build.variant=arduino:mega

dragonfly.upload.tool=avrdude
dragonfly.upload.protocol=wiring
dragonfly.upload.maximum_size=253952
dragonfly.upload.maximum_data_size=8192
dragonfly.upload.speed=115200


So a Mega, but running at 11.2MHz. No custom build configuration. Previously projects using this board built with Visual Micro. Today I updated to the 1706.25 release and now I get:

Clacks.ino: 12:46: fatal error: SPI.h: No such file or directory
   #include "SPI.h" \\ To force library include
   compilation terminated


This happens with or without deep search includes turned on (normally it is off for faster builds). 

I've included a list of the board properties that print when Show Build Properties is turned on. Is there a way to get the previous version of Visual Micro so we can see what's changed with the build properties? 

The properties list can be found at: https://www.dropbox.com/s/imvdqwl311y7wnn/Dragonfly.txt?dl=0

Kind regards
Paul
  
Back to top
 
IP Logged
 
Paul Martinsen
Junior Member
**
Offline


Posts: 14
Joined: Apr 12th, 2017
Re: Include broken for custom boards with new release
Reply #1 - Jul 14th, 2017 at 10:36am
Print Post  
Hello again,

I also tried building the project to target "Arduino Mega ADK". That works fine. Build properties for that one are here: https://www.dropbox.com/s/03o0dcgjw7pp7t3/Mega.txt?dl=0

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Include broken for custom boards with new release
Reply #2 - Jul 14th, 2017 at 9:13pm
Print Post  
Hi,

Can you explain where and what folder you have used to add a custom board.

Also include .zip of any board or platform.txt files you have used.

Thanks
  
Back to top
WWW  
IP Logged
 
Paul Martinsen
Junior Member
**
Offline


Posts: 14
Joined: Apr 12th, 2017
Re: Include broken for custom boards with new release
Reply #3 - Jul 14th, 2017 at 11:27pm
Print Post  
Hi Tim,

Thanks for getting back to me so quickly. 

I built a board definition and installed it using the Arduino IDE. So a json file and a zip package. Both are here: https://www.dropbox.com/sh/ixxr60krnjle6p9/AADOEixtHcW4b1h__WfLC-Yxa?dl=0

It installs a single file at the path: ds.txt

The toolsDependencies bit in the json file also makes the Arduino IDE pull version 1.6.18 of the Arduino toolchain. It puts that into: 
D:\Users\Paul\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.18

And 4.9.2 of gcc, which it puts here: 
3.5.4-arduino2

So the SPI.h file it can't find is located here: ries\SPI\src

I've pointed Visual Micro to the location that I installed the Arduino IDE which is: 
C:\Programming\Languages\Arduino-1.6.12

Of course that folder contains a copy of the gcc tool-chain too. I'm not particularly clear on how that fits together with the one they put into the user's profile directory. 

Kind regards
Paul.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Include broken for custom boards with new release
Reply #4 - Jul 15th, 2017 at 12:53am
Print Post  
Thanks, I will look into but they sure have confused things for people with the package stuff.

The avr tool chain, sources and libraries are installed with the Arduino IDE. They originally designed board manager at the same time as removing the avr tools and sources from the IDE. That was Arduino 1.6.4. By 1.6.5 they had changed their minds due to complaints from the community. So you can be sure that avr is installed with the Arduino IDE.

When you update the Arduino IDE you also update the AVR tools and sources so installing via Board Manager > Packages simply duplicates and gives you two things to keep up to date.

The package system is primarily designed for new tool chains. The Arduino IDE has always had a simpler and easier to use system outside of any package.

This is how I installed your boards. 

Note that Arduino has something called a Sketch Book folder which is normally mydocuments\Arduino. Creating a folder called "\hardware" below the sketch book allows you to add custom tools and boards etc,

Code
Select All
1) Create folder "C:\Users\[your name]\Documents\Arduino\Hardware\MyDragonFly\avr"

2) Put the boards.txt in the folder you just created

3) Re-start the Ide
 


tip: Remove your package to avoid confusion

I can build with your board and SPI is available.

« Last Edit: Jul 15th, 2017 at 12:54am by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Paul Martinsen
Junior Member
**
Offline


Posts: 14
Joined: Apr 12th, 2017
Re: Include broken for custom boards with new release
Reply #5 - Jul 19th, 2017 at 8:47am
Print Post  
Sorry; just getting back to this again. 

Installing the boards file into the user documents folder didn't resolve the problem unfortunately. Before/after doing that I was able to build for the Dragonfly board with the Arduino IDE but not with Visual Micro. 

Your comments about version made me check which version of the Arduino IDE I was using. 

I was on 1.6.12 and now they are up to 1.8.3. 

I downloaded and installed the latest version of the Arduino IDE. Now it is working again. So I can build in Visual Micro for the dragonfly board installed with the packages system. 

The packages stuff is pretty confusing. I do like that I can give simple instructions to get the board setup for collaborators though. 

Our project contains more than 400 files so I'm really relying on Visual Micro so I can use Visual Studio's editor but still target all the different Arduino boards. Thanks for doing such a nice job on Visual Micro! 

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Include broken for custom boards with new release
Reply #6 - Jul 20th, 2017 at 10:08pm
Print Post  
I will look into it thanks. I suspect the sketchbook/hardware folder only failed because you still had the version in D:\Users\Paul\AppData\Local\Arduino15\packages\


  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint