espressif / esp-tflite-micro

TensorFlow Lite Micro for Espressif Chipsets
Apache License 2.0
359 stars 79 forks source link

Hello World Build and set target failed for ESP32-S3 #24

Closed priyanshu-makhiyaviya closed 1 year ago

priyanshu-makhiyaviya commented 1 year ago

@espressif/tflite-micro-esp-examples

System information

Host OS Platform and Distribution (e.g., Linux Ubuntu): Ubuntu 18.04
Target platform: ESP32-S3
IDF version release/v4.4

esspressif_tfliteMicro_hellowordesp32-s3.txt

Describe the problem

I am trying to set up the tflite micro esp HelloWorld example for ESP32-S3. when I tried to set the target using the command "idf.py set-target esp32s3", CMake failed.

_esspressif_tfliteMicro_hellowordesp32-s3.txt_

Please let me know how can i build and flash micro esp HelloWorld example for ESP32-S3.

Steps Followed:

Clone the TensorFlow repository: https://github.com/espressif/tflite-micro-esp-examples.git

Changed directory to example/hellowolrd cd /examples/hello_world

Set the IDF_TARGET idf.py set-target esp32s3

Attached is the log file for reference. Any suggestions for this issue?

vikramdattu commented 1 year ago

@priyanshu-makhiyaviya Unfortunately, this is not re-producible at my end. Must be some CMake + OS specific issue.

Can you please remove below line and try?

https://github.com/espressif/tflite-micro-esp-examples/blob/2a93aa3106f181768d75f64bcac629f344a2ca22/components/tflite-lib/CMakeLists.txt#L81

priyanshu-makhiyaviya commented 1 year ago

Thank you @vikramdattu , The build was successful after removing the above-mentioned line from CmakeList

After building the flash has not worked properly. It has stopped at "waiting for download"

_--- idf_monitor on /dev/ttyACM0 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x0 (DOWNLOAD(USB/UART0))
Saved PC:0x40041a76
waiting for download_

The full log file is attached for reference. 2_esspressif_tfliteMicro_hellowordesp32-s3.txt

Any suggestions for this issue?

vikramdattu commented 1 year ago

@priyanshu-makhiyaviya You've left the device in download mode. Simple reset should bring it in execution mode.

priyanshu-makhiyaviya commented 1 year ago

Hi @vikramdattu , Thank you for your support. It worked after resetting and flashing again.

There is one more thing that I really need to understand is,

Please help me to understand this.

Thank you.

vikramdattu commented 1 year ago

@priyanshu-makhiyaviya -DTF_LITE_STATIC_MEMORY this flag is legacy option, which is to chose static memory pool over runtime allocations. The option however, does not have any impact as of today. To be on the safer side (future changes could have use for the flag), I will add it in a way, it doesn't break on some CMake version.

Can you please share the CMake version you are using?

priyanshu-makhiyaviya commented 1 year ago

Hi @vikramdattu , I am using CMake version 3.10.2.

Thank you.