Ho to enable FPU in SAM E70?

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

I have this very simple code in main.c:

 

 

    #define __FPU_PRESENT 1
    #define __FPU_DP 1

 

    #include <atmel_start.h>

 

    int main(void)
    {
        atmel_start_init();

        _fpu_enable();

        while (1) {}
    }

 

Under the project properties, I've changed the entry  Other Flags  in  ARM/GNU C Compiler --> Miscellaneous  to -mfloat-abi=hard -mfpu=fpv5-d16. When trying to Compile/Build, I get a number of errors saying e.g. "Error: failed to merge target specific data of file atmel_start.o Hello_World_ASF4 1". As a result, it failed to merge object files, ultimately resulting in error: undefined reference to `_fpu_enable'.

 

What's the proper way to get code working with the FPU enabled?

 

The Atmel Studio version I am using is 7.0.2397.

 

Side note: It's not clear to me how the default setup would still point to the software FPU. Why would I waste my money buying a cool product if my manufacturer makes it so hard for me to make good use of all its features?

 

Last Edited: Tue. Apr 14, 2020 - 10:30 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

You're not the first to ask this question here. Do a search.

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

I did and all I found were unanswered questions. if I am wrong, I’d be more than happy to be proven otherwise with a link to a satisfying answer.

 

I've just searched the forum for the very generic word"fpu" and yielded the following results:

 

 

Beyond that point in the search results, a cursory look doesn't show me anything relevant.

Last Edited: Tue. Apr 14, 2020 - 06:31 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0