I have tried multiple baud rates, and I have also tried establishing a serial connection through screen or PuTTY, I always get gibberish as an output. I have tried using a CH340G usb-uart adapter, then I changed to a CP210x adapter. No luck.
I am starting to think the chip has hardware issues, though I don't know much about it, I'm a software person but no hardware experience. Does anybody know what I could do?
Thank you in advance
- hello_world idf.py -p /dev/cu.usbserial-0001 -b 115200 flash
- Executing action: flash
- Running ninja in directory /Users/vitto/Desktop/esp/hello_world/build
- Executing "ninja flash"...
- [4/901] 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,
- *******************************************************************************
- [892/901] Performing configure step for 'bootloader'
- -- Found Git: /usr/bin/git (found version "2.39.5 (Apple Git-154)")
- -- 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: /Users/vitto/.espressif/tools/riscv32-esp-elf/esp-14.2.0_20240906/riscv32-esp-elf/bin/riscv32-esp-elf-gcc
- -- Detecting C compiler ABI info
- -- Detecting C compiler ABI info - done
- -- Check for working C compiler: /Users/vitto/.espressif/tools/riscv32-esp-elf/esp-14.2.0_20240906/riscv32-esp-elf/bin/riscv32-esp-elf-gcc - 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: /Users/vitto/.espressif/tools/riscv32-esp-elf/esp-14.2.0_20240906/riscv32-esp-elf/bin/riscv32-esp-elf-g++ - skipped
- -- Detecting CXX compile features
- -- Detecting CXX compile features - done
- -- Building ESP-IDF components for target esp32c2
- -- Project sdkconfig file /Users/vitto/Desktop/esp/hello_world/sdkconfig
- -- Adding linker script /Users/vitto/Desktop/esp/esp-idf/components/riscv/ld/rom.api.ld
- -- Adding linker script /Users/vitto/Desktop/esp/esp-idf/components/soc/esp32c2/ld/esp32c2.peripherals.ld
- -- Bootloader project name: "bootloader" version: 1
- -- Adding linker script /Users/vitto/Desktop/esp/esp-idf/components/esp_rom/esp32c2/ld/esp32c2.rom.ld
- -- Adding linker script /Users/vitto/Desktop/esp/esp-idf/components/esp_rom/esp32c2/ld/esp32c2.rom.api.ld
- -- Adding linker script /Users/vitto/Desktop/esp/esp-idf/components/esp_rom/esp32c2/ld/esp32c2.rom.rvfp.ld
- -- Adding linker script /Users/vitto/Desktop/esp/esp-idf/components/esp_rom/esp32c2/ld/esp32c2.rom.wdt.ld
- -- Adding linker script /Users/vitto/Desktop/esp/esp-idf/components/esp_rom/esp32c2/ld/esp32c2.rom.systimer.ld
- -- Adding linker script /Users/vitto/Desktop/esp/esp-idf/components/esp_rom/esp32c2/ld/esp32c2.rom.version.ld
- -- Adding linker script /Users/vitto/Desktop/esp/esp-idf/components/esp_rom/esp32c2/ld/esp32c2.rom.newlib.ld
- -- Adding linker script /Users/vitto/Desktop/esp/esp-idf/components/bootloader/subproject/main/ld/esp32c2/bootloader.ld
- -- Adding linker script /Users/vitto/Desktop/esp/esp-idf/components/bootloader/subproject/main/ld/esp32c2/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: /Users/vitto/Desktop/esp/esp-idf/components/bootloader /Users/vitto/Desktop/esp/esp-idf/components/bootloader_support /Users/vitto/Desktop/esp/esp-idf/components/efuse /Users/vitto/Desktop/esp/esp-idf/components/esp_app_format /Users/vitto/Desktop/esp/esp-idf/components/esp_bootloader_format /Users/vitto/Desktop/esp/esp-idf/components/esp_common /Users/vitto/Desktop/esp/esp-idf/components/esp_hw_support /Users/vitto/Desktop/esp/esp-idf/components/esp_rom /Users/vitto/Desktop/esp/esp-idf/components/esp_security /Users/vitto/Desktop/esp/esp-idf/components/esp_system /Users/vitto/Desktop/esp/esp-idf/components/esptool_py /Users/vitto/Desktop/esp/esp-idf/components/freertos /Users/vitto/Desktop/esp/esp-idf/components/hal /Users/vitto/Desktop/esp/esp-idf/components/log /Users/vitto/Desktop/esp/esp-idf/components/bootloader/subproject/main /Users/vitto/Desktop/esp/esp-idf/components/bootloader/subproject/components/micro-ecc /Users/vitto/Desktop/esp/esp-idf/components/newlib /Users/vitto/Desktop/esp/esp-idf/components/partition_table /Users/vitto/Desktop/esp/esp-idf/components/riscv /Users/vitto/Desktop/esp/esp-idf/components/soc /Users/vitto/Desktop/esp/esp-idf/components/spi_flash
- -- Configuring done (13.7s)
- -- Generating done (0.2s)
- -- Build files have been written to: /Users/vitto/Desktop/esp/hello_world/build/bootloader
- [95/96] Generating binary image from built executable
- esptool.py v4.8.1
- Creating esp32c2 image...
- Merged 2 ELF sections
- Successfully created esp32c2 image.
- Generated /Users/vitto/Desktop/esp/hello_world/build/bootloader/bootloader.bin
- [96/96] cd /Users/vitto/Desktop/esp/hello_world/build/bootloader/esp-idf/esptool_py && /Users/vitt...-offset 0x8000 bootloader 0x0 /Users/vitto/Desktop/esp/hello_world/build/bootloader/bootloader.bin
- Bootloader binary size 0x4c10 bytes. 0x33f0 bytes (41%) free.
- [899/901] Generating binary image from built executable
- esptool.py v4.8.1
- Creating esp32c2 image...
- Merged 1 ELF section
- Successfully created esp32c2 image.
- Generated /Users/vitto/Desktop/esp/hello_world/build/hello_world.bin
- [900/901] cd /Users/vitto/Desktop/esp/hello_world/build/esp-idf/esptool_py && /Users/vitto/.espres...ild/partition_table/partition-table.bin /Users/vitto/Desktop/esp/hello_world/build/hello_world.bin
- hello_world.bin binary size 0x1e340 bytes. Smallest app partition is 0x100000 bytes. 0xe1cc0 bytes (88%) free.
- [900/901] cd /Users/vitto/Desktop/esp/esp-idf/components/esptool_py && /usr/local/bin/cmake -D IDF.../hello_world/build -P /Users/vitto/Desktop/esp/esp-idf/components/esptool_py/run_serial_tool.cmake
- esptool.py --chip esp32c2 -p /dev/cu.usbserial-0001 -b 115200 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 60m --flash_size 2MB 0x0 bootloader/bootloader.bin 0x10000 hello_world.bin 0x8000 partition_table/partition-table.bin
- esptool.py v4.8.1
- Serial port /dev/cu.usbserial-0001
- Connecting......................................
- A fatal error occurred: Failed to connect to ESP32-C2: Invalid head of packet (0x12): Possible serial noise or corruption.
- For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
- CMake Error at run_serial_tool.cmake:67 (message):
- /Users/vitto/.espressif/python_env/idf5.5_py3.10_env/bin/python;;/Users/vitto/Desktop/esp/esp-idf/components/esptool_py/esptool/esptool.py;--chip;esp32c2
- failed.
- FAILED: CMakeFiles/flash /Users/vitto/Desktop/esp/hello_world/build/CMakeFiles/flash
- cd /Users/vitto/Desktop/esp/esp-idf/components/esptool_py && /usr/local/bin/cmake -D IDF_PATH=/Users/vitto/Desktop/esp/esp-idf -D "SERIAL_TOOL=/Users/vitto/.espressif/python_env/idf5.5_py3.10_env/bin/python;;/Users/vitto/Desktop/esp/esp-idf/components/esptool_py/esptool/esptool.py;--chip;esp32c2" -D "SERIAL_TOOL_ARGS=--before=default_reset;--after=hard_reset;write_flash;@flash_args" -D WORKING_DIRECTORY=/Users/vitto/Desktop/esp/hello_world/build -P /Users/vitto/Desktop/esp/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 /Users/vitto/Desktop/esp/hello_world/build/log/idf_py_stderr_output_4624 and /Users/vitto/Desktop/esp/hello_world/build/log/idf_py_stdout_output_4624