libarm_cortexM4lf_math.a uses VFP register arguments, project.elf does not Atmel Studio 7

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey Atmel Forum,

 

I'm currently using the ATSAMD51J20 and try to get some math to work on it. I've included the "libarm_cortexM4lf_math.a" cmsis library and after compiling I receive the errors:

"libarm_cortexM4lf_math.a uses VFP register arguments, project.elf does not Atmel Studio 7"

and 

"failed to merge target sdpecifc data of file ...\CMSIS\Lib\GCC\libarm_cortexM4lf_math.a".

 

I've tried out several things, like adding the libraries in the ARM/GNU Linker or changing " -std=gnu99 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 " to "-std=gnu99 -mfloat-abi=hard -mfpu=fpv4-sp-d16 ", which didn't resolve the issue.

 

Anyone some advice?

 

Thank you in advances and regards

 

crackl1ng

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would suggest that you put "libarm_cortexM4lf_math.a uses VFP register arguments, project.elf does not" into your favourite internet search engine - it seems to be quite common...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That's what I did, but nothing helped.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

 

The consensus seems to be that you're using a library with hard FP while (some of) the rest of your project uses soft FP - so have you checked that out ?

 

Have you checked the Atmel Studio Project settings ?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Note that if you use the usual “double” functions (and constants), you won’t be using hardware float (which does single precision only)

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I tried to, but I kind of did not know which library uses soft FP or hard FP. Is there a way to check it out? The project is kinda big since a lot of people work with it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The Adafruit SAMD51 Arduino build link command ends up using:

 

-larm_cortexM4lf_math -mfloat-abi=hard -mfpu=fpv4-sp-d16 -L...variants/metro_m4 -lm

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So where did you start with this project ?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...