Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
VisualMicro could not resolve references to ./library folder (Read 4048 times)
Kabron
Junior Member
**
Offline



Posts: 95
VisualMicro could not resolve references to ./library folder
Aug 18th, 2017 at 2:36pm
 
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
 
Visual Micro
Administrator
*****
Offline



Posts: 10532
United Kingdom
Re: VisualMicro could not resolve references to ./library folder
Reply #1 - Aug 18th, 2017 at 11:46pm
 
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
Junior Member
**
Offline



Posts: 95
Re: VisualMicro could not resolve references to ./library folder
Reply #2 - Aug 19th, 2017 at 7:28am
 
Visual Micro wrote on Aug 18th, 2017 at 11: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
Junior Member
**
Offline



Posts: 95
Re: VisualMicro could not resolve references to ./library folder
Reply #3 - Aug 20th, 2017 at 8:01am
 
Maybe, maybe,
But what about results from another PC?
Arduino IDE does compile, but VisualMicro does not.
Code:
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.
C:\Users\vlady\AppData\Local\Arduino15\packages\Digilent\tools\DigilentPGM\v1.000-digilent/java/bin/java -jar C:\Users\vlady\AppData\Local\Arduino15\packages\Digilent\tools\DigilentPGM\v1.000-digilent/DigilentPGM.jar C:\Users\vlady\AppData\Local\Temp\build371aac5bb7662e28ecbedb0283752a7d.tmp/OpenScope.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: C:\Users\vlady\AppData\Local\Temp\build371aac5bb7662e28ecbedb0283752a7d.tmp/OpenScope.ino.hex
Opened HEX file: C:\Users\vlady\AppData\Local\Temp\build371aac5bb7662e28ecbedb0283752a7d.tmp\OpenScope.ino.hex
Successfully processed HEX file: C:\Users\vlady\AppData\Local\Temp\build371aac5bb7662e28ecbedb0283752a7d.tmp/OpenScope.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
 

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



Posts: 10532
United Kingdom
Re: VisualMicro could not resolve references to ./library folder
Reply #4 - Aug 20th, 2017 at 1:19pm
 
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:
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
Back to top
« Last Edit: Aug 20th, 2017 at 2:30pm by Visual Micro »  
WWW  
IP Logged
 
Kabron
Junior Member
**
Offline



Posts: 95
Re: VisualMicro could not resolve references to ./library folder
Reply #5 - Aug 20th, 2017 at 2:15pm
 
Now a little better, but
I'm afraid that Digilent Core was imported from Arduino incorrectly, because I got error:
Code:
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
 
Visual Micro
Administrator
*****
Offline



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



Posts: 95
Re: VisualMicro could not resolve references to ./library folder
Reply #7 - Aug 20th, 2017 at 2:39pm
 
For beginning I tryed old version. Now I'm going to update.
Back to top
 
 
IP Logged
 
Kabron
Junior Member
**
Offline



Posts: 95
Re: VisualMicro could not resolve references to ./library folder
Reply #8 - Aug 20th, 2017 at 3:47pm
 
With the new version the same above error
Back to top
 
 
IP Logged
 
Kabron
Junior Member
**
Offline



Posts: 95
Re: VisualMicro could not resolve references to ./library folder
Reply #9 - Aug 20th, 2017 at 4:02pm
 
Was mea culpa.
Now another error:
Code:
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
 
Visual Micro
Administrator
*****
Offline



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



Posts: 95
Re: VisualMicro could not resolve references to ./library folder
Reply #11 - Aug 20th, 2017 at 4:30pm
 
It was clean/rebuild
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10532
United Kingdom
Re: VisualMicro could not resolve references to ./library folder
Reply #12 - Aug 20th, 2017 at 6:12pm
 
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
Junior Member
**
Offline



Posts: 95
Re: VisualMicro could not resolve references to ./library folder
Reply #13 - Aug 21st, 2017 at 7:36am
 
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 Topic Print