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?