A fatal error occurred: Failed to connect to ESP32-C6: No serial data received.

mhws700
Posts: 6
Joined: Fri Jan 17, 2025 11:23 pm

A fatal error occurred: Failed to connect to ESP32-C6: No serial data received.

Postby mhws700 » Mon Jan 20, 2025 4:40 pm

Hi all,

making my first steps with the ESP32-C6 DevkitC-1 and the hello_world example on VSCode + ESP-IDF 1.9.

I would appreciate a hint what might be wrong and result in a "no serial data received". Here is the command line output.

Code: Select all

PS C:\workspace\esp\examples\hello_world> idf.py -p COM8 flash     
Executing action: flash
Running ninja in directory C:\workspace\esp\examples\hello_world\build
Executing "ninja flash"...
[73/1030] Generating ../../partition_table/partition-table.bin
Partition table binary generated. Contents:
*******************************************************************************
# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,24K,
phy_init,data,phy,0xf000,4K,
factory,app,factory,0x10000,1M,
*******************************************************************************
[1021/1030] Performing configure step for 'bootloader'
-- Found Git: C:/Users/schrape/.espressif/tools/idf-git/2.39.2/cmd/git.exe (found version "2.39.2.windows.1")
-- The C compiler identification is GNU 14.2.0
-- The CXX compiler identification is GNU 14.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Users/schrape/.espressif/tools/riscv32-esp-elf/esp-14.2.0_20241119/riscv32-esp-elf/bin/riscv32-esp-elf-gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Users/schrape/.espressif/tools/riscv32-esp-elf/esp-14.2.0_20241119/riscv32-esp-elf/bin/riscv32-esp-elf-gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Users/schrape/.espressif/tools/riscv32-esp-elf/esp-14.2.0_20241119/riscv32-esp-elf/bin/riscv32-esp-elf-g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32c6
-- Project sdkconfig file C:/workspace/esp/examples/hello_world/sdkconfig
-- Adding linker script C:/workspace/esp/v5.4/esp-idf/components/riscv/ld/rom.api.ld
-- Adding linker script C:/workspace/esp/v5.4/esp-idf/components/soc/esp32c6/ld/esp32c6.peripherals.ld
-- Bootloader project name: "bootloader" version: 1
-- Adding linker script C:/workspace/esp/v5.4/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.ld
-- Adding linker script C:/workspace/esp/v5.4/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.api.ld
-- Adding linker script C:/workspace/esp/v5.4/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.rvfp.ld
-- Adding linker script C:/workspace/esp/v5.4/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.wdt.ld
-- Adding linker script C:/workspace/esp/v5.4/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.systimer.ld
-- Adding linker script C:/workspace/esp/v5.4/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.version.ld
-- Adding linker script C:/workspace/esp/v5.4/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.newlib.ld
-- Adding linker script C:/workspace/esp/v5.4/esp-idf/components/bootloader/subproject/main/ld/esp32c6/bootloader.ld
-- Adding linker script C:/workspace/esp/v5.4/esp-idf/components/bootloader/subproject/main/ld/esp32c6/bootloader.rom.ld
-- Components: bootloader bootloader_support efuse esp_app_format esp_bootloader_format esp_common esp_hw_support esp_rom esp_security esp_system esptool_py freertos hal log main micro-ecc newlib partition_table riscv soc spi_flash
-- Component paths: C:/workspace/esp/v5.4/esp-idf/components/bootloader C:/workspace/esp/v5.4/esp-idf/components/bootloader_support C:/workspace/esp/v5.4/esp-idf/components/efuse C:/workspace/esp/v5.4/esp-idf/components/esp_app_format C:/workspace/esp/v5.4/esp-idf/components/esp_bootloader_format C:/workspace/esp/v5.4/esp-idf/components/esp_common C:/workspace/esp/v5.4/esp-idf/components/esp_hw_support C:/workspace/esp/v5.4/esp-idf/components/esp_rom C:/workspace/esp/v5.4/esp-idf/components/esp_security C:/workspace/esp/v5.4/esp-idf/components/esp_system C:/workspace/esp/v5.4/esp-idf/components/esptool_py C:/workspace/esp/v5.4/esp-idf/components/freertos C:/workspace/esp/v5.4/esp-idf/components/hal C:/workspace/esp/v5.4/esp-idf/components/log C:/workspace/esp/v5.4/esp-idf/components/bootloader/subproject/main C:/workspace/esp/v5.4/esp-idf/components/bootloader/subproject/components/micro-ecc C:/workspace/esp/v5.4/esp-idf/components/newlib C:/workspace/esp/v5.4/esp-idf/components/partition_table C:/workspace/esp/v5.4/esp-idf/components/riscv C:/workspace/esp/v5.4/esp-idf/components/soc C:/workspace/esp/v5.4/esp-idf/components/spi_flash
-- Configuring done (12.5s)
-- Generating done (0.2s)
-- Build files have been written to: C:/workspace/esp/examples/hello_world/build/bootloader
[113/114] Generating binary image from built executable
Successfully created esp32c6 image.
Generated C:/workspace/esp/examples/hello_world/build/bootloader/bootloader.bin
[114/114] C:\WINDOWS\system32\cmd.exe /C "cd /D C:\workspace\esp\examples\hello_world...bootloader 0x0 C:/workspace/esp/examples/hello_world/build/bootloader/bootloader.bin
Bootloader binary size 0x55e0 bytes. 0x2a20 bytes (33%) free.
[1028/1030] Generating binary image from built executable
esptool.py v4.8.1
Creating esp32c6 image...
Merged 1 ELF section
Successfully created esp32c6 image.
Generated C:/workspace/esp/examples/hello_world/build/hello_world.bin
[1029/1030] C:\WINDOWS\system32\cmd.exe /C "cd /D C:\workspace\esp\examples\hello_wor...able/partition-table.bin C:/workspace/esp/examples/hello_world/build/hello_world.bin
hello_world.bin binary size 0x266c0 bytes. Smallest app partition is 0x100000 bytes. 0xd9940 bytes (85%) free.
[1029/1030] C:\WINDOWS\system32\cmd.exe /C "cd /D C:\workspace\esp\v5.4\esp-idf\compo...d/build -P C:/workspace/esp/v5.4/esp-idf/components/esptool_py/run_serial_tool.cmake
esptool.py --chip esp32c6 -p COM8 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 80m --flash_size 2MB 0x0 bootloader/bootloader.bin 0x10000 hello_world.bin 0x8000 partition_table/partition-table.bin
esptool.py v4.8.1
Serial port COM8
Connecting......................................

A fatal error occurred: Failed to connect to ESP32-C6: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
CMake Error at run_serial_tool.cmake:67 (message):

  C:/Users/schrape/.espressif/python_env/idf5.4_py3.11_env/Scripts/python.exe;;C:/workspace/esp/v5.4/esp-idf/components/esptool_py/esptool/esptool.py;--chip;esp32c6
  failed.



FAILED: CMakeFiles/flash C:/workspace/esp/examples/hello_world/build/CMakeFiles/flash
C:\WINDOWS\system32\cmd.exe /C "cd /D C:\workspace\esp\v5.4\esp-idf\components\esptool_py && C:\Users\schrape\.espressif\tools\cmake\3.30.2\bin\cmake.exe -D IDF_PATH=C:/workspace/esp/v5.4/esp-idf -D SERIAL_TOOL=C:/Users/schrape/.espressif/python_env/idf5.4_py3.11_env/Scripts/python.exe;;C:/workspace/esp/v5.4/esp-idf/components/esptool_py/esptool/esptool.py;--chip;esp32c6 -D SERIAL_TOOL_ARGS=--before=default_reset;--after=hard_reset;write_flash;@flash_args -D WORKING_DIRECTORY=C:/workspace/esp/examples/hello_world/build -P C:/workspace/esp/v5.4/esp-idf/components/esptool_py/run_serial_tool.cmake"
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the C:\workspace\esp\examples\hello_world\build\log\idf_py_stderr_output_16708 and C:\workspace\esp\examples\hello_world\build\log\idf_py_stdout_output_16708


I already checked all the things that Gitlab Copilot came up with

