How to solve: fatal error: arm_math.h: No such file or directory

Been trying to build a glitch storm synth for a few hours today, got the parts on the breadboard but hit a hurdle with the code. After a few other problems I figured out, I’m stuck with this one:

In file included from C:\Users\MYPC\Documents\Arduino\libraries\ArduinoSound\src/ArduinoSound.h:28:0,

from C:\Users\MYPC\Documents\Arduino\sketch_aug21b\sketch_aug21b.ino:1:

C:\Users\MYPC\Documents\Arduino\libraries\ArduinoSound\src/AmplitudeAnalyzer.h:25:10: fatal error: arm_math.h: No such file or directory

#include <arm_math.h>

^~~~~~~~~~~~

compilation terminated.

exit status 1
Error compiling for board Arduino Nano.

I have very little experience with Arduino, except for flashing a few neo pixel thing and this one has seem to have defeated my google skills.

Can anyone give me a few tips on how to fix this?

arm_math.h: No such file or directory

 #include <arm_math.h>

It looks like you have not installed a library that the sketch requires

This may or may not be what you require arm_math.h

Note that the comments in the file say

Target Processor: Cortex-M7/Cortex-M4/Cortex-M3/Cortex-M0

Which Arduino board are you using ?

Seems to be part of this library.

UKHeliBob:

arm_math.h: No such file or directory

#include <arm_math.h>



It looks like you have not installed a library that the sketch requires

This may or may not be what you require [arm_math.h](https://github.com/ARM-software/CMSIS/blob/master/CMSIS/Include/arm_math.h)

Note that the comments in the file say


Target Processor: Cortex-M7/Cortex-M4/Cortex-M3/Cortex-M0




Which Arduino board are you using ?

I’m using a nano, I installed the blink code to make sure its working in the current configuration. I have to use the 328p (old boot loader) version

I’m not sure if I have been to that exact same page, but I went to one very similar via a google search but I was unable to download and add the library. When viewing the code on that page, what steps should I take to get that installed into my library?

Thanks for the help so far.

  1. Go here
  2. Click code button and download the ZIP
  3. In the IDE: Sketch-> Include Library -> Add .ZIP Library

More help here.

kelaifu:
I'm using a nano

What Bob was getting at in reply #1 is that the Nano doesn't have the right type of processor to be compatible with the Arduinosound library.

arm-math.h needs an ARM processor.

GypsumFantastic:
What Bob was getting at in reply #1 is that the Nano doesn't have the right type of processor to be compatible with the Arduinosound library.

arm-math.h needs an ARM processor.

That would explain why nothing I do seems to fix it then, but the code is written for the nano, so why is it causing this error? I've successfully programmed this nano with my current setup too, although not for audio projects.

this is what I am trying to make:

Thanks again for the help, really appreciate it after the hours of fruitless google

this is what I am trying to make:
GitHub - spherical-sound-society/glitch-storm

The glitch-storm sketch certainly appears to be written for AVR, and I don't see it trying to include the "Arduinosound" library anywhere. It compiles for Nano just fine, here.

C:\Users\MYPC\Documents\Arduino\sketch_aug21b*sketch_aug21b.ino*

Are you sure you're compiling what you think you're compiling?

westfw:
Are you sure you're compiling what you think you're compiling?

I'm sure I am not sure, for a good while I was using the wrong thing entirely, but following another persons questions and answers on a similar topic I ended up getting the code from here:

https://raw.githubusercontent.com/spherical-sound-society/glitch-storm/master/source-code/Glitch_Storm_v0.99/Glitch_Storm_v0.99.ino

and copy pasting it into IDE, but now that I think about it, I initially got an 'initsound was not declared at this scope' error, which was fixed (or maybe not) by loading the arduino sound library. I am guessing that this was the wrong library and this is the cause of the arm_audio problem.

I ended up getting the code from here:

https://raw.githubusercontent.com/spherical-sound-society/glitch-storm/master/source-code/Glitch_Storm_v0.99/Glitch_Storm_v0.99.ino

and copy pasting it into IDE, but now that I think about it, I initially got an 'initsound was not declared at this scope' error...

The sketch consists of two files. There is glitch_storm.ino - the main sketch file, and there is also ecuaciones.ino that provides some support functions and stuff, INCLUDING an "initsound()" function that is completely different than the initsound() from the "Arduino Sound Library."
You either need to cu&paste the missing file into a new tab, or download the whole .zip file from github (where it's already nicely packaged into arduino-compatible directories.)

westfw:
The sketch consists of two files. There is glitch_storm.ino - the main sketch file, and there is also ecuaciones.ino that provides some support functions and stuff, INCLUDING an "initsound()" function that is completely different than the initsound() from the "Arduino Sound Library."
You either need to cu&paste the missing file into a new tab, or download the whole .zip file from github (where it's already nicely packaged into arduino-compatible directories.)

jeeeesus, it really was that simple, I was going at the whole thing backwards and making everything 10x more difficult. Loaded the files as you described, programmed OK and its all working like a charm!

Some lessons were learnt, thanks to all that steered me in the right direction.