Compile error for ESP32S3

Hello

I’m trying to build the reference project firmware-espressif-esp32 for ESP32S3 chip using esp-idf v4.4 but getting this error:

CMake Error at /home/builder/esp/esp-idf/tools/cmake/component.cmake:471 (add_library):
Cannot find source file:

/home/builder/workspace/firmware-espressif-esp32/components/esp-nn/src/common/esp_nn_common_functions_esp32s3.S

Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
.hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc
Call Stack (most recent call first):
components/esp-nn/CMakeLists.txt:40 (idf_component_register)

CMake Error at /home/builder/esp/esp-idf/tools/cmake/component.cmake:471 (add_library):
No SOURCES given to target: __idf_esp-nn
Call Stack (most recent call first):
components/esp-nn/CMakeLists.txt:40 (idf_component_register)

I understand ESP32S3 is not a supposted chip by EI but I was wondering if there is a work around to be able to run the code on this chip?

Regards,
Sina

Hi.
Not sure if it will help you…
In the following tutorial for EI and Arduino IDE, Marcelo Rovai show how to DISABLE NN functions for the ESP32-S3 CHIP, which is not supported yet in EI Studio…

https://www.hackster.io/mjrobot/tinyml-made-easy-image-classification-cb42ae

Just change:
#define EI_CLASSIFIER_TFLITE_ENABLE_ESP_NN 1
to
#define EI_CLASSIFIER_TFLITE_ENABLE_ESP_NN 0
to disable NN functions…

The error you are getting may be related with it…
Have a look there, it may give you some hints about what to do…

Regards,
Valter

1 Like

Thanks Valter. I actually have had disabled the NN component but the compilation error is still there. I’m thinking it might be related to the esp-idf version. I’m using v4.4 but going to upgrade do v5.1 to see if it makes a difference.

1 Like

Hi!
So, there is a way you can run impulse with ESP NN acceleration on ESP32-S3:

You definitely want to be using esp-idf 4.4 and do not upgrade to 5.1.
Basically you have two routes:

  1. Disable ESP NN acceleration - if you are doing it when building standalone example, you’ll need to change the define in main/CMakeLists.txt
    -DEI_CLASSIFIER_TFLITE_ENABLE_ESP_NN=1) # enables ESP-NN optimizations by Espressif
  2. Follow the guide above and use modified ESP NN version - in this case you can leave the acceleration on. Note that it will only work with non-EON compiled models.
2 Likes