-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
esp_usb_jtag: could not find or open device (OCD-1065) #355
Comments
@Vineetha1705 What is your board version? If you have v1.4, try to connect a breakout cable to the pins GPIOs 24 and 25. They are D+ and D- of the USB/JTAG interface. |
What is your board version? If you have v1.4-Yes. Actually, until yesterday, the code was successfully flashing into the ESP32-P4. However, today, when I started flashing, it failed and displayed errors like the ones mentioned below: Executing action: flash hello_world.bin binary size 0x30890 bytes. Smallest app partition is 0x100000 bytes. 0xcf770 bytes (81%) free. [2/5] Performing build step for 'bootloader' [1/1] C:\WINDOWS\system32\cmd.exe /C "cd /D C:\Users\Vineetha\Desktop\Test1\hello_world\build\bootloader\esp-idf\esptool_py && C:\Espressif\python_env\idf5.3_py3.11_env\Scripts\python.exe D:/Vineetha/esp-idf-v5.3.2/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x2000 C:/Users/Vineetha/Desktop/Test1/hello_world/build/bootloader/bootloader.bin" Bootloader binary size 0x58e0 bytes. 0x720 bytes (7%) free. [3/5] No install step for 'bootloader' [4/5] Completed 'bootloader' [4/5] C:\WINDOWS\system32\cmd.exe /C "cd /D D:\Vineetha\esp-idf-v5.3.2\components\esptool_py && C:\Espressif\tools\cmake\3.30.2\bin\cmake.exe -D IDF_PATH=D:/Vineetha/esp-idf-v5.3.2 -D SERIAL_TOOL=C:/Espressif/python_env/idf5.3_py3.11_env/Scripts/python.exe;;D:/Vineetha/esp-idf-v5.3.2/components/esptool_py/esptool/esptool.py;--chip;esp32p4 -D SERIAL_TOOL_ARGS=--before=default_reset;--after=hard_reset;write_flash;@flash_args -D WORKING_DIRECTORY=C:/Users/Vineetha/Desktop/Test1/hello_world/build -P D:/Vineetha/esp-idf-v5.3.2/components/esptool_py/run_serial_tool.cmake" esptool.py --chip esp32p4 -p COM25 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 80m --flash_size 2MB 0x2000 bootloader/bootloader.bin 0x10000 hello_world.bin 0x8000 partition_table/partition-table.bin esptool.py v4.8.1 Serial port COM25 A fatal error occurred: Could not open COM25, the port is busy or doesn't exist. (could not open port 'COM25': FileNotFoundError(2, 'The system cannot find the file specified.', None, 2)) Hint: Check if the port is correct and ESP connected CMake Error at run_serial_tool.cmake:66 (message): FAILED: CMakeFiles/flash C:/Users/Vineetha/Desktop/Test1/hello_world/build/CMakeFiles/flash C:\WINDOWS\system32\cmd.exe /C "cd /D D:\Vineetha\esp-idf-v5.3.2\components\esptool_py && C:\Espressif\tools\cmake\3.30.2\bin\cmake.exe -D IDF_PATH=D:/Vineetha/esp-idf-v5.3.2 -D SERIAL_TOOL=C:/Espressif/python_env/idf5.3_py3.11_env/Scripts/python.exe;;D:/Vineetha/esp-idf-v5.3.2/components/esptool_py/esptool/esptool.py;--chip;esp32p4 -D SERIAL_TOOL_ARGS=--before=default_reset;--after=hard_reset;write_flash;@flash_args -D WORKING_DIRECTORY=C:/Users/Vineetha/Desktop/Test1/hello_world/build -P D:/Vineetha/esp-idf-v5.3.2/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:\Users\Vineetha\Desktop\Test1\hello_world\build\log\idf_py_stderr_output_13964 and C:\Users\Vineetha\Desktop\Test1\hello_world\build\log\idf_py_stdout_output_13964 I don’t understand why this problem is occurring. Please help me resolve it. But it is working in another system. Regards, |
If you want to flash application from UART, you can use USB-UART connector (j20). It should't require Zadig things.. You may need to install CP210x USB to UART Bridge driver. If you want to debug application from JTAG through GPIO24-25, then use IDF installer for the necessary drivers. https://docs.espressif.com/projects/esp-idf/en/latest/esp32p4/api-guides/jtag-debugging/configure-builtin-jtag.html#configure-usb-drivers And check here to verify #230 (comment) |
Yes, I am using the USB-UART connect(j20) for flashing but it is not working properly now. I reinstalled the drivers but still it is showing errors like above mentioned file. |
ChatGPT suggestions:
|
I already tried all these suggestions but still same problem is getting. |
I am sorry, I don't have any other suggestions. This is not related to OpenOCD. Maybe you might try your luck in the esptool repo. Someone might have encountered the same issue before. |
Okay, Thank you so much.
…________________________________
From: Erhan Kurubas ***@***.***>
Sent: 16 January 2025 16:39
To: espressif/openocd-esp32 ***@***.***>
Cc: Vineetha D ***@***.***>; Mention ***@***.***>
Subject: Re: [espressif/openocd-esp32] esp_usb_jtag: could not find or open device (OCD-1065) (Issue #355)
I am sorry, I don't have any other suggestions. This is not related to OpenOCD. Maybe you might try your luck in the esptool repo. Someone might have encountered the same issue before.
—
Reply to this email directly, view it on GitHub<#355 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BCDFQCG2OGIUFUAEBI6Y7EL2K6HPDAVCNFSM6AAAAABVIZLYYKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOJVGIZTIMBZGA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hello ,
Now the problem got solved by upgrading the driver.
I am facing one more issue with Esp32p4 debugging. When I start debugging it is not entering into debug mode instead of it is showing errors which are mentioned below:
*******************************************************************************************************************************************************************
Open On-Chip Debugger v0.12.0-esp32-20240318 (2024-03-18-18:26)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselecting 'jtag'
Info : esp_usb_jtag: VID set to 0x303a and PID to 0x1001
Info : esp_usb_jtag: capabilities descriptor set to 0x2000
WARNING!!! OpenOCD binary version (Open On-Chip Debugger v0.12.0-esp32-20240318 (2024-03-18-18:26)) doesn't match the .cfg file version (v0.12.0-esp32-20241016)
Flashing "C:/Users/Vineetha/Desktop/Test/hello_world/build/bootloader/bootloader.bin" at 0x2000
** program_esp input args <0x2000 verify> **
Error: esp_usb_jtag: could not find or open device!
Please refer to the troubleshooting guide below to identify the problem.
https://github.com/espressif/openocd-esp32/wiki/Troubleshooting-FAQ
** OpenOCD init failed **
shutdown command invoked
esp
esp appimage_offset offset
esp apptrace (start <destination> [poll_period [trace_size [stop_tmo
[wait4halt [skip_size]]]]) | (stop) | (status) | (dump
<destination>)
esp compression ['on'|'off']
esp encrypt_binary ['yes'|'no']
esp flash_stub_clock_boost ['on'|'off']
esp gcov [dump] [<prefix> [<prefix_strip>]]
esp gdb_detach_handler
esp halted_event_handler
esp stub_log ['on'|'off']
esp sysview (start file://<outfile1> [file://<outfile2>] [poll_period
[trace_size [stop_tmo [wait4halt [skip_size]]]]) | (stop) |
(status)
esp sysview_mcore (start file://<outfile> [poll_period [trace_size
[stop_tmo [wait4halt [skip_size]]]]) | (stop) | (status)
esp verify_bank_hash bank_id filename [offset]
esp32p4.hp.cpu0
esp32p4.hp.cpu0 arm
esp32p4.hp.cpu0 arm semihosting ['enable'|'disable']
esp32p4.hp.cpu0 arm semihosting_basedir [dir]
esp32p4.hp.cpu0 arm semihosting_cmdline arguments
esp32p4.hp.cpu0 arm semihosting_fileio ['enable'|'disable']
esp32p4.hp.cpu0 arm semihosting_read_user_param
esp32p4.hp.cpu0 arm semihosting_redirect (disable | tcp <port>
['debug'|'stdio'|'all'])
esp32p4.hp.cpu0 arm semihosting_resexit ['enable'|'disable']
esp32p4.hp.cpu0 arp_examine ['allow-defer']
esp32p4.hp.cpu0 arp_halt
esp32p4.hp.cpu0 arp_halt_gdb
esp32p4.hp.cpu0 arp_poll
esp32p4.hp.cpu0 arp_reset 'assert'|'deassert' halt
esp32p4.hp.cpu0 arp_waitstate statename timeoutmsecs
esp32p4.hp.cpu0 cget target_attribute
esp32p4.hp.cpu0 configure [target_attribute ...]
esp32p4.hp.cpu0 curstate
esp32p4.hp.cpu0 debug_reason
esp32p4.hp.cpu0 esp
esp32p4.hp.cpu0 esp apptrace (start <destination> [poll_period
[trace_size [stop_tmo [wait4halt [skip_size]]]]) | (stop) |
(status) | (dump <destination>)
esp32p4.hp.cpu0 esp gcov [dump] [<prefix> [<prefix_strip>]]
esp32p4.hp.cpu0 esp gdb_detach_handler
esp32p4.hp.cpu0 esp halted_event_handler
esp32p4.hp.cpu0 esp sysview (start file://<outfile1>
[file://<outfile2>] [poll_period [trace_size [stop_tmo
[wait4halt [skip_size]]]]) | (stop) | (status)
esp32p4.hp.cpu0 esp sysview_mcore (start file://<outfile> [poll_period
[trace_size [stop_tmo [wait4halt [skip_size]]]]) | (stop) |
(status)
esp32p4.hp.cpu0 eventlist
esp32p4.hp.cpu0 examine_deferred
esp32p4.hp.cpu0 get_reg list
esp32p4.hp.cpu0 invoke-event event_name
esp32p4.hp.cpu0 mdb address [count]
esp32p4.hp.cpu0 mdd address [count]
esp32p4.hp.cpu0 mdh address [count]
esp32p4.hp.cpu0 mdw address [count]
esp32p4.hp.cpu0 mwb address data [count]
esp32p4.hp.cpu0 mwd address data [count]
esp32p4.hp.cpu0 mwh address data [count]
esp32p4.hp.cpu0 mww address data [count]
esp32p4.hp.cpu0 read_memory address width count ['phys']
esp32p4.hp.cpu0 riscv
esp32p4.hp.cpu0 riscv authdata_read [index]
esp32p4.hp.cpu0 riscv authdata_write [index] value
esp32p4.hp.cpu0 riscv dm_read reg_address
esp32p4.hp.cpu0 riscv dm_write reg_address value
esp32p4.hp.cpu0 riscv dmi_read address
esp32p4.hp.cpu0 riscv dmi_write address value
esp32p4.hp.cpu0 riscv dump_sample_buf [base64]
esp32p4.hp.cpu0 riscv etrigger set [vs] [vu] [m] [s] [u]
<exception_codes>|clear
esp32p4.hp.cpu0 riscv exec_progbuf instr1 [instr2 [... instr16]]
esp32p4.hp.cpu0 riscv expose_csrs n0[-m0|=name0][,n1[-m1|=name1]]...
esp32p4.hp.cpu0 riscv expose_custom n0[-m0|=name0][,n1[-m1|=name1]]...
esp32p4.hp.cpu0 riscv hide_csrs {n0|n-m0}[,n1|n-m1]......
esp32p4.hp.cpu0 riscv icount set [vs] [vu] [m] [s] [u] [pending]
<count>|clear
esp32p4.hp.cpu0 riscv info
esp32p4.hp.cpu0 riscv itrigger set [vs] [vu] [nmi] [m] [s] [u]
<mie_bits>|clear
esp32p4.hp.cpu0 riscv memory_sample bucket address|clear [size=4]
esp32p4.hp.cpu0 riscv repeat_read count address [size=4]
esp32p4.hp.cpu0 riscv reset_delays [wait]
esp32p4.hp.cpu0 riscv resume_order normal|reversed
esp32p4.hp.cpu0 riscv set_bscan_tunnel_ir value
esp32p4.hp.cpu0 riscv set_command_timeout_sec [sec]
esp32p4.hp.cpu0 riscv set_ebreakm [on|off]
esp32p4.hp.cpu0 riscv set_ebreaks [on|off]
esp32p4.hp.cpu0 riscv set_ebreaku [on|off]
esp32p4.hp.cpu0 riscv set_enable_eq_match_trigger [on|off]
esp32p4.hp.cpu0 riscv set_enable_ge_lt_trigger [on|off]
esp32p4.hp.cpu0 riscv set_enable_napot_trigger [on|off]
esp32p4.hp.cpu0 riscv set_enable_virt2phys on|off
esp32p4.hp.cpu0 riscv set_enable_virtual on|off
esp32p4.hp.cpu0 riscv set_ir [idcode|dtmcs|dmi] value
esp32p4.hp.cpu0 riscv set_maskisr ['off'|'steponly']
esp32p4.hp.cpu0 riscv set_mem_access method1 [method2] [method3]
esp32p4.hp.cpu0 riscv set_reset_timeout_sec [sec]
esp32p4.hp.cpu0 riscv use_bscan_tunnel value [type]
esp32p4.hp.cpu0 set_reg dict
esp32p4.hp.cpu0 smp [on|off]
esp32p4.hp.cpu0 smp_gdb
esp32p4.hp.cpu0 was_examined
esp32p4.hp.cpu0 write_memory address width data ['phys']
esp32p4.hp.cpu1
esp32p4.hp.cpu1 arm
esp32p4.hp.cpu1 arm semihosting ['enable'|'disable']
esp32p4.hp.cpu1 arm semihosting_basedir [dir]
esp32p4.hp.cpu1 arm semihosting_cmdline arguments
esp32p4.hp.cpu1 arm semihosting_fileio ['enable'|'disable']
esp32p4.hp.cpu1 arm semihosting_read_user_param
esp32p4.hp.cpu1 arm semihosting_redirect (disable | tcp <port>
['debug'|'stdio'|'all'])
esp32p4.hp.cpu1 arm semihosting_resexit ['enable'|'disable']
esp32p4.hp.cpu1 arp_examine ['allow-defer']
esp32p4.hp.cpu1 arp_halt
esp32p4.hp.cpu1 arp_halt_gdb
esp32p4.hp.cpu1 arp_poll
esp32p4.hp.cpu1 arp_reset 'assert'|'deassert' halt
esp32p4.hp.cpu1 arp_waitstate statename timeoutmsecs
esp32p4.hp.cpu1 cget target_attribute
esp32p4.hp.cpu1 configure [target_attribute ...]
esp32p4.hp.cpu1 curstate
esp32p4.hp.cpu1 debug_reason
esp32p4.hp.cpu1 esp
esp32p4.hp.cpu1 esp apptrace (start <destination> [poll_period
[trace_size [stop_tmo [wait4halt [skip_size]]]]) | (stop) |
(status) | (dump <destination>)
esp32p4.hp.cpu1 esp gcov [dump] [<prefix> [<prefix_strip>]]
esp32p4.hp.cpu1 esp gdb_detach_handler
esp32p4.hp.cpu1 esp halted_event_handler
esp32p4.hp.cpu1 esp sysview (start file://<outfile1>
[file://<outfile2>] [poll_period [trace_size [stop_tmo
[wait4halt [skip_size]]]]) | (stop) | (status)
esp32p4.hp.cpu1 esp sysview_mcore (start file://<outfile> [poll_period
[trace_size [stop_tmo [wait4halt [skip_size]]]]) | (stop) |
(status)
esp32p4.hp.cpu1 eventlist
esp32p4.hp.cpu1 examine_deferred
esp32p4.hp.cpu1 get_reg list
esp32p4.hp.cpu1 invoke-event event_name
esp32p4.hp.cpu1 mdb address [count]
esp32p4.hp.cpu1 mdd address [count]
esp32p4.hp.cpu1 mdh address [count]
esp32p4.hp.cpu1 mdw address [count]
esp32p4.hp.cpu1 mwb address data [count]
esp32p4.hp.cpu1 mwd address data [count]
esp32p4.hp.cpu1 mwh address data [count]
esp32p4.hp.cpu1 mww address data [count]
esp32p4.hp.cpu1 read_memory address width count ['phys']
esp32p4.hp.cpu1 riscv
esp32p4.hp.cpu1 riscv authdata_read [index
]
esp32p4.hp.cpu1 riscv authdata_write [index] value
esp32p4.hp.cpu1 riscv dm_read reg_address
esp32p4.hp.cpu1 riscv dm_write reg_address value
esp32p4.hp.cpu1 riscv dmi_read address
esp32p4.hp.cpu1 riscv dmi_write address value
esp32p4.hp.cpu1 riscv dump_sample_buf [base64]
esp32p4.hp.cpu1 riscv etrigger set [vs] [vu] [m] [s] [u]
<exception_codes>|clear
esp32p4.hp.cpu1 riscv exec_progbuf instr1 [instr2 [... instr16]]
esp32p4.hp.cpu1 riscv expose_csrs n0[-m0|=name0][,n1[-m1|=name1]]...
esp32p4.hp.cpu1 riscv expose_custom n0[-m0|=name0][,n1[-m1|=name1]]...
esp32p4.hp.cpu1 riscv hide_csrs {n0|n-m0}[,n1|n-m1]......
esp32p4.hp.cpu1 riscv icount set [vs] [vu] [m] [s] [u] [pending]
<count>|clear
esp32p4.hp.cpu1 riscv info
esp32p4.hp.cpu1 riscv itrigger set [vs] [vu] [nmi] [m] [s] [u]
<mie_bits>|clear
esp32p4.hp.cpu1 riscv memory_sample bucket address|clear [size=4]
esp32p4.hp.cpu1 riscv repeat_read count address [size=4]
esp32p4.hp.cpu1 riscv reset_delays [wait]
esp32p4.hp.cpu1 riscv resume_order normal|reversed
esp32p4.hp.cpu1 riscv set_bscan_tunnel_ir value
esp32p4.hp.cpu1 riscv set_command_timeout_sec [sec]
esp32p4.hp.cpu1 riscv set_ebreakm [on|off]
esp32p4.hp.cpu1 riscv set_ebreaks [on|off]
esp32p4.hp.cpu1 riscv set_ebreaku [on|off]
esp32p4.hp.cpu1 riscv set_enable_eq_match_trigger [on|off]
esp32p4.hp.cpu1 riscv set_enable_ge_lt_trigger [on|off]
esp32p4.hp.cpu1 riscv set_enable_napot_trigger [on|off]
esp32p4.hp.cpu1 riscv set_enable_virt2phys on|off
esp32p4.hp.cpu1 riscv set_enable_virtual on|off
esp32p4.hp.cpu1 riscv set_ir [idcode|dtmcs|dmi] value
esp32p4.hp.cpu1 riscv set_maskisr ['off'|'steponly']
esp32p4.hp.cpu1 riscv set_mem_access method1 [method2] [method3]
esp32p4.hp.cpu1 riscv set_reset_timeout_sec [sec]
esp32p4.hp.cpu1 riscv use_bscan_tunnel value [type]
esp32p4.hp.cpu1 set_reg dict
esp32p4.hp.cpu1 smp [on|off]
esp32p4.hp.cpu1 smp_gdb
esp32p4.hp.cpu1 was_examined
esp32p4.hp.cpu1 write_memory address width data ['phys']
esp_get_mac [format]
espusbjtag
espusbjtag caps_descriptor descriptor
espusbjtag chip_id chip_id
espusbjtag log logfile.txt
espusbjtag setio tdi tms tck trst srst
espusbjtag tdo
espusbjtag vid_pid vid pid
program_esp <filename> [address] [verify] [reset] [exit] [compress]
[no_clock_boost] [restore_clock] [encrypt]
program_esp_bins <build_dir> flasher_args.json [verify] [reset] [exit]
[compress] [no_clock_boost] [restore_clock]
C:\Espressif\tools\openocd-esp32\v0.12.0-esp32-20241016\openocd-esp32\share\openocd\scripts/target/esp_common.cfg:274: Error:
in procedure 'program_esp_bins'
in procedure 'program_esp'
in procedure 'program_error' called at file "C:\Espressif\tools\openocd-esp32\v0.12.0-esp32-20241016\openocd-esp32\share\openocd\scripts/target/esp_common.cfg", line 443
in procedure '_run_pre_shutdown_commands'
at file "embedded:startup.tcl", line 50
at file "C:\Espressif\tools\openocd-esp32\v0.12.0-esp32-20241016\openocd-esp32\share\openocd\scripts/target/esp_common.cfg", line 274
** Flashing Failed **
-1
Started by GNU MCU Eclipse
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: [esp32p4.hp.cpu0] Unsupported DTM version: -1
Please refer to the troubleshooting guide below to identify the problem.
https://github.com/espressif/openocd-esp32/wiki/Troubleshooting-FAQ
Error: [esp32p4.hp.cpu0] Could not identify target type.
Please refer to the troubleshooting guide below to identify the problem.
https://github.com/espressif/openocd-esp32/wiki/Troubleshooting-FAQ
Error: [esp32p4.hp.cpu1] Unsupported DTM version: -1
Please refer to the troubleshooting guide below to identify the problem.
https://github.com/espressif/openocd-esp32/wiki/Troubleshooting-FAQ
Error: [esp32p4.hp.cpu1] Could not identify target type.
Please refer to the troubleshooting guide below to identify the problem.
https://github.com/espressif/openocd-esp32/wiki/Troubleshooting-FAQ
*****************************************************************************************************************************************
Please help me to solve this problem.
Regards,
D. Vineetha.
…________________________________
From: Erhan Kurubas ***@***.***>
Sent: 16 January 2025 16:51
To: espressif/openocd-esp32 ***@***.***>
Cc: Vineetha D ***@***.***>; Mention ***@***.***>
Subject: Re: [espressif/openocd-esp32] esp_usb_jtag: could not find or open device (OCD-1065) (Issue #355)
Closed #355<#355> as completed.
—
Reply to this email directly, view it on GitHub<#355 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BCDFQCAVBPEGPCEYNE4K74L2K6I5HAVCNFSM6AAAAABVIZLYYKVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJVHE2TKOJVHAYDAMA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Did you check the driver link? #355 (comment) |
_do you have a cable like I explained here? #355 (comment) Yes, Now it is entering into debug mode. Thanks & Regards., |
Development Kit
Esp32P4-Function-EV-Board
Module or chip used
Esp32P4
Debug Adapter
Builtin USB-JTAG
OpenOCD version
v0.12.0-esp32-20241016
Operating System
Windows
Using an IDE ?
Espressif ide
OpenOCD command line
-s ${openocd_path}/share/openocd/scripts -f board/esp32p4-builtin.cfg
JTAG Clock Speed
Default
ESP-IDF version
v5.3.2
Problem Description
I am connecting the one USB cable to the USB-to-UART port for flashing, and the code is successfully flashed and also another usb cable connecting to the USB Power-in Port using adapter. However, when I start debugging, it does not enter debug mode and instead shows errors.
Debug Logs
Expected behavior
Should enter into debug mode
Screenshots
The text was updated successfully, but these errors were encountered: