Continuing the discussion from Debugging on the new Nano ESP32:
I tried following the debugging guide, but it does not reliably work on my setup (Ubuntu 23.04, Arduino IDE 2.2.1, Arduino ESP32 Boards 2.0.12).
First time trying to upload with the programmer gives an error and the "cube" port disappears.
Sketch uses 867937 bytes (27%) of program storage space. Maximum is 3145728 bytes.
Global variables use 45900 bytes (14%) of dynamic memory, leaving 281780 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.5.1
Serial port /dev/ttyACM0
Connecting.............
A serial exception error occurred: write failed: [Errno 19] No such device
Note: This error originates from pySerial. It is likely not a problem with esptool, but with the hardware connection or drivers.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
Failed programming: uploading error: exit status 1
Trying to upload with the programmer again works.
Once I succeeded in uploading using the programmer and launched the debugger, I got the message:
Open On-Chip Debugger v0.11.0-esp32-20221026 (2022-10-26-14:47)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
CDRTOSConfigure
Info : only one transport option; autoselect 'jtag'
Info : esp_usb_jtag: VID set to 0x303a and PID to 0x1001
Info : esp_usb_jtag: capabilities descriptor set to 0x2000
Warn : Transport "jtag" was already selected
Info : Listening on port 50001 for tcl connections
Info : Listening on port 50002 for telnet connections
Error: libusb_open() failed with LIBUSB_ERROR_ACCESS
Error: esp_usb_jtag: could not find or open device!
Pressing the button twice does not place the device in the mode that displays the two port options (DFU mode).
Getting back to normal uploading I first have to select "Tools -> USB Mode -> Normal mode" then upload again using the programmer. After that upload the "cube" port appears again and the board can be programmed with the normal upload.