I am gettting error whiile compiling arduino code

C:\Users\hp\Documents\Arduino\libraries\project1_96_0.1_imgsize96_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\add.cpp:530:20: fatal error: esp_nn.h: No such file or directory
compilation terminated.

1 week ago same project was running fine but now when i downloaded the arduino build it is not running and giving above error.

Hi, for which target are you trying to compile for? Are you using the Arduino IDE or CLI?

I am using arduino ide. This is arduino build : ei-mnv2_96_0.35_96imgsize-arduino-1.0.3.zip - Google Drive. The main problem is that the same build was running fine 1 week ago but now it is not running and giving error of there is no such file or directory esp_nn.h.

Hi there, I am getting the same error. Unable to compile in Arduino IDE. Its complaining about esp_nn.h. In previous libraries, this file did not exist. Do we need to download esp_nn components and copy it to the sdk folder before compilation in Arduino IDE?

in some build esp_nn.h was available but still that was running but now it is not running it is not problem of esp_nn.h it is problem of something else as far i can think

mnv2_96_0.35_96imgsize_inferencing\src\edge-impulse-sdk\porting\espressif\ESP-NN\include this is the file location of esp_nn.h

yes. it used to work fine couple of weeks ago. not sure what happened.

Hi, @jenny , I am experiencing the same problem. It used to work about 2 weeks ago without a problem using Arudino IDE. Same library that worked before and if I download it again and try to compile Arduino code fails as shown in screen shots below.

Have you solve this problem?
I have the same problem as you, by using Arduino IDE for an ESP32 board.
Thanks a lot.

No not yet. We are stuck too. Waiting for a response from Edge Impulse team.

Hi @akashkumar and @Pigeoncnc ,

Best I can tell, it looks like the ESP-NN framework is not getting included when you download the Arduino library from Edge Impulse. I filed a bug for that here: esp_nn.h missing (at least for Arduino library builds) · Issue #8 · edgeimpulse/inferencing-sdk-cpp · GitHub

As a workaround, you might be able to bring the esp_nn framework into your project (https://github.com/edgeimpulse/esp-nn). That will likely be a lot of effort in Arduino, though :sweat_smile:

@AIWintermuteAI Any thoughts on this?

We do not actually support (or test) Arduino builds for ESP32 - the recommended way to run impulse on ESP32 chips is to use ESP IDF, as described in the documentation

The issue you encountering is related to recent update to Edge Impulse SDK, where we included ESP NN into SDK. In future we plan to provide Arduino sketch examples for ESP32, but I cannot give you a definite date on when this might happen.
To fix your builds now I recommend switching off ESP NN acceleration
to do that locate ei_classifier_config.h in exported Arduino library folder and add
on line 25.
Additionally you might encounter the linker error when trying to use ESP32 with Arduino IDE. If you do, change line 139 in src/edge-impulse-sdk/porting/ei_classifier_porting.h to
After that your project should build properly.

1 Like

Thank you for the quick turnaround. I did test the above suggestions and the deployed library compiles perfectly in Arduino IDE now.

Thanks to your suggestion, it works now.

Hi @AIWintermuteAI , Is this issue resolved now? Because I still had to do the tweaks you have mentioned above to compile it on Arduino IDE. Thanks.