-
Notifications
You must be signed in to change notification settings - Fork 319
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
JTAG flashing error on 1.9.0 (VSC-1540) #1368
Comments
This issue has been marked as |
Hi @herna, Could you try this version and let me know if it fixes the issue for you? Download the artifacts from this pull request: |
Hello @radurentea, Yes, working fine now. Thank you. |
Hi, Open On-Chip Debugger v0.12.0-esp32-20240318 (2024-03-18-18:26) [/Flash] Info : accepting 'tcl' connection on tcp/6666 Flashing "c:/HW_test1/build/bootloader/bootloader.bin" at 0x1000 ** program_esp input args <0x1000 verify> ** Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: Info : [esp32.cpu0] requesting target halt and executing a soft reset Info : [esp32.cpu0] Debug controller was reset. Info : [esp32.cpu0] Core was reset. Info : [esp32.cpu0] Target halted, PC=0x500000CF, debug_reason=00000000 Info : [esp32.cpu0] Reset cause (3) - (Software core reset) Info : [esp32.cpu1] requesting target halt and executing Info : [esp32.cpu0] Core was reset. Info : [esp32.cpu0] Target halted, PC=0x40000400, debug_ Info : [esp32.cpu1] Target halted, PC=0x40000400, debug_reason=00000000 Info : [esp32.cpu1] Reset cause (14) - (CPU1 reset Info : [esp32.cpu0] Reset cause (3) - (Software core reset) ** Programming Started ** ** Flashing Failed ** [/OpenOCD] Open On-Chip Debugger v0.12.0-esp32-20240318 (2024-03-18-18:26) Info : accepting 'tcl' connection on tcp/6666 Info : accepting 'tcl' connection on tcp/6666 Flashing "c:/HW_test1/build/bootloader/bootloader.bin" at 0x1000 Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1) Warn : [esp32.cpu1] Unexpected OCD_ID = 00000000 Info : [esp32.cpu0] requesting target halt and executing a soft reset Info : [esp32.cpu0] Target halted, PC=0x4000940E, debug_reason=00000 Info : [esp32.cpu0] Debug controller was reset. Info : [esp32.cpu0] Core was reset. Info : [esp32.cpu0] Target halted, PC=0x500000CF, debug_reaso Info : [esp32.cpu0] Reset cause (3) - (Software core reset) ❌ Info : [esp32.cpu1] requesting target halt and executing a soft reset Info : [esp32.cpu0] Core was reset. Info : [esp32.cpu0] Target halted, PC=0x40000400, debug_reason=00000000 Info : [esp32.cpu1] Debug controller was Info : [esp32.cpu1] Core was reset. Info : [esp32.cpu1] Target halted, PC=0x40000400, debug_reason=00000000 Info : [esp32.cpu1] Reset cause Info : [esp32.cpu0] Reset cause (3) - (Software core reset) ** Programming Started ** ** Flashing Failed ** [/OpenOCD] Does anyone have any ideas about this problem? |
Hi @mert-yurt, This is a problem introduces with the 1.9.0 release, which was fixed in the following PR #1382.
If you go with the fix, please let me know if it fixes your JTAG issue. Thank you! |
Thanks for using our extension! 🚀 Your feedback matters! Could you take a moment to rate it on the marketplace? A positive rating helps other developers discover our tools and motivates us to keep improving. ⭐ Rate ESP-IDF Extension: https://marketplace.visualstudio.com/items?itemName=espressif.esp-idf-extension&ssr=false#review-details Your support means a lot to our development team! |
hi @radurentea , I downloaded the VSIX file and I tried to the flashing. this is my output; [OpenOCD] jtag Info : Listening on port 6666 for tcl connections Info : Listening on port 4444 for telnet connections Info : clock speed 1000 kHz Info : JTAG tap: esp32 Info : [esp32.cpu0] Examination succeed Info : [esp32.cpu1] Examination succeed Info : starting gdb server for esp32.cpu0 on 3333 Info : [esp32.cpu0] Target halted, PC=0x400093DB, debug_reason=00000000 Info : [esp32.cpu0] Reset cause (3) - (Software core reset) Info : Set GDB target to 'esp32.cpu0' Info : [esp32.cpu1] Target halted, PC=0x400076DD, debug_reason=00000000 Info : [esp32.cpu1] Reset cause (14) - (CPU1 reset by CPU0) Info : accepting 'tcl' connection on tcp/6666 Info : accepting 'tcl' connection on tcp/6666 Flashing "c:/Users/../ Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), Info : [esp32.cpu0] requesting target halt and executing a soft reset Info : [esp32.cpu0] Debug controller was reset. Info : [esp32.cpu0] Core was reset. Info : [esp32.cpu0] Target halted, PC=0x500000CF, debug_reason=00000000 Info : [esp32.cpu0] Reset cause (3) - (Software core reset) Info : [esp32.cpu1] requesting target halt and executing a soft rese Info : [esp32.cpu0] Core was reset. Info : [esp32.cpu0] Target halted, PC=0x40000400, debug_reason=00000000 Info : [esp32.cpu1] Debug controller w Info : [esp32.cpu1] Target halted, PC=0x40000400, debug_reason=00000000 Info : [esp32.cpu1] Reset cause (14 Info : [esp32.cpu0] Reset cause (3) - (Software core reset) ** Programming Started ** [/OpenOCD] Actually it looks very normal I really dont know why its falling the Flashig Failed. After that I tried at the Debug mode. I'm leaving the debug output below.. [/Flash] [/Debug Adapter] Warn : No symbols for FreeRTOS Info : [esp32.cpu0] Target halted, PC=0x400BE6 Info : Flash mapping 0: 0x10020 -> 0x3f400020, 37 KB Info : [esp32.cpu0] Target halted, PC=0x400BE65A, debug_reason=00000001 Info : Auto-detected flash bank 'esp32.cpu0.flash' size 4096 KB Info : [esp32.cpu0] Target halted, PC=0x400BE65A, debug_reason=00000001 Info : Flash mapping 0: 0x10020 -> 0x3f400020, 37 KB Info : [esp32.cpu0] Target halted, PC=0x400BE65A, debug_reason=00000001 Info : Flash mapping 0: 0x10020 -> 0x3f400020, 37 KB Warn : Prefer GDB command "target extended-remot Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1) Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1) Info : [esp32.cpu0] requesting target halt and executing a soft reset Info : [esp32.cpu0] Debug controller was reset. Info : [esp32.cpu0] Core was reset. Info : [esp32.cpu0] Target halted, PC=0x500000CF, debug_reason=00000000 Info : [esp32.cpu0] Reset cause (3) - (Software core Info : [esp32.cpu1] requesting target halt and execut Info : [esp32.cpu0] Core was reset. Info : [esp32.cpu0] Target halted, PC=0x40000400, debug_reason=00000000 Info : [esp32.cpu1] Debug controller was reset. Info : [esp32.cpu1] Core was reset. Info : [esp32.cpu1] Target halted, PC=0x40000400, debug_reason=00000000 Info : [esp32.cpu1] Reset cause (14) - (CPU1 reset b Info : [esp32.cpu0] Reset cause (3) - (Software core reset Info : [esp32.cpu0] Target halted, PC=0x400BE65A, debug_reason=00000001 Info : Flash mapping 0: 0x10020 -> 0x3f400020, 37 KB Info : Flash mapping 1: 0x20020 -> 0x400d0020, 77 KB Info : [esp32.cpu0] Target halted, PC=0x400BE65A, debug_reason=00000001 Info : Flash mapping 0: 0x10020 -> 0x3f400020, 37 KB Info : Flash mapping 1: 0x20020 -> 0x400d0020, 77 KB Info : [esp32.cpu0] Target halted, PC=0x400BE65A, debug_reason=00000001 Info : Flash mapping 0: 0x10020 -> 0x3f400020, 37 KB Info : Flash mapping 1: 0x20020 -> 0x400d0020, 77 KB Info : [esp32.cpu0] Target halted, PC=0x400BE65A, debug_reason=00000001 Info : Flash mapping 0: 0x10020 -> 0x3f400020, 37 KB Info : dropped 'gdb' conne Info : accepting 'gdb' connection on tcp/3333 Info : New GDB Connection: 2, Target Info : [esp32.cpu0] Target halt Info : Set GDB target to 'esp32.cpu0' Info : [esp32.cpu1] Target halted, PC=0x400076DD, debug_reason=00000000 Info : dropped 'gdb' connection [/OpenOCD] Exception in thread Thread-2 (_readerthread): File "threading.py", line 975, in run File "subprocess.py", line 1552, in _readerthread DEBUG_ADAPTER_STOPPED [Stopped] : ESP-IDF Debug Adapter |
Hi @mert-yurt, Hmm... I don't have enough details to troubleshoot properly, but lets try a few things:
If it does work, try again with the new .vsix installer I've provided and if it fails again do the following:
|
possibly a duplicate of #1413 ? |
hi @radurentea, I did everything what you said but it still doesn't work. I noticed some things. If I try to debug the device with JTAG after programming it with Serial UART, it fails on the first try but succeeds on the second try. I dont know does it help us for the solve the problem. this is the first and second debugging; [/OpenOCD] [/Debug Adapter] Info : [esp32.cpu0] Target halted, PC=0x40084D96, debug_reason=00000000 Info : Set GDB target to 'esp32.cpu0' Info : [esp32.cpu1] Target halted, PC=0x40084D96, debug_reason=00000000 Warn : No symbols for FreeRTOS! Info : [esp32.cpu0] Target halted, PC=0x400BE65A, debug_reason=00000001 Info : Flash mapping 0: 0x10020 -> 0x3f400020, 44 KB Info : [esp32.cpu0] Target halted, PC=0x400BE65A, debug_reason=00000001 Info : Auto-detected flash bank 'esp32.cpu0.flas Info : [esp32.cpu0] Target halted, PC=0x400BE65A, debug_reason=00000001 Info : Flash mapping 0: 0x10020 -> 0x3f400020, 44 KB Info : [esp32.cpu0] Target halted, PC=0x400BE65A, debug_reason=00000001 Info : Flash mapping 0: 0x10020 -> 0x3f400020, 44 KB Info : dropped 'gdb' connection [/OpenOCD] [Stopped] : ESP-IDF Debug Adapter DEBUG_ADAPTER_STARTED [/Debug Adapter] Warn : No symbols for FreeRTOS! Warn : Prefer GDB command "target extended-remote :3333" instead of "target remote :3333" Info : Detected FreeRTOS version: (10.5.1) Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1) Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1) Info : [esp32.cpu0] requesting target halt and executing a soft reset Info : [esp32.cpu0] Debug controller was reset. Info : [esp32.cpu0] Core was reset. Info : [esp32.cpu0] Target halted, PC=0x500000CF, debug_reason=00000000 Info : [esp32.cpu0] Reset cause (3) - (Software core reset) Info : [esp32.cpu1] requesting target halt and executing a soft reset Info : [esp32.cpu0] Core was reset. Info : [esp32.cpu0] Target halted, PC=0x40000400, debug_reason=00000000 Info : [esp32.cpu1] Debug controller was reset. Info : [esp32.cpu1] Core was reset. Info : [esp32.cpu1] Target halted, PC=0x40000400, debug_reason=00000000 Info : [esp32.cpu1] Reset cause (14) - (CPU1 reset by CPU0) Info : [esp32.cpu0] Reset cause (3) - (Software core reset) Info : [esp32.cpu0] Target halted, PC=0x400BE65A, debug_reason=00000001 Info : Flash mapping 0: 0x10020 -> 0x3f400020, 44 KB Info : Using flash bank 'esp32.cpu0.irom' size 92 KB Info : [esp32.cpu0] Target halted, PC=0x400BE65A, debug_reason=00000001 Info : Flash mapping 0: 0x10020 -> 0x3f400020, 44 KB Info : [esp32.cpu0] Target halted, PC=0x Info : Flash mapping 0: 0x10020 -> 0x3f400020, 44 KB Info : [esp32.cpu0] Target halted, PC=0x400BE65A, debug_reason=00000001 Info : Flash mapping 0: 0x10020 -> 0x3f Info : dropped 'gdb' connection Info : accepting 'gdb' connection on tcp/3333 Info : Detected FreeRTOS version: (10.5.1) Info : New GDB Connection: 3, Target esp32.cpu0, state: halted Info : [esp32.cpu0] Target halted, PC=0x400D5693, debug_reason=00000001 Info : Set GDB target to 'esp32.cpu0' Info : [esp32.cpu1] Target halted, PC=0x40084D96, debug_reason=00000000 |
Btw this is the "Doctor command" output; |
Hi @mert-yurt, Thank you for all these information. I'm assuming this is the result after using the .vsix file, right? The issue appears to be related to the state of the ESP32 after UART programming. The first debug attempt fails because the device might still be in an inconsistent state, but the second attempt succeeds. After flashing with UART, can you press the reset button from the board, just to see if there are any issues with OpenOCD note resetting the board correctly. Also, have you tried using the 1.8.1 release version? https://github.com/espressif/vscode-esp-idf-extension/releases |
Hi @mert-yurt, I will be closing this issue since the initial JTAG issue has been fixed. Thank you! |
Thanks for using our extension! 🚀 Your feedback matters! Could you take a moment to rate it on the marketplace? A positive rating helps other developers discover our tools and motivates us to keep improving. ⭐ Rate ESP-IDF Extension: https://marketplace.visualstudio.com/items?itemName=espressif.esp-idf-extension&ssr=false#review-details Your support means a lot to our development team! |
OS
Windows
Operating System version
Windows 10
Visual Studio Code version
1.96
ESP-IDF version
5.3.2
Python version
3.11
Doctor command output
doctor.txt
Extension
esp_idf_vsc_ext.log
Description
I have an ESP-PROG connected to ESP32
I can't flash through JTAG unless ESP32 is in "boot" mode and UART0 connected.
Even if you try to flash ESP32 through JTAG, it seems version 1.9.0 of the extension tries to use UART connection somehow no matter what. The extension says at the end "flash through JTAG" but as I said, UART connection must be available and device in boot mode.
I just downgraded to version 1.8.1 and everything works as expected, I am able to use JTAG without UART connection.
There are other users with this problem: https://esp32.com/viewtopic.php?f=40&t=43461
Debug Message
debug.txt
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: