ESP32-EYE Tensorflow person detect idf.py build ninja error

SunBeenMoon
Posts: 2
Joined: Fri Apr 09, 2021 1:13 pm

ESP32-EYE Tensorflow person detect idf.py build ninja error

Postby SunBeenMoon » Fri Apr 09, 2021 1:27 pm

Hi,

I'm the embedded engineer and developer of the nota.ai.
We are pretty interesting of the awesome esp32!
However error is occur.

In tensorflow lite micro, I built the esp32 person detection example.
https://github.com/tensorflow/tensorflo ... g-on-esp32

I also downloaded the esp32-camer in components/ dir.

Th error log is below.

Code: Select all

msb@msb-VirtualBox:/usr/my/tensorflow/tensorflow/lite/micro/tools/make/gen/esp_xtensa-esp32_default/prj/person_detection/esp-idf$ idf.py build
Executing action: all (aliases: build)
Running ninja in directory /usr/my/tensorflow/tensorflow/lite/micro/tools/make/gen/esp_xtensa-esp32_default/prj/person_detection/esp-idf/build
Executing "ninja all"...
[1/98] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/esp/app_camera_esp.c.obj
FAILED: esp-idf/main/CMakeFiles/__idf_main.dir/esp/app_camera_esp.c.obj 
/home/msb/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -Iconfig -I/usr/my/esp/esp-idf/components/newlib/platform_include -I/usr/my/esp/esp-idf/components/freertos/include -I/usr/my/esp/esp-idf/components/freertos/port/xtensa/include -I/usr/my/esp/esp-idf/components/esp_hw_support/include -I/usr/my/esp/esp-idf/components/esp_hw_support/port/esp32/. -I/usr/my/esp/esp-idf/components/heap/include -I/usr/my/esp/esp-idf/components/log/include -I/usr/my/esp/esp-idf/components/lwip/include/apps -I/usr/my/esp/esp-idf/components/lwip/include/apps/sntp -I/usr/my/esp/esp-idf/components/lwip/lwip/src/include -I/usr/my/esp/esp-idf/components/lwip/port/esp32/include -I/usr/my/esp/esp-idf/components/lwip/port/esp32/include/arch -I/usr/my/esp/esp-idf/components/soc/include -I/usr/my/esp/esp-idf/components/soc/esp32/. -I/usr/my/esp/esp-idf/components/soc/esp32/include -I/usr/my/esp/esp-idf/components/hal/esp32/include -I/usr/my/esp/esp-idf/components/hal/include -I/usr/my/esp/esp-idf/components/esp_rom/include -I/usr/my/esp/esp-idf/components/esp_rom/esp32 -I/usr/my/esp/esp-idf/components/esp_common/include -I/usr/my/esp/esp-idf/components/esp_system/include -I/usr/my/esp/esp-idf/components/esp32/include -I/usr/my/esp/esp-idf/components/driver/include -I/usr/my/esp/esp-idf/components/driver/esp32/include -I/usr/my/esp/esp-idf/components/esp_pm/include -I/usr/my/esp/esp-idf/components/esp_ringbuf/include -I/usr/my/esp/esp-idf/components/efuse/include -I/usr/my/esp/esp-idf/components/efuse/esp32/include -I/usr/my/esp/esp-idf/components/xtensa/include -I/usr/my/esp/esp-idf/components/xtensa/esp32/include -I/usr/my/esp/esp-idf/components/vfs/include -I/usr/my/esp/esp-idf/components/esp_wifi/include -I/usr/my/esp/esp-idf/components/esp_wifi/esp32/include -I/usr/my/esp/esp-idf/components/esp_event/include -I/usr/my/esp/esp-idf/components/esp_netif/include -I/usr/my/esp/esp-idf/components/esp_eth/include -I/usr/my/esp/esp-idf/components/tcpip_adapter/include -I/usr/my/esp/esp-idf/components/app_trace/include -I/usr/my/esp/esp-idf/components/esp_timer/include -I/usr/my/esp/esp-idf/components/mbedtls/port/include -I/usr/my/esp/esp-idf/components/mbedtls/mbedtls/include -I/usr/my/esp/esp-idf/components/mbedtls/esp_crt_bundle/include -I/usr/my/esp/esp-idf/components/app_update/include -I/usr/my/esp/esp-idf/components/spi_flash/include -I/usr/my/esp/esp-idf/components/bootloader_support/include -I/usr/my/esp/esp-idf/components/esp_ipc/include -I/usr/my/esp/esp-idf/components/nvs_flash/include -I/usr/my/esp/esp-idf/components/pthread/include -I/usr/my/esp/esp-idf/components/esp_gdbstub/include -I/usr/my/esp/esp-idf/components/esp_gdbstub/xtensa -I/usr/my/esp/esp-idf/components/esp_gdbstub/esp32 -I/usr/my/esp/esp-idf/components/espcoredump/include -I/usr/my/esp/esp-idf/components/wpa_supplicant/include -I/usr/my/esp/esp-idf/components/wpa_supplicant/port/include -I/usr/my/esp/esp-idf/components/wpa_supplicant/include/esp_supplicant -I/usr/my/esp/esp-idf/components/perfmon/include -I/usr/my/esp/esp-idf/components/asio/asio/asio/include -I/usr/my/esp/esp-idf/components/asio/port/include -I/usr/my/esp/esp-idf/components/cbor/port/include -I/usr/my/esp/esp-idf/components/unity/include -I/usr/my/esp/esp-idf/components/unity/unity/src -I/usr/my/esp/esp-idf/components/cmock/CMock/src -I/usr/my/esp/esp-idf/components/coap/port/include -I/usr/my/esp/esp-idf/components/coap/port/include/coap -I/usr/my/esp/esp-idf/components/coap/libcoap/include -I/usr/my/esp/esp-idf/components/coap/libcoap/include/coap2 -I/usr/my/esp/esp-idf/components/console -I/usr/my/esp/esp-idf/components/nghttp/port/include -I/usr/my/esp/esp-idf/components/nghttp/nghttp2/lib/includes -I/usr/my/esp/esp-idf/components/esp-tls -I/usr/my/esp/esp-idf/components/esp-tls/esp-tls-crypto -I../components/esp32-camera/driver/include -I../components/esp32-camera/conversions/include -I/usr/my/esp/esp-idf/components/esp_adc_cal/include -I/usr/my/esp/esp-idf/components/esp_hid/include -I/usr/my/esp/esp-idf/components/tcp_transport/include -I/usr/my/esp/esp-idf/components/esp_http_client/include -I/usr/my/esp/esp-idf/components/esp_http_server/include -I/usr/my/esp/esp-idf/components/esp_https_ota/include -I/usr/my/esp/esp-idf/components/protobuf-c/protobuf-c -I/usr/my/esp/esp-idf/components/protocomm/include/common -I/usr/my/esp/esp-idf/components/protocomm/include/security -I/usr/my/esp/esp-idf/components/protocomm/include/transports -I/usr/my/esp/esp-idf/components/mdns/include -I/usr/my/esp/esp-idf/components/esp_local_ctrl/include -I/usr/my/esp/esp-idf/components/sdmmc/include -I/usr/my/esp/esp-idf/components/esp_serial_slave_link/include -I/usr/my/esp/esp-idf/components/esp_websocket_client/include -I/usr/my/esp/esp-idf/components/expat/expat/expat/lib -I/usr/my/esp/esp-idf/components/expat/port/include -I/usr/my/esp/esp-idf/components/wear_levelling/include -I/usr/my/esp/esp-idf/components/fatfs/diskio -I/usr/my/esp/esp-idf/components/fatfs/vfs -I/usr/my/esp/esp-idf/components/fatfs/src -I/usr/my/esp/esp-idf/components/freemodbus/common/include -I/usr/my/esp/esp-idf/components/idf_test/include -I/usr/my/esp/esp-idf/components/idf_test/include/esp32 -I/usr/my/esp/esp-idf/components/jsmn/include -I/usr/my/esp/esp-idf/components/json/cJSON -I/usr/my/esp/esp-idf/components/libsodium/libsodium/src/libsodium/include -I/usr/my/esp/esp-idf/components/libsodium/port_include -I/usr/my/esp/esp-idf/components/mqtt/esp-mqtt/include -I/usr/my/esp/esp-idf/components/openssl/include -I/usr/my/esp/esp-idf/components/spiffs/include -I/usr/my/esp/esp-idf/components/ulp/include -I/usr/my/esp/esp-idf/components/wifi_provisioning/include -I../components/tfmicro -I../components/tfmicro/third_party/gemmlowp -I../components/tfmicro/third_party/flatbuffers/include -I../components/tfmicro/third_party/ruy -I../components/tfmicro/third_party/kissfft -mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -O2 -fmacro-prefix-map=/usr/my/tensorflow/tensorflow/lite/micro/tools/make/gen/esp_xtensa-esp32_default/prj/person_detection/esp-idf=. -fmacro-prefix-map=/usr/my/esp/esp-idf=IDF -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v4.4-dev-744-g1cb31e509\" -DESP_PLATFORM -DTF_LITE_STATIC_MEMORY -MD -MT esp-idf/main/CMakeFiles/__idf_main.dir/esp/app_camera_esp.c.obj -MF esp-idf/main/CMakeFiles/__idf_main.dir/esp/app_camera_esp.c.obj.d -o esp-idf/main/CMakeFiles/__idf_main.dir/esp/app_camera_esp.c.obj -c ../main/esp/app_camera_esp.c
../main/esp/app_camera_esp.c: In function 'app_camera_init':
../main/esp/app_camera_esp.c:35:3: error: unknown type name 'camera_config_t'
   camera_config_t config;
   ^~~~~~~~~~~~~~~
../main/esp/app_camera_esp.c:36:9: error: request for member 'ledc_channel' in something not a structure or union
   config.ledc_channel = LEDC_CHANNEL_0;
         ^
../main/esp/app_camera_esp.c:36:25: error: 'LEDC_CHANNEL_0' undeclared (first use in this function)
   config.ledc_channel = LEDC_CHANNEL_0;
                         ^~~~~~~~~~~~~~
../main/esp/app_camera_esp.c:36:25: note: each undeclared identifier is reported only once for each function it appears in
../main/esp/app_camera_esp.c:37:9: error: request for member 'ledc_timer' in something not a structure or union
   config.ledc_timer = LEDC_TIMER_0;
         ^
../main/esp/app_camera_esp.c:37:23: error: 'LEDC_TIMER_0' undeclared (first use in this function); did you mean '__TIME__'?
   config.ledc_timer = LEDC_TIMER_0;
                       ^~~~~~~~~~~~
                       __TIME__
../main/esp/app_camera_esp.c:38:9: error: request for member 'pin_d0' in something not a structure or union
   config.pin_d0 = Y2_GPIO_NUM;
         ^
../main/esp/app_camera_esp.c:38:19: error: 'Y2_GPIO_NUM' undeclared (first use in this function)
   config.pin_d0 = Y2_GPIO_NUM;
                   ^~~~~~~~~~~
../main/esp/app_camera_esp.c:39:9: error: request for member 'pin_d1' in something not a structure or union
   config.pin_d1 = Y3_GPIO_NUM;
         ^
../main/esp/app_camera_esp.c:39:19: error: 'Y3_GPIO_NUM' undeclared (first use in this function)
   config.pin_d1 = Y3_GPIO_NUM;
                   ^~~~~~~~~~~
../main/esp/app_camera_esp.c:40:9: error: request for member 'pin_d2' in something not a structure or union
   config.pin_d2 = Y4_GPIO_NUM;
         ^
../main/esp/app_camera_esp.c:40:19: error: 'Y4_GPIO_NUM' undeclared (first use in this function)
   config.pin_d2 = Y4_GPIO_NUM;
                   ^~~~~~~~~~~
../main/esp/app_camera_esp.c:41:9: error: request for member 'pin_d3' in something not a structure or union
   config.pin_d3 = Y5_GPIO_NUM;
         ^
../main/esp/app_camera_esp.c:41:19: error: 'Y5_GPIO_NUM' undeclared (first use in this function)
   config.pin_d3 = Y5_GPIO_NUM;
                   ^~~~~~~~~~~
../main/esp/app_camera_esp.c:42:9: error: request for member 'pin_d4' in something not a structure or union
   config.pin_d4 = Y6_GPIO_NUM;
         ^
../main/esp/app_camera_esp.c:42:19: error: 'Y6_GPIO_NUM' undeclared (first use in this function)
   config.pin_d4 = Y6_GPIO_NUM;
                   ^~~~~~~~~~~
../main/esp/app_camera_esp.c:43:9: error: request for member 'pin_d5' in something not a structure or union
   config.pin_d5 = Y7_GPIO_NUM;
         ^
../main/esp/app_camera_esp.c:43:19: error: 'Y7_GPIO_NUM' undeclared (first use in this function)
   config.pin_d5 = Y7_GPIO_NUM;
                   ^~~~~~~~~~~
../main/esp/app_camera_esp.c:44:9: error: request for member 'pin_d6' in something not a structure or union
   config.pin_d6 = Y8_GPIO_NUM;
         ^
../main/esp/app_camera_esp.c:44:19: error: 'Y8_GPIO_NUM' undeclared (first use in this function)
   config.pin_d6 = Y8_GPIO_NUM;
                   ^~~~~~~~~~~
../main/esp/app_camera_esp.c:45:9: error: request for member 'pin_d7' in something not a structure or union
   config.pin_d7 = Y9_GPIO_NUM;
         ^
../main/esp/app_camera_esp.c:45:19: error: 'Y9_GPIO_NUM' undeclared (first use in this function)
   config.pin_d7 = Y9_GPIO_NUM;
                   ^~~~~~~~~~~
../main/esp/app_camera_esp.c:46:9: error: request for member 'pin_xclk' in something not a structure or union
   config.pin_xclk = XCLK_GPIO_NUM;
         ^
../main/esp/app_camera_esp.c:46:21: error: 'XCLK_GPIO_NUM' undeclared (first use in this function)
   config.pin_xclk = XCLK_GPIO_NUM;
                     ^~~~~~~~~~~~~
../main/esp/app_camera_esp.c:47:9: error: request for member 'pin_pclk' in something not a structure or union
   config.pin_pclk = PCLK_GPIO_NUM;
         ^
../main/esp/app_camera_esp.c:47:21: error: 'PCLK_GPIO_NUM' undeclared (first use in this function)
   config.pin_pclk = PCLK_GPIO_NUM;
                     ^~~~~~~~~~~~~
../main/esp/app_camera_esp.c:48:9: error: request for member 'pin_vsync' in something not a structure or union
   config.pin_vsync = VSYNC_GPIO_NUM;
         ^
../main/esp/app_camera_esp.c:48:22: error: 'VSYNC_GPIO_NUM' undeclared (first use in this function)
   config.pin_vsync = VSYNC_GPIO_NUM;
                      ^~~~~~~~~~~~~~
../main/esp/app_camera_esp.c:49:9: error: request for member 'pin_href' in something not a structure or union
   config.pin_href = HREF_GPIO_NUM;
         ^
../main/esp/app_camera_esp.c:49:21: error: 'HREF_GPIO_NUM' undeclared (first use in this function)
   config.pin_href = HREF_GPIO_NUM;
                     ^~~~~~~~~~~~~
../main/esp/app_camera_esp.c:50:9: error: request for member 'pin_sscb_sda' in something not a structure or union
   config.pin_sscb_sda = SIOD_GPIO_NUM;
         ^
../main/esp/app_camera_esp.c:50:25: error: 'SIOD_GPIO_NUM' undeclared (first use in this function)
   config.pin_sscb_sda = SIOD_GPIO_NUM;
                         ^~~~~~~~~~~~~
../main/esp/app_camera_esp.c:51:9: error: request for member 'pin_sscb_scl' in something not a structure or union
   config.pin_sscb_scl = SIOC_GPIO_NUM;
         ^
../main/esp/app_camera_esp.c:51:25: error: 'SIOC_GPIO_NUM' undeclared (first use in this function)
   config.pin_sscb_scl = SIOC_GPIO_NUM;
                         ^~~~~~~~~~~~~
../main/esp/app_camera_esp.c:52:9: error: request for member 'pin_pwdn' in something not a structure or union
   config.pin_pwdn = PWDN_GPIO_NUM;
         ^
../main/esp/app_camera_esp.c:52:21: error: 'PWDN_GPIO_NUM' undeclared (first use in this function)
   config.pin_pwdn = PWDN_GPIO_NUM;
                     ^~~~~~~~~~~~~
../main/esp/app_camera_esp.c:53:9: error: request for member 'pin_reset' in something not a structure or union
   config.pin_reset = -1;  // RESET_GPIO_NUM;
         ^
../main/esp/app_camera_esp.c:54:9: error: request for member 'xclk_freq_hz' in something not a structure or union
   config.xclk_freq_hz = XCLK_FREQ;
         ^
../main/esp/app_camera_esp.c:54:25: error: 'XCLK_FREQ' undeclared (first use in this function)
   config.xclk_freq_hz = XCLK_FREQ;
                         ^~~~~~~~~
../main/esp/app_camera_esp.c:55:9: error: request for member 'pixel_format' in something not a structure or union
   config.pixel_format = CAMERA_PIXEL_FORMAT;
         ^
../main/esp/app_camera_esp.c:55:25: error: 'CAMERA_PIXEL_FORMAT' undeclared (first use in this function)
   config.pixel_format = CAMERA_PIXEL_FORMAT;
                         ^~~~~~~~~~~~~~~~~~~
../main/esp/app_camera_esp.c:56:9: error: request for member 'frame_size' in something not a structure or union
   config.frame_size = CAMERA_FRAME_SIZE;
         ^
../main/esp/app_camera_esp.c:56:23: error: 'CAMERA_FRAME_SIZE' undeclared (first use in this function)
   config.frame_size = CAMERA_FRAME_SIZE;
                       ^~~~~~~~~~~~~~~~~
../main/esp/app_camera_esp.c:57:9: error: request for member 'jpeg_quality' in something not a structure or union
   config.jpeg_quality = 10;
         ^
../main/esp/app_camera_esp.c:58:9: error: request for member 'fb_count' in something not a structure or union
   config.fb_count = 1;
         ^
../main/esp/app_camera_esp.c:61:3: error: unknown type name 'esp_err_t'
   esp_err_t err = esp_camera_init(&config);
   ^~~~~~~~~
../main/esp/app_camera_esp.c:61:19: error: implicit declaration of function 'esp_camera_init'; did you mean 'app_camera_init'? [-Werror=implicit-function-declaration]
   esp_err_t err = esp_camera_init(&config);
                   ^~~~~~~~~~~~~~~
                   app_camera_init
../main/esp/app_camera_esp.c:62:14: error: 'ESP_OK' undeclared (first use in this function)
   if (err != ESP_OK) {
              ^~~~~~
../main/esp/app_camera_esp.c:63:5: error: implicit declaration of function 'ESP_LOGE'; did you mean 'ESP_PLATFORM'? [-Werror=implicit-function-declaration]
     ESP_LOGE(TAG, "Camera init failed with error 0x%x", err);
     ^~~~~~~~
     ESP_PLATFORM
cc1: some warnings being treated as errors
[2/98] Performing build step for 'bootloader'
ninja: no work to do.
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
Do you have solution about this problem?

I also uploaded in tensorflow issue part
https://github.com/tensorflow/tensorflow/pull/47063

SunBeenMoon
Posts: 2
Joined: Fri Apr 09, 2021 1:13 pm

Re: ESP32-EYE Tensorflow person detect idf.py build ninja error

Postby SunBeenMoon » Mon Apr 12, 2021 4:58 am

Hi, I fix the problem.

Not int the tensorflow official github. I should have to build the project in espressif official github.

Who is online

Users browsing this forum: StanInexeon and 142 guests