project_description.json not found while flashing

pej-p00
Posts: 2
Joined: Tue May 23, 2023 6:50 am

project_description.json not found while flashing

Postby pej-p00 » Tue May 23, 2023 8:00 am

I've been trying to flash an esp32s3 (Lilygo t-display s3) with the idf.py tool but I'm receiving the following error message;
  1. idf.py -p /dev/ttyACM0 flash
  2. Executing action: flash
  3. Traceback (most recent call last):
  4.   File "/home/user/esp/esp-idf/tools/idf.py", line 775, in <module>
  5.     main()
  6.   File "/home/user/esp/esp-idf/tools/idf.py", line 710, in main
  7.     cli(sys.argv[1:], prog_name=PROG, complete_var=SHELL_COMPLETE_VAR)
  8.   File "/home/user/.espressif/python_env/idf5.2_py3.11_env/lib/python3.11/site-packages/click/core.py", line 1130, in __call__
  9.     return self.main(*args, **kwargs)
  10.            ^^^^^^^^^^^^^^^^^^^^^^^^^^
  11.   File "/home/user/.espressif/python_env/idf5.2_py3.11_env/lib/python3.11/site-packages/click/core.py", line 1055, in main
  12.     rv = self.invoke(ctx)
  13.          ^^^^^^^^^^^^^^^^
  14.   File "/home/user/.espressif/python_env/idf5.2_py3.11_env/lib/python3.11/site-packages/click/core.py", line 1689, in invoke
  15.     return _process_result(rv)
  16.            ^^^^^^^^^^^^^^^^^^^
  17.   File "/home/user/.espressif/python_env/idf5.2_py3.11_env/lib/python3.11/site-packages/click/core.py", line 1626, in _process_result
  18.     value = ctx.invoke(self._result_callback, value, **ctx.params)
  19.             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  20.   File "/home/user/.espressif/python_env/idf5.2_py3.11_env/lib/python3.11/site-packages/click/core.py", line 760, in invoke
  21.     return __callback(*args, **kwargs)
  22.            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  23.   File "/home/user/esp/esp-idf/tools/idf.py", line 613, in execute_tasks
  24.     task(ctx, global_args, task.action_args)
  25.   File "/home/user/esp/esp-idf/tools/idf.py", line 185, in __call__
  26.     self.callback(self.name, context, global_args, **action_args)
  27.   File "/home/user/esp/esp-idf/tools/idf_py_actions/serial_ext.py", line 175, in flash
  28.     project_desc = _get_project_desc(ctx, args)
  29.                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  30.   File "/home/user/esp/esp-idf/tools/idf_py_actions/serial_ext.py", line 47, in _get_project_desc
  31.     with open(desc_path, 'r') as f:
  32.          ^^^^^^^^^^^^^^^^^^^^
  33. FileNotFoundError: [Errno 2] No such file or directory: '/home/user/my-project/build/project_description.json'

The sample code from https://docs.espressif.com/projects/esp ... requisites works just fine. Any ideas on what I could be doing wrong?

Kind regards

User avatar
ESP_Roland
Posts: 265
Joined: Tue Oct 09, 2018 10:28 am

Re: project_description.json not found while flashing

Postby ESP_Roland » Tue May 23, 2023 12:20 pm

Have you run "idf.py build" successfully? Maybe check the logs from there first.

pej-p00
Posts: 2
Joined: Tue May 23, 2023 6:50 am

Re: project_description.json not found while flashing

Postby pej-p00 » Wed May 24, 2023 8:05 am

I think I found the mistake. I'm trying to build a GUI with the Slint toolkit. Because it showed an include error;
  1. -c /home/user/esp/ui/main/main.cpp
  2. /home/user/esp/ui/main/main.cpp:1:10: fatal error: ../build/main.h: No such file or directory
  3.     1 | #include "../build/main.h"
  4.       |          ^~~~~~~~~~~~~~~~~
  5. compilation terminated.
  6. [924/938] Building C object esp-idf/wifi_provisioning/CMakeFiles/__idf_wifi_provisioning.dir/src/manager.c.objninja: build stopped: subcommand failed.
I changed the order of the instructions in CMakeLists so that Slint could generate the missing header first. And while it then actually built (binary was executable), it seems that not the whole build process had actually finished correctly. But now I'm back to the include error mentioned above. Do you see any way around it?

current CMakeLists.txt;
  1. cmake_minimum_required(VERSION 3.21)
  2.  
  3. include($ENV{IDF_PATH}/tools/cmake/project.cmake)
  4. project(ui LANGUAGES CXX)
  5.  
  6. find_package(Slint QUIET)
  7. if (NOT Slint_FOUND)
  8.   message("Slint could not be located in the CMake module search path. Downloading it from Git and building it locally")
  9.   include(FetchContent)
  10.   FetchContent_Declare(
  11.     Slint
  12.     GIT_REPOSITORY https://github.com/slint-ui/slint.git
  13.     # `release/1` will auto-upgrade to the latest Slint >= 1.0.0 and < 2.0.0
  14.     # `release/1.0` will auto-upgrade to the latest Slint >= 1.0.0 and < 1.1.0
  15.     GIT_TAG release/1
  16.     SOURCE_SUBDIR api/cpp
  17.   )
  18.   FetchContent_MakeAvailable(Slint)
  19. endif (NOT Slint_FOUND)
  20.  
  21. add_executable(ui main/main.cpp)
  22. slint_target_sources(ui main/main.slint)
  23. target_link_libraries(ui PRIVATE Slint::Slint)
  24. # On Windows, copy the Slint DLL next to the application binary so that it's found.
  25. if (WIN32)
  26.     add_custom_command(TARGET ui POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_RUNTIME_DLLS:ui> $<TARGET_FILE_DIR:ui> COMMAND_EXPAND_LISTS)
  27. endif()

Who is online

Users browsing this forum: No registered users and 59 guests