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) Adding ARM libraries to linker search path (Read 11280 times)
markvr
Newbies
*
Offline


Posts: 5
Joined: Nov 11th, 2013
Adding ARM libraries to linker search path
Dec 22nd, 2013 at 1:00pm
Print Post  
Hi All,

I'm trying to use Visual Micro with Atmel Studio and a Teensy 3.

It works fine for simple projects, but when I try to use the ARM DSP libraries, I get the following error:
Code
Select All
TeensyAtmelTest.ino : undefined reference to `arm_cmplx_mag_f32'
collect2.exe* : : error: ld returned 1 exit status 



This works OK using the Arduino IDE, so Visual Micro obviously can't find the libraries.  I found the libraries in .\arduino\hardware\teensy\cores\teensy\ and tried adding that path to the Linker Library search path, but it made no difference.

I'm not sure what else to try - how can I configure Visual Micro to find these libraries?

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Adding ARM libraries to linker search path
Reply #1 - Dec 22nd, 2013 at 2:07pm
Print Post  
Hi,

The Arduino build process is a bit different to normal compilers so we don't use the compiler and linker settings from the Atmel project. This is why your attempted fix didn't work.

To include other non-default libraries with Arduino or Teensy they need to be placed in 1 of a few locations. It sounds like vm is failing to find the location so please explain where you have installed the library and we will tell you how to fix it.

Please also provide download link to libs

Thanks
« Last Edit: Dec 22nd, 2013 at 2:09pm by Tim@Visual Micro »  
Back to top
IP Logged
 
markvr
Newbies
*
Offline


Posts: 5
Joined: Nov 11th, 2013
Re: Adding ARM libraries to linker search path
Reply #2 - Dec 22nd, 2013 at 2:44pm
Print Post  
Hi,

Thanks for the reply, the library is libarm_cortexM4l_math.a , and installed by the Teensy installer (http://www.pjrc.com/teensy/teensyduino.html) ; into \hardware\teensy\cores\teensy\ within the Arduino IDE installation folder.

The header file is at \hardware\teensy\cores\teensy3\arm_math.h

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Adding ARM libraries to linker search path
Reply #3 - Dec 22nd, 2013 at 3:00pm
Print Post  
Thanks, the paths do not look like a library (in conventional Arduino/Teensy terms) it looks like a "core" file so should always be compiled.

1)
Which defines (speed etc) have you set for your board in Visual Micro?

2)
Please zip and email your sketch folder to info [at] visualmicro.com so that we can see your settings and test this out.

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Adding ARM libraries to linker search path
Reply #4 - Dec 22nd, 2013 at 3:01pm
Print Post  
ps: sorry I missed the location in your first clear report.
  
Back to top
IP Logged
 
markvr
Newbies
*
Offline


Posts: 5
Joined: Nov 11th, 2013
Re: Adding ARM libraries to linker search path
Reply #5 - Dec 22nd, 2013 at 3:10pm
Print Post  
Hi,

The defines (if I've understood you correctly) are F_CPU=96000000;USB_SERIAL;LAYOUT_US_ENGLISH 

Sent email with project attached.

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Adding ARM libraries to linker search path
Reply #6 - Dec 22nd, 2013 at 3:26pm
Print Post  
Hi,

Thanks for sending the files so quickly. This certainly looks like a bug we are going to take a look at it.

If it is a bug there should be a simple hack you can make to your VisualMicro installation to get it working until the next release.

Post more later today or over next 24/48 hours.

Thanks reporting this.
  
Back to top
IP Logged
 
markvr
Newbies
*
Offline


Posts: 5
Joined: Nov 11th, 2013
Re: Adding ARM libraries to linker search path
Reply #7 - Dec 22nd, 2013 at 3:27pm
Print Post  
no worries, many thanks for the prompt response!!
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Adding ARM libraries to linker search path
Reply #8 - Dec 22nd, 2013 at 3:31pm
Print Post  
Thanks

ps: In the meantime if you click File>Preferences>External editor in the Arduino/Teensy Ide you will be able to edit/save using Atmel and upload using Teensy. 

The setting forces Teensy to reload the sketch sources from disk when you click compile. So both IDE's can have the same sketch open at the same time.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Adding ARM libraries to linker search path
Reply #9 - Dec 22nd, 2013 at 9:24pm
Print Post  
UPDATE: This is resolved in the next release of Visual Micro (couple of weeks). 

More Info

In recent editions of the Teensy/Arduino Ide, the ARM maths library is defined using a new boards.txt configuration property called teensy3.build.additionalobject. 

For Tensy 3.0 boards this property is defined as -larm_cortexM4l_math and is added to the linker "include" statements. 

The current release of Visual Micro does not support this new property. Whilst it is possible to correct the problem by configuring a linker override for Visual Micro it's a bit of faffing and probably best to wait for the next release. 

Please let us know if you can't wait for the next release. In the meantime please see the previous note in this thread about the External Editor property of the Arduino Ide.

Thanks for the prompt about the linker script.
  
Back to top
IP Logged
 
markvr
Newbies
*
Offline


Posts: 5
Joined: Nov 11th, 2013
Re: Adding ARM libraries to linker search path
Reply #10 - Dec 23rd, 2013 at 9:15am
Print Post  
cool that's perfect thanks!  A couple of weeks is fine, that was the fastest bug report to fix I've ever seen Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint