A fatal error occurred: Failed to connect to ESP32-C6: No serial data received.
Posted: 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.
I already checked all the things that Gitlab Copilot came up with
1. Check USB Connection:
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.
- 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.
- 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)".
- Press the reset button on the ESP32-C6 board to ensure it is in the correct state for programming.
- Hold down the "BOOT" button while pressing the "EN" (reset) button.
- Release the "EN" button first, then release the "BOOT" button.
- Ensure the baud rate is set correctly in your development environment.
- Common baud rates for ESP32 boards are 115200 or 921600.
- Ensure no other applications are using the same COM port.
- Close any other serial monitor or terminal programs that might be accessing the port.
- Ensure you have the latest firmware and tools for the ESP32-C6.
- Update the ESP-IDF or Arduino core for ESP32 if necessary.