Error while trying to compile deployment example to ESP32 dev module

Hi all,

I recently created a project deployment library for object recognition.

My environment:
Arduino Studio, version 2.2.1
Linux
My camera module is an ESP32-WRover, but it has been configured for development, therefore it is ESP32 Dev Module

I get this tensorflow-related error when i try to compile the ESP32 Cam example that came with my deployment.

edge-impulse-sdk/tensorflow/lite/micro/kernels/softmax.cpp:301:14: error: return-statement with a value, in function returning 'void' [-fpermissive]
       return kTfLiteError;

and my IDE hangs. the only way to restart it is by doing a

killall -9 arduino-ide

my question:
does an Edge Impulse deployment work with an ESP32 Dev Module?

what is also interesting is when i try to verify the static buffer example, i get the same error listed above.

Please advise. Your help will be greatly appreciated.

Thanks in advance,
rey malahay

hi all,

please disregard this issue. i resolved it by deleting the libraries directory and reinstalling my dependencies.

thanks all the same.

I ran into this as well, and I had to make source code changes to fix the compiler errors. For example, the example mentioned above is a void function that returns a value, which will result in a compiler error. I haven’t found another workaround, since the source code with the errors is the code exported into the zip file when deploying as Arduino.

I wonder if there’s a way to submit code fixes?

In my case, to repro the issue:

  1. Deploy any model as Arduino
  2. In Arduino IDE, Sketch->IncludeLibrary->AddZipLibrary
  3. Select Xiao ESP32-C3
  4. Build Static Buffer example

I had to make small changes in the below files:

  • tensorflow\lite\micro\kernels\conv.cpp
  • tensorflow\lite\micro\kernels\depthwise_conv.cpp
  • tensorflow\lite\micro\kernels\softmax.cpp
1 Like

hi @MicroMasjien ,

thank you for your response.

i discovered why my examples will not compile. i was using arduino-esp32 version 1.0.6. this is the last version before 2.0.1. from version 2.0.1 onwards, the examples compile and deploy to my ESP32-WRover, but the camera will not initialize.

kind regards,
rey malahay

Interesting, I’m currently on “Arduino Alpha 3 Release v3.0.0”

I also get the error but only for the unoptimized (float32) version of the Arduino library, the quantized (int8) version compiles smoothly.

Joerg