Issue deploying ESP32 Object Detection model

Question/Issue:
Good morning. I would like to start by saying I am a huge fan of your software. However, since trying to deploy the object detection program I made on your platform, I have been having a file issue. During the compilation of the program, I receive an exit status 1 error. I have tried rebuilding, retraining, and redownloading the library multiple times to no avail. When attempting to debug the error, I find that the esp32_camera.ino.elf file does not exist. When I trace the path location, I find a file that is
listed as esp32_camera.ino.bootloader.bin instead of esp32_camera.ino.elf. I believe this is the root of my problem, however, any help you could provide towards this issue would be greatly appreciated.

Environment:

  • Platform: [ESP-32]
  • Build Environment Details: [Arduino IDE 2.3.2]
  • OS Version: [Windows 11]
  • Project Version: [e.g., 1.0.8]

Logs/Attachments: - Last lines of IDE output of the error
d:\My Documents\Arduino\libraries\test_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\depthwise_conv.cpp: In function ‘void tflite::{anonymous}::EvalQuantizedPerChannel(TfLiteContext*, TfLiteNode*, const TfLiteDepthwiseConvParams&, const NodeData&, const TfLiteEvalTensor*, const TfLiteEvalTensor*, const TfLiteEvalTensor*, TfLiteEvalTensor*)’:
d:\My Documents\Arduino\libraries\test_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\depthwise_conv.cpp:1727:58: error: either all initializer clauses should be designated or none of them should be
1727 | .channels = input_depth, 1
| ^
d:\My Documents\Arduino\libraries\test_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\depthwise_conv.cpp:1731:59: error: either all initializer clauses should be designated or none of them should be
1731 | .channels = output_depth, 1
| ^
d:\My Documents\Arduino\libraries\test_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\depthwise_conv.cpp:1733:80: error: either all initializer clauses should be designated or none of them should be
1733 | data_dims_t filter_dims = {.width = filter_width, .height = filter_height, 0, 0};
| ^
d:\My Documents\Arduino\libraries\test_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\depthwise_conv.cpp: In function ‘TfLiteStatus tflite::{anonymous}::Prepare(TfLiteContext*, TfLiteNode*)’:
d:\My Documents\Arduino\libraries\test_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\depthwise_conv.cpp:1836:67: error: either all initializer clauses should be designated or none of them should be
1836 | .channels = input->dims->data[3], 1
| ^
d:\My Documents\Arduino\libraries\test_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\depthwise_conv.cpp:1840:68: error: either all initializer clauses should be designated or none of them should be
1840 | .channels = output->dims->data[3], 1
| ^
d:\My Documents\Arduino\libraries\test_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\depthwise_conv.cpp:1842:80: error: either all initializer clauses should be designated or none of them should be
1842 | data_dims_t filter_dims = {.width = filter_width, .height = filter_height, 0, 0};
| ^
d:\My Documents\Arduino\libraries\test_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\conv.cpp: In function ‘TfLiteStatus tflite::{anonymous}::Prepare(TfLiteContext*, TfLiteNode*)’:
d:\My Documents\Arduino\libraries\test_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\conv.cpp:1789:67: error: either all initializer clauses should be designated or none of them should be
1789 | .channels = input->dims->data[3], 1
| ^
d:\My Documents\Arduino\libraries\test_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\conv.cpp:1793:68: error: either all initializer clauses should be designated or none of them should be
1793 | .channels = output->dims->data[3], 1
| ^
d:\My Documents\Arduino\libraries\test_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\conv.cpp:1795:80: error: either all initializer clauses should be designated or none of them should be
1795 | data_dims_t filter_dims = {.width = filter_width, .height = filter_height, 0, 0};
| ^
d:\My Documents\Arduino\libraries\test_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\conv.cpp: In function ‘void tflite::{anonymous}::EvalQuantizedPerChannel(TfLiteContext*, TfLiteNode*, const TfLiteConvParams&, const NodeData&, const TfLiteEvalTensor*, const TfLiteEvalTensor*, const TfLiteEvalTensor*, TfLiteEvalTensor*)’:
d:\My Documents\Arduino\libraries\test_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\conv.cpp:1883:58: error: either all initializer clauses should be designated or none of them should be
1883 | .channels = input_depth, 1
| ^
d:\My Documents\Arduino\libraries\test_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\conv.cpp:1887:59: error: either all initializer clauses should be designated or none of them should be
1887 | .channels = output_depth, 1
| ^
d:\My Documents\Arduino\libraries\test_inferencing\src\edge-impulse-sdk\tensorflow\lite\micro\kernels\conv.cpp:1889:80: error: either all initializer clauses should be designated or none of them should be
1889 | data_dims_t filter_dims = {.width = filter_width, .height = filter_height, 0, 0};
| ^

Using library test_inferencing at version 1.0.8 in folder: D:\My Documents\Arduino\libraries\test_inferencing
exit status 1

Compilation error: exit status 1

1 Like

Hi @mchapm1 welcome to the forum glad you are enjoying our platform!

The errors you are encountering look like a discrepancies in the way initializer clauses are being handled in your C++ environment. This is related to how different versions of the compiler interpret and enforce syntax rules. Not sure why you would be seeing that here. Sometimes it can be dues to too long of a path for the install dir or project dir see: https://docs.edgeimpulse.com/docs/run-inference/arduino-library#code-compiling-fails-under-windows-os

Have you followed our Arduino library guide? https://docs.edgeimpulse.com/docs/run-inference/arduino-library

Best

Eoin