1. Check USB Connection:
  • Ensure the USB cable is securely connected to both your computer and the ESP32-C6 board.
  • Try using a different USB cable or a different USB port on your computer.
2. Install Drivers:
  • For Windows, you might need to install the CP210x or FTDI drivers.
  • You can download the CP210x drivers from Silicon Labs.
  • You can download the FTDI drivers from FTDI Chip.
3. Select the Correct Port:
  • Open your development environment (e.g., Arduino IDE, PlatformIO).
  • Ensure the correct COM port is selected. You can check the available ports in the Tools menu.
  • On Windows, you can also check the COM port in Device Manager under "Ports (COM & LPT)".
4. Reset the Board:
  • Press the reset button on the ESP32-C6 board to ensure it is in the correct state for programming.
5. Boot Mode:
  • Hold down the "BOOT" button while pressing the "EN" (reset) button.
  • Release the "EN" button first, then release the "BOOT" button.
6. Baud Rate:
  • Ensure the baud rate is set correctly in your development environment.
  • Common baud rates for ESP32 boards are 115200 or 921600.
7. Check for Conflicts:
  • Ensure no other applications are using the same COM port.
  • Close any other serial monitor or terminal programs that might be accessing the port.
8. Update Firmware:
  • Ensure you have the latest firmware and tools for the ESP32-C6.
  • Update the ESP-IDF or Arduino core for ESP32 if necessary.

ahsrabrifat
Posts: 23
Joined: Sat Jan 18, 2025 2:31 pm

Re: A fatal error occurred: Failed to connect to ESP32-C6: No serial data received.

Postby ahsrabrifat » Tue Jan 21, 2025 2:25 pm

It can be a bad cable too. You can try another cable.

mhws700
Posts: 6
Joined: Fri Jan 17, 2025 11:23 pm

Re: A fatal error occurred: Failed to connect to ESP32-C6: No serial data received.

Postby mhws700 » Wed Jan 22, 2025 10:49 am

The cable is ok.

I followed the trouble shooting guidance on https://docs.espressif.com/projects/esp ... leshooting but pressing boot or reset on the devkit does not generate any output to putty. I would appreciate a hint or even a confirmation that you get soem output. In the later case I would guess that my devkits are non functional and I send them back to the seller.
Screenshot 2025-01-22 114648.png
Screenshot 2025-01-22 114648.png (127.46 KiB) Viewed 1488 times
Screenshot 2025-01-22 114727.png
Screenshot 2025-01-22 114727.png (6.35 KiB) Viewed 1488 times

ESP_radurentea
Posts: 21
Joined: Thu Mar 09, 2023 8:30 am

Re: A fatal error occurred: Failed to connect to ESP32-C6: No serial data received.

Postby ESP_radurentea » Mon Jan 27, 2025 12:52 pm

Hi,

I need some additional information to help troubleshoot your issue:

Could you provide detailed steps to reproduce the problem? A screen recording (GIF) would be particularly helpful.
Please clarify your connection setup:

- Are you using a USB-C cable connected to the UART port?
- Or are you connecting directly to the pins?


If you're new to the ESP-IDF VS Code extension, I recommend starting with our Getting Started guide. To access it:

1) Press F1 to open the Command Palette
2) Type "ESP-IDF: Open Get Started Walkthrough"
3) Follow the guided steps for building and flashing your project


If you're still encountering errors, you can try manually entering bootloader mode on your ESP32-C6:

1) Press and hold the BOOT button
2) While holding BOOT, briefly press and release the EN/RESET button
3) Release the BOOT button
4) Flash the project

This manual bootloader method is often more reliable than auto-reset when dealing with connection issues.
Please let me know if you succeed in flashing the project.

mhws700
Posts: 6
Joined: Fri Jan 17, 2025 11:23 pm

Re: A fatal error occurred: Failed to connect to ESP32-C6: No serial data received.

Postby mhws700 » Mon Jan 27, 2025 2:44 pm

Hi ESP_radurentea,

Thank you for contacting me, but after spending so many hours trying to find the cause of the problem, I have decided to declare the appliances non-functional and return them to the seller. (see also https://esp32.com/viewtopic.php?f=2&t=44086)

Who is online

Users browsing this forum: No registered users and 56 guests