VS Arduino
Visual Micro >> Visual Studio 2017, 2019, 2022 >> VisualMicro could not resolve references to ./library folder
https://www.visualmicro.com/forums/YaBB.pl?num=1503063372

Message started by Kabron on Aug 18th, 2017 at 1:36pm

Title: VisualMicro could not resolve references to ./library folder
Post by Kabron on Aug 18th, 2017 at 1: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.

Title: Re: VisualMicro could not resolve references to ./library folder
Post by Visual Micro 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.


Title: Re: VisualMicro could not resolve references to ./library folder
Post by Kabron on Aug 19th, 2017 at 6:28am

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.

Title: Re: VisualMicro could not resolve references to ./library folder
Post by Kabron on Aug 20th, 2017 at 7: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
[/code]

Title: Re: VisualMicro could not resolve references to ./library folder
Post by Visual Micro on Aug 20th, 2017 at 12: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)
[/code]

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

Title: Re: VisualMicro could not resolve references to ./library folder
Post by Kabron on Aug 20th, 2017 at 1: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)[/code]
This macro defined in p32xxxx.h and I could not reach it from the VM.

Title: Re: VisualMicro could not resolve references to ./library folder
Post by Visual Micro on Aug 20th, 2017 at 1:31pm
Did you read my previous note about the updated visual micro version (linker order change)?

Title: Re: VisualMicro could not resolve references to ./library folder
Post by Kabron on Aug 20th, 2017 at 1:39pm
For beginning I tryed old version. Now I'm going to update.

Title: Re: VisualMicro could not resolve references to ./library folder
Post by Kabron on Aug 20th, 2017 at 2:47pm
With the new version the same above error

Title: Re: VisualMicro could not resolve references to ./library folder
Post by Kabron on Aug 20th, 2017 at 3: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[/code]
I do not think I need MPIDE.

Title: Re: VisualMicro could not resolve references to ./library folder
Post by Visual Micro on Aug 20th, 2017 at 3:03pm
Is that a build or an intellisense error? They are two different things

Title: Re: VisualMicro could not resolve references to ./library folder
Post by Kabron on Aug 20th, 2017 at 3:30pm
It was clean/rebuild

Title: Re: VisualMicro could not resolve references to ./library folder
Post by Visual Micro on Aug 20th, 2017 at 5: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.

Title: Re: VisualMicro could not resolve references to ./library folder
Post by Kabron on Aug 21st, 2017 at 6: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.

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.