fatal error: arm_math.h compile error

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
_phillip
 
Posts: 313
Joined: Fri Apr 09, 2021 3:28 pm

fatal error: arm_math.h compile error

Post by _phillip »

I was prompted to upgrade some libraries and I did so. Now, I am getting the following compile error:

Code: Select all

In file included from /Users/PhillipBriles/Library/Arduino15/packages/adafruit/hardware/samd/1.7.5/cores/arduino/math_helper.c:50:
/Users/PhillipBriles/Library/Arduino15/packages/adafruit/hardware/samd/1.7.5/cores/arduino/math_helper.h:44:10: fatal error: arm_math.h: No such file or directory
   44 | #include "arm_math.h"
      |          ^~~~~~~~~~~~
compilation terminated.
exit status 1
Error compiling for board Adafruit Feather M0.
My research did not provide any help, so this error may be unique to the Feather MO, but I am not certain. As a test I ran the Blink sketch and it would not compile either, so this include file must be embedded in some other file.

If someone could provide some help with this I would be very grateful.

Thank you.

User avatar
_phillip
 
Posts: 313
Joined: Fri Apr 09, 2021 3:28 pm

Re: fatal error: arm_math.h compile error

Post by _phillip »

I took a look in my Library and learned that the file 'math_helper.h' does require

#include "arm_math.h"

but that file does not exist in the Library.

I have found the arm_math.h file on GitHub -

https://github.com/ARM-software/.../Include/arm_math.h

This is a massive file and wonder if this is the file I am missing? The link contained a banned word so I could not include the entire link.

Any help with this issue will be greatly appreciated.

Thanks!

User avatar
_phillip
 
Posts: 313
Joined: Fri Apr 09, 2021 3:28 pm

Re: fatal error: arm_math.h compile error

Post by _phillip »

I fortunately have an iMac whose Arduino IDE libraries have not been 'updated' so I am using this for my work. I may replace the entire Adafruit library on my laptop with the same library from my iMac. That may the only solution.

If anyone has any ideas/suggestions on how to corrected this compile error I would love to hear them.

Thanks!

User avatar
_phillip
 
Posts: 313
Joined: Fri Apr 09, 2021 3:28 pm

Re: fatal error: arm_math.h compile error

Post by _phillip »

Problem solved.

For the sake of those who may have the same or similar issue in the future this is how I fixed this compile issue: I replaced the entire Adafruit library folder on my dev computer with the same Adafruit library folder from my iMac and the compile issue vanished.

I was also fortunate for the following two reasons:
> I had two computers with the Arduino IDE installed;
> Only one of those IDE's had been 'upgraded' libraries.

If both IDE's had been 'upgraded' this solution would not have been possible.

The folder stream is as follows:
Users/your-user-name/Library/Arduino15/packages/adafruit/.../...
The adafruit folder in bold type is what was replaced. Folder size was approximately 1.11 Gb.

It has taken quite a bit of time to resolve this issue so I will probably not be so quick to 'upgrade' any libraries in the near future.

Thanks!

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”