problems while flsahing example code on esp-wroom-32

benedito821
Posts: 15
Joined: Fri Mar 19, 2021 9:58 pm

problems while flsahing example code on esp-wroom-32

Postby benedito821 » Fri Mar 19, 2021 10:10 pm

Hello! I have migrated from PlatformIO plugin to ESP-IDF and I made all the configurations as shown in the Espressif article "get started". I use Ubuntu. The problem appears when I try to flash an example provided in the ESP repository (project "blink") : it gives back some errors. Here is my log:

esptool.py v3.1-dev
Serial port /dev/ttyUSB1
Traceback (most recent call last):
File "/home/benedito/.espressif/python_env/idf4.4_py3.6_env/lib/python3.6/site-packages/serial/serialposix.py", line 322, in open
self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/ttyUSB1'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/benedito/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 4290, in <module>
_main()
File "/home/benedito/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 4283, in _main
main()
File "/home/benedito/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 3866, in main
before=args.before)
File "/home/benedito/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 115, in get_default_connected_device
connect_attempts)
File "/home/benedito/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 345, in detect_chip
detect_port = ESPLoader(port, baud, trace_enabled=trace_enabled)
File "/home/benedito/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 304, in __init__
self._port = serial.serial_for_url(port)
File "/home/benedito/.espressif/python_env/idf4.4_py3.6_env/lib/python3.6/site-packages/serial/__init__.py", line 90, in serial_for_url
instance.open()
File "/home/benedito/.espressif/python_env/idf4.4_py3.6_env/lib/python3.6/site-packages/serial/serialposix.py", line 325, in open
raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port /dev/ttyUSB1: [Errno 2] No such file or directory: '/dev/ttyUSB1'
The terminal process "/bin/bash '-c', '/home/benedito/.espressif/python_env/idf4.4_py3.6_env/bin/python /home/benedito/esp/esp-idf/components/esptool_py/esptool/esptool.py -p /dev/ttyUSB1 -b 460800 --after hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size detect 0x8000 partition_table/partition-table.bin 0x1000 bootloader/bootloader.bin 0x10000 blink.bin'" failed to launch (exit code: 1).

it builds normaly, only the flsahing. I have connected the board to the PC. I could I solve this?

User avatar
ESP_krzychb
Posts: 400
Joined: Sat Oct 01, 2016 9:05 am
Contact:

Re: problems while flsahing example code on esp-wroom-32

Postby ESP_krzychb » Sat Mar 20, 2021 5:00 am

Hi benedito821, please first make sure you are able to Establish Serial Connection with ESP32

benedito821
Posts: 15
Joined: Fri Mar 19, 2021 9:58 pm

Re: problems while flsahing example code on esp-wroom-32

Postby benedito821 » Sat Mar 20, 2021 6:16 pm

Thanks. You were right. I just clicked on the button ESP-IDF select device port and choosed the port. Strange how it didn't work before.

Who is online

Users browsing this forum: No registered users and 80 guests