Skip to content
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

Open
1 task done
herna opened this issue Dec 16, 2024 · 5 comments · May be fixed by #1382
Open
1 task done

JTAG flashing error on 1.9.0 (VSC-1540) #1368

herna opened this issue Dec 16, 2024 · 5 comments · May be fixed by #1382
Assignees
Labels
bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue) ongoing Ongoing Issue or PR, this label will be used for issue or PR which is to be excluded by stale bot

Comments

@herna
Copy link

herna commented Dec 16, 2024

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

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@herna herna added the bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue) label Dec 16, 2024
@github-actions github-actions bot changed the title JTAG flashing error on 1.9.0 JTAG flashing error on 1.9.0 (VSC-1540) Dec 16, 2024
@radurentea radurentea self-assigned this Dec 18, 2024
@radurentea radurentea linked a pull request Dec 23, 2024 that will close this issue
5 tasks
Copy link

github-actions bot commented Jan 3, 2025

This issue has been marked as stale since there are no activities, and this will be closed in 5 days if there are no further activities

@github-actions github-actions bot added the stale Stale PR or Issue label Jan 3, 2025
@github-actions github-actions bot closed this as completed Jan 8, 2025
@radurentea radurentea added ongoing Ongoing Issue or PR, this label will be used for issue or PR which is to be excluded by stale bot and removed stale Stale PR or Issue labels Jan 8, 2025
@radurentea radurentea reopened this Jan 8, 2025
@radurentea
Copy link
Collaborator

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:
You can test these changes by installing this VSIX by click menu View -> Command Palette..., type Install from VSIX and then select downloaded esp-idf-extension.vsix file to install the extension.

@herna
Copy link
Author

herna commented Jan 8, 2025

Hello @radurentea,

Yes, working fine now.

Thank you.

@mert-yurt
Copy link

Hi,
I have the same problem. I can debug and flash by UART but I cant by JTAG. It was properly working last week with JTAG. I dont know what did it happen. This is my entire output;

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

[/Flash]
[OpenOCD]
Info : accepting 'tcl' connection on tcp/6666
Info : dropped 'tcl' connection

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:
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] De
bug 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)

** Programming Started **

** Flashing Failed **
-1

[/OpenOCD]
[Flash]
Failed to flash the device (JTag), please try again [got response: '-1', expecting: '0']
Flash has finished. You can monitor with ESP-IDF: Monitor your device command

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 : accepting 'tcl' connection on tcp/6666
Info : dropped 'tcl' connection

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: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 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
000

Info : [esp32.cpu0] Debug controller was reset.

Info : [esp32.cpu0] Core was reset.

Info : [esp32.cpu0] Target halted, PC=0x500000CF, debug_reaso
n=00000000

Info : [esp32.cpu0] Reset cause (3) - (Software core reset)

❌ Info : [esp32.cpu1] requesting target halt and executing a soft reset
Error: Target not examined yet

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)

** Programming Started **

** Flashing Failed **
-1

[/OpenOCD]
[Flash]
Failed to flash the device (JTag), please try again [got response: '-1', expecting: '0']
Flash has finished. You can monitor with ESP-IDF: Monitor your device command

Does anyone have any ideas about this problem?

@radurentea
Copy link
Collaborator

Hi @mert-yurt,

This is a problem introduces with the 1.9.0 release, which was fixed in the following PR #1382.
Right now, you have two options: You can either download the .vsix file following the instructions bellow, or use the 1.8.1 release of the extension from https://github.com/espressif/vscode-esp-idf-extension/releases

Download the artifacts from this pull request: You can test these changes by installing this VSIX by click menu View -> Command Palette..., type Install from VSIX and then select downloaded esp-idf-extension.vsix file to install the extension.

If you go with the fix, please let me know if it fixes your JTAG issue. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue) ongoing Ongoing Issue or PR, this label will be used for issue or PR which is to be excluded by stale bot
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants