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) VisualMicro could not resolve references to ./library folder (Read 7026 times)
Kabron
Full Member
***
Offline


Posts: 170
Joined: Nov 1st, 2015
VisualMicro could not resolve references to ./library folder
Aug 18th, 2017 at 1:36pm
Print Post  
Hello,
I'm trying to compile Digilent OpenScope MZ project from 
https://github.com/Digilent/openscope-mz
All Digilent support is installed.

All necessary libraries are included in the project folder libraries

I got error messages like:

OSSerial.h: 19:45: fatal error: ./libraries/DMASerial/DMASerial.h: No such file or directory
   #include "./libraries/DMASerial/DMASerial.h"


obviously, the compler could not resolve referrences to library files.

What is the reason of such behaviour?

Pure Arduino IDE(1.6.9) behaves even more curiously:
"Unable to find C: \ Arduino \ Proj \ openscope \ openscope.ino in C: \ Arduino \ Proj \ openscope"

Of course I have this file in place.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VisualMicro could not resolve references to ./library folder
Reply #1 - Aug 18th, 2017 at 10:46pm
Print Post  
Hi,

Sorry, that is not an Arduino compatible project and doesn't need to be structured in such as complex way.

  
Back to top
WWW  
IP Logged
 
Kabron
Full Member
***
Offline


Posts: 170
Joined: Nov 1st, 2015
Re: VisualMicro could not resolve references to ./library folder
Reply #2 - Aug 19th, 2017 at 6:28am
Print Post  
Tim@Visual Micro wrote on Aug 18th, 2017 at 10:46pm:
Hi,

Sorry, that is not an Arduino compatible project and doesn't need to be structured in such as complex way.



From github: Install Arduino 1.6.9 IDE.
  
Back to top
 
IP Logged
 
Kabron
Full Member
***
Offline


Posts: 170
Joined: Nov 1st, 2015
Re: VisualMicro could not resolve references to ./library folder
Reply #3 - Aug 20th, 2017 at 7:01am
Print Post  
Maybe, maybe,
But what about results from another PC?
Arduino IDE does compile, but VisualMicro does not.
Code
Select All
Sketch uses 444,352 bytes (21%) of program storage space. Maximum is 2,031,616 bytes.
Global variables use 6,008 bytes (1%) of dynamic memory, leaving 518,280 bytes for local variables. Maximum is 524,288 bytes.
0-digilent/java/bin/java -jar 0-digilent/DigilentPGM.jar Scope.ino.hex COM3
DigilentPGM V1.00
Digilent Copyright 2016
Written by Keith Vogel
19 августа 2017 г. 14:56:53 MSK

Comm Port: COM3
Baud rate set to: 115200
Extended Digilent Bootloader Found
Board Name: OpenScope
Vendor: Digilent
Bootloader Version: 0x2010001
Capabilities: 0x170f0631
Device ID: 0x17218053
Flash Page Size: 16384
Flash Row Size: 2048
Baud rate set to: 1250000

Processing HEX file: Scope.ino.hex
Opened HEX file: Scope.ino.hex
Successfully processed HEX file: Scope.ino.hex
Program block size: 2048 bytes
Number of blocks: 251
Program size: 514048 bytes
HEX file processing time: 0s 188ms

Starting Programming:  0123456789 0123456789 0123456789 0123456789 0123456789
                       0123456789 0123456789 0123456789 0123456789 0123456789
                       0123456789 0123456789 0123456789 0123456789 0123456789
                       0123456789 0123456789 0123456789 0123456789 0123456789
                       0123456789 0123456789 0123456789 0123456789 0123456789
                       0
Program time: 10s 374ms

End of Program
 

« Last Edit: Aug 20th, 2017 at 7:02am by Kabron »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VisualMicro could not resolve references to ./library folder
Reply #4 - Aug 20th, 2017 at 12:19pm
Print Post  
I had another look at this project, I was wrong in what I said, it builds okay for me.

I tested with the latest Arduino IDE 1.8.3. (I think you can ignore the 1.6.9 instruction, maybe relates to an issue in 1.6.10 that has since been resolved). You can use whatever arduino back-end version you want.

Anyway in Visual Studio the only problem I had is that the \libraries sub folder was not automatically included int he project.

  • Notice that a small icon above the solution explorer says "Show all files". Click it so you can see the physical file/folder view in the solution explorer.
  • Then right click the "libraries" folder and click "Include in project"


Then it should build okay, like this ...

Code
Select All
Compiling 'OpenScope' for 'Digilent OpenScope'
Program size: 444,608 bytes (used 22% of a 2,031,616 byte maximum) (69.82 secs)
Minimum Memory Usage: 6008 bytes (1% of a 524288 byte maximum)
 



If it doesn't build then please install this version which is the next release produced a couple of weeks ago. It contains a fix for the order of files during link. In your case the project files contain overrides of core and lib files so the link order might be very important. Please let me know if you have to install this version (only for my own interest).

https://1drv.ms/u/s!AsT00oFsGAmRkcdvRyZ4AtDKAeG_mQ
« Last Edit: Aug 20th, 2017 at 1:30pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Kabron
Full Member
***
Offline


Posts: 170
Joined: Nov 1st, 2015
Re: VisualMicro could not resolve references to ./library folder
Reply #5 - Aug 20th, 2017 at 1:15pm
Print Post  
Now a little better, but
I'm afraid that Digilent Core was imported from Arduino incorrectly, because I got error:
Code
Select All
OpenScope.h: 73:17: error: lvalue required as left operand of assignment
   LATJSET = 0x17
AWG.c:444: note  in expansion of macro ASSERT
   ASSERT(j < HWDACSIZE-1) 

 
This macro defined in p32xxxx.h and I could not reach it from the VM.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VisualMicro could not resolve references to ./library folder
Reply #6 - Aug 20th, 2017 at 1:31pm
Print Post  
Did you read my previous note about the updated visual micro version (linker order change)?
« Last Edit: Aug 20th, 2017 at 1:33pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Kabron
Full Member
***
Offline


Posts: 170
Joined: Nov 1st, 2015
Re: VisualMicro could not resolve references to ./library folder
Reply #7 - Aug 20th, 2017 at 1:39pm
Print Post  
For beginning I tryed old version. Now I'm going to update.
  
Back to top
 
IP Logged
 
Kabron
Full Member
***
Offline


Posts: 170
Joined: Nov 1st, 2015
Re: VisualMicro could not resolve references to ./library folder
Reply #8 - Aug 20th, 2017 at 2:47pm
Print Post  
With the new version the same above error
  
Back to top
 
IP Logged
 
Kabron
Full Member
***
Offline


Posts: 170
Joined: Nov 1st, 2015
Re: VisualMicro could not resolve references to ./library folder
Reply #9 - Aug 20th, 2017 at 3:02pm
Print Post  
Was mea culpa.
Now another error:
Code
Select All
xc32-ld.exe: MPIDE Version not specified correctly

Error linking for board Digilent OpenScope
xc32-ld.exe: Link terminated due to previous error(s)
Debug build failed for project 'OpenScope'

collect2.exe*: error: ld returned 255 exit status 


I do not think I need MPIDE.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VisualMicro could not resolve references to ./library folder
Reply #10 - Aug 20th, 2017 at 3:03pm
Print Post  
Is that a build or an intellisense error? They are two different things
  
Back to top
WWW  
IP Logged
 
Kabron
Full Member
***
Offline


Posts: 170
Joined: Nov 1st, 2015
Re: VisualMicro could not resolve references to ./library folder
Reply #11 - Aug 20th, 2017 at 3:30pm
Print Post  
It was clean/rebuild
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VisualMicro could not resolve references to ./library folder
Reply #12 - Aug 20th, 2017 at 5:12pm
Print Post  
Thanks.

If you are using the code from the git project unaltered then the only other thing it can be is that I forgot I overwrote the libraries of the same name that are in core for that board.

Instead of doing that you can prove this out by copying the \libraries folder from below your project to "my documents\arduino\libraries".

Then restart the ide or click vMicro>General>Rescan toolchains and libraries"

If that is the issue I will make the next release take local project libs as the priority.
  
Back to top
WWW  
IP Logged
 
Kabron
Full Member
***
Offline


Posts: 170
Joined: Nov 1st, 2015
Re: VisualMicro could not resolve references to ./library folder
Reply #13 - Aug 21st, 2017 at 6:36am
Print Post  
At my office PC old VM compiled and load code with no prblem after adding libraries.
Before, I try to add all libraries by adding include path to project properties with no success.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint