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 fatal error: asf.h: No such file or directory (Read 6389 times)
rischae
Newbies
*
Offline


Posts: 1
Joined: Nov 10th, 2017
fatal error: asf.h: No such file or directory
Nov 10th, 2017 at 11:27am
Print Post  
Hello,

i have a problem with my project (Arduino Due).

I created a project with older versions of Atmel Studio(Atmel Studio 7.xxx) and VM. The ASF (PIO driver) was also included and everything just worked fine.

Yesterday i updated both (AS7 and VM). Now i have the following problem:

Code
Select All
main.c: 31:17: fatal error: asf.h: No such file or directory
   #include <asf.h>
   compilation terminated
Build failed for project 'Steuerung' 



But this file is in the project folder under src/asf.h. When i'm using #include <src/asf.h> nothing will change. 

So, i started a new empty project (vm arduino due) and included the ASF for the Due. With the same result... Cry

Can anyone help me?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: fatal error: asf.h: No such file or directory
Reply #1 - Nov 10th, 2017 at 4:11pm
Print Post  
Hi,

Two questions

Is the file actually included in the project/solution tree? Does it have a little red exclamation mark against it?

Does #include "src/asf.h" work?
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: fatal error: asf.h: No such file or directory
Reply #2 - Dec 19th, 2017 at 12:01am
Print Post  
@davidml This is a different question so has been moved here

http://www.visualmicro.com/forums/YaBB.pl?num=1513640310

« Last Edit: Dec 19th, 2017 at 12:04am by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
davidml
Junior Member
**
Offline


Posts: 15
Joined: Dec 18th, 2017
Re: fatal error: asf.h: No such file or directory
Reply #3 - Dec 19th, 2017 at 12:07am
Print Post  
Quick update, I was able to recreate this problem and as it turns out it has everything to do with the fact that when I right click the project and choose Add Arduino Library and add my libraries to my project it copies the source code from these libraries into my project under src and include.  This is the error I get when I included the Chronos library.  

Calendar.cpp: 26:42: fatal error: chronosinc/schedule/Calendar.h: No such file or directory
   #include "chronosinc/schedule/Calendar.h"
   compilation terminated

     An error was encountered during the 'Deep Search' library discovery process.
Debug build failed for project 'MyTestProject'

I can eliminate this error by forcing the compiler to include the path to chronosinc/schedule/Calendar.h via the Extra c flags and Extra cpp flags, but I still end up with a link error.  But if I simply delete the directory hierarchies "include" and "src" from my project it compiles and links just fine without adding the Extra c flags and Extra cpp flags.  

So my question now is, am I adding the Arduino libraries to my project incorrectly?  I tried to add them as I usually do via Atmel Studio, right click on the Project -> Libraries and choose Add.  When I add them that way I also manually add the Include directories to Toolchain -> C Compiler and Toolchain -> C++ compiler but that doesn't work with Visual Micro as it overwrites any edits I perform to this setting.  

What is the correct way to add an Arduino library to a Visual Micro Arduino project? 
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint