I am trying to setup the ESP-EYE for TFlite.
I have been able to set up the ESP-EYE for basic setup as per: https://docs.espressif.com/projects/esp-idf/en/stable/get-started/index.html. I am also able to use the AWS IoT example https://github.com/espressif/esp-aws-iot/tree/master/examples.
For TFlite, I am trying out the example for ESP-EYE at https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/micro/examples/hello_world/README.md
Per the steps at the TFlite link above:
- Generate the examples The example project can be generated with the following command:
make -f tensorflow/lite/micro/tools/make/Makefile TARGET=esp generate_hello_world_esp_project
- Building the example Go the the example project directory
cd tensorflow/lite/micro/tools/make/gen/esp_xtensa-esp32/prj/hello_world/esp-idf
Then build with idf.py
idf.py build
I get this error repeatedly:
cc1plus: error: command line option '-std=c11' is valid for C/ObjC but not for C++ [-Werror]
cc1plus: error: command line option '-std=c11' is valid for C/ObjC but not for C++ [-Werror]
cc1plus: all warnings being treated as errors
The error does go away if I remove -Werror in the below line in components/tfmicro/CMakeLists.txt:
target_compile_options(${COMPONENT_LIB} PRIVATE $<$<COMPILE_LANGUAGE:CXX>: -std=c++11 -DTF_LITE_STATIC_MEMORY -Werror -Wsign-compare -Wdouble-promotion -Wshadow -Wunused-variable -Wmissing-field-initializers -Wunused-function -DNDEBUG -O3 -Wno-return-type -Wno-strict-aliasing -Wno-ignored-qualifiers -Wno-return-type -Wno-strict-aliasing -Wno-ignored-qualifiers -Wno-return-type -Wno-strict-aliasing -Wno-return-type -Wno-strict-aliasing >)
But the image when flashed, does not work. It keeps crashing with a register dump.
Has anyone else faced this issue?
Thanks!
I suppose you are trying the example on master branch. There are some issues with latest version of TF + ESP32 build it seems.
How about you checkout this tag:
https://github.com/tensorflow/tensorflow/tree/v2.2.0
and give a try!Also, please take a look at this MR: https://github.com/tensorflow/tensorflow/pull/42275
It fixes the build issue due to std11 flag.