Example (Blink) project problem during compilation (ninja failed)

ProbGenRand
Posts: 1
Joined: Fri Jan 03, 2025 2:30 pm

Example (Blink) project problem during compilation (ninja failed)

Postby ProbGenRand » Sat Jan 04, 2025 10:40 am

So, at first, i'm using template "Blink" project for testing of my microcontroller.
During compilation i'm getting this error:
  1. Executing action: flash
  2. Running ninja in directory C:\ng\new_gox\build
  3. Executing "ninja flash"...
  4. [1/5] cmd.exe /C "cd /D C:\ng\new_gox\build\esp-idf\esptool_py && C:\Espressif\python_env\idf5.3_py3.11_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v5.3.1/components/partition_table/check_sizes.py --offset 0x8000 partition --type app C:/ng/new_gox/build/partition_table/partition-table.bin C:/ng/new_gox/build/blink.bin"
  5. blink.bin binary size 0x2d340 bytes. Smallest app partition is 0x100000 bytes. 0xd2cc0 bytes (82%) free.
  6.  
  7. [2/5] Performing build step for 'bootloader'
  8. [1/1] cmd.exe /C "cd /D C:\ng\new_gox\build\bootloader\esp-idf\esptool_py && C:\Espressif\python_env\idf5.3_py3.11_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v5.3.1/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 C:/ng/new_gox/build/bootloader/bootloader.bin"
  9.  
  10.  
  11. Bootloader binary size 0x6880 bytes. 0x780 bytes (7%) free.
  12.  
  13.  
  14.  
  15. [2/3] cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v5.3.1\components\esptool_py && C:\Espressif\tools\cmake\3.24.0\bin\cmake.exe -D IDF_PATH=C:/Espressif/frameworks/esp-idf-esptool.py --chip esp32 -p COM3 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 2MB 0x1000 bootloader/bootloader.bin 0x10000 blink.bin 0x8000 partition_table/partition-table.bin
  16.  
  17. esptool.py v4.8.1
  18.  
  19. Serial port COM3
  20.  
  21. Connecting......................................
  22.  
  23.  
  24.  
  25. A fatal error occurred: Failed to connect to ESP32: Wrong boot mode detected (0x13)! The chip needs to be in download mode.
  26.  
  27. For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
  28.  
  29. CMake Error at run_serial_tool.cmake:66 (message):
  30.  
  31.   C:/Espressif/python_env/idf5.3_py3.11_env/Scripts/python.exe;;C:/Espressif/frameworks/esp-idf-v5.3.1/components/esptool_py/esptool/esptool.py;--chip;esp32
  32.   failed.
  33.  
  34.  
  35.  
  36. v5.3.1 -D SERIAL_TOOL=C:/Espressif/python_env/idf5.3_py3.11_env/Scripts/python.exe;;C:/Espressif/frameworks/esp-idf-v5.3.1/components/esptool_py/esptool/esptool.py;--chip;esp32 -D SERIAL_TOOL_ARGS=--before=default_reset;--after=hard_reset;write_flash;@flash_args -D WORKING_DIRECTORY=C:/ng/new_gox/build -P C:/Espressif/frameworks/esp-idf-v5.3.1/components/esptool_py/run_serial_tool.cmake"
  37.  
  38. FAILED: CMakeFiles/flash C:/ng/new_gox/build/CMakeFiles/flash
  39.  
  40. cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v5.3.1\components\esptool_py && C:\Espressif\tools\cmake\3.24.0\bin\cmake.exe -D IDF_PATH=C:/Espressif/frameworks/esp-idf-v5.3.1 -D SERIAL_TOOL=C:/Espressif/python_env/idf5.3_py3.11_env/Scripts/python.exe;;C:/Espressif/frameworks/esp-idf-v5.3.1/components/esptool_py/esptool/esptool.py;--chip;esp32 -D SERIAL_TOOL_ARGS=--before=default_reset;--after=hard_reset;write_flash;@flash_args -D WORKING_DIRECTORY=C:/ng/new_gox/build -P C:/Espressif/frameworks/esp-idf-v5.3.1/components/esptool_py/run_serial_tool.cmake"
  41.  
  42. ninja: build stopped: subcommand failed.
  43.  
  44. ninja failed with exit code 1, output of the command is in the C:\ng\new_gox\build\log\idf_py_stderr_output_9672 and C:\ng\new_gox\build\log\idf_py_stdout_output_9672

Before asking the question I tried to find answers on the internet (including this forum).
Here's what I found out and what I tried:
  • I haven't cyrrilic, chinese symbols in my path (C:\Users\heise\...). And i got nothing. Still i have problem.
  • I'm running my project from SSD (SSD has good health status) (but also i'm trying to use the HDD). And i got nothing.
  • Also i'm trying reinstallation. But i got nothing.
Model of my microcontroller: ESP32-WROOM-32D
IDE: ESP-IDE (i'm NOT using VS Code Extension or same)
Operation System: Windows 11 Pro 24H2

Luxni_
Posts: 46
Joined: Mon Aug 16, 2021 6:20 am

Re: Example (Blink) project problem during compilation (ninja failed)

Postby Luxni_ » Mon Jan 13, 2025 8:14 am

It said,
A fatal error occurred: Failed to connect to ESP32: Wrong boot mode detected (0x13)! The chip needs to be in download mode.

Who is online

Users browsing this forum: No registered users and 87 guests