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 External symbol not found - modified AVR core (Read 6518 times)
Etienne Martin
Newbies
*
Offline


Posts: 3
Joined: Apr 9th, 2014
External symbol not found - modified AVR core
Apr 10th, 2014 at 11:14am
Print Post  
Hello,

I have a sketch for a Leonardo using modified USBAPI.h and HID.cpp core AVR libraries on 1.5.x to enable the HID game controller descriptor (this makes the Leonardo look to Windows as a game controller for DirectX input).  By default, the core files only enable the keyboard and mouse HID pieces.  The mod is directly applied to the installation folder where the Arduino IDE is installed, in my case 

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino

The sketch compiles correctly in the Arduino IDE and runs correctly on the Leonardo.

The first problem I'm running into is that the one of my user libraries isn't found (getting reference errors).   

The second issue even when I remove the library references to get past that issue, the modified AVR core library objects for the HID controller defined in hid.cpp and usbapi.h aren't found either.

I don't know how to tell Visual Micro to use the libraries - I'm certain that as a complete noob with this environment, i'm misisng a configuration.

I have setup the IDE files and user files correctly in the environment as far as I can tell.

Any hints as to where I need to look?

Thanks!

E.

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: External symbol not found - modified AVR core
Reply #1 - Apr 10th, 2014 at 12:57pm
Print Post  
Hello Etienne,

Sorry you are having problems. I think we can fix them quite quickly but need some help.

Would you please zip and email your custom core, your libraries folder and your sketch to info [at] visualmicro.com

In the meantime you "might" find a solution for the library include by putting the name of the library into the #include such as:-

#include <SPI/SPI.h>

Please note the "library name/" in the example above.

There have been significant changes to core and libraries in Arduino versions this year. 

Currently Arduino have approx. 3 different systems between "1.0", "1.5.0-1.5.5", "1.5.6+". Visual Micro should automatically switch between these different formats but for testing I need to replicate your exact config so please confirm exactly which version of Arduino 1.5 you are using.

Thanks
  
Back to top
IP Logged
 
Etienne Martin
Newbies
*
Offline


Posts: 3
Joined: Apr 9th, 2014
Re: External symbol not found - modified AVR core
Reply #2 - Apr 10th, 2014 at 4:31pm
Print Post  
Thanks for the reply, I'm sending the requested archive with my test sketch, the modifications to the AVR core files and the libraries. 

The version of the IDE I'm using is 1.5.6 r2 because I need Windows 8.1 signed drivers.

Running Visual Micro in Visual Studio 2013 Ultimate.

OS: Windows 8.1 professional x64.

Board: Arduino Leonardo.

Regards,

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: External symbol not found - modified AVR core
Reply #3 - Apr 10th, 2014 at 5:52pm
Print Post  
Hi E,

Thanks for sending what I asked for and also for the link back to this post.

Your project, modified core and libs compile fine for me. Here is the output from the build

Code
Select All
Compiling 'gamecontroller' for 'Arduino Leonardo'
Binary sketch size: 7,734 bytes (used 27% of a 28,672 byte maximum) (3.14 secs)
Minimum Memory Usage: 422 bytes (16% of a 2560 byte maximum) 



Solution (s)

1) If you compiled your project with Visual Micro prior to updating the core then the compiler might be using a cached non-modified core. Vm caches based on Arduino Ide version number which has not changed, so I suggest clicking menu "Build>Clean Solution" then try compile again.

2) If your "User" libraries can not be found then please confirm what path you have entered into the optional sketchBook folder on the Ide locations dialog? If this field is empty it should use the same location that Arduino uses which is normally mydocument/arduino/libraries. The defaults should all work so I am keen to hear that this is not the problem.

Tim
  
Back to top
IP Logged
 
Etienne Martin
Newbies
*
Offline


Posts: 3
Joined: Apr 9th, 2014
Re: External symbol not found - modified AVR core
Reply #4 - Apr 11th, 2014 at 12:01pm
Print Post  
Tim,

still not luck with the above steps.  I had the sketch path set in the options, which I have cleared.  This helped as the user libraries were found.  However, the core still not happening after a clean solution.

I'm sending the log output with verbose turned on (didn't fit in a post) in the hope it will shed some light.

Cheers,


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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: External symbol not found - modified AVR core
Reply #5 - Apr 11th, 2014 at 12:07pm
Print Post  
Hi,

I tried it with 1.5.5 and it worked okay so I'll try with 1.5.6 over the weekend. 

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: External symbol not found - modified AVR core
Reply #6 - Apr 12th, 2014 at 2:37pm
Print Post  
Hi E,

I've looked at this again and it's a simple system no different to normal Arduino. Checking with google I see that this error happens if the .h was not replaced in the core. You have said that the Arduino Ide builds okay in "c:\ program files(x86)/arduino" so this must be a compiler cache issue.

Please click "build>clean solution", then compile and send the full output. The output in your email did not show a build after a clean. Normally the clean is not required but is required for a full compiler verbose output

The clean should delete or empty this folder: C:\Users\etienne\AppData\Local\VMicro\Arduino\Builds\gamecontroller 

If it does not delete or empty the folder, then please let me know and delete it manually using windows explorer.

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