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

[VSC-1575] Remove port validation for Jtag; Fix timing bug #1413

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

radurentea
Copy link
Collaborator

Description

  • Remove serial port validation when flashing with JTAG
  • Add validation to make sure OpenOCD accepts commands before we try flashing

Fixes #1411

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Steps to test this pull request

  • Try to flash a project using JTAG, without selecting a port

There should not be any issues for not selecting a port and there should not be any timing issues between OpenOCD and JTAG Flashing.
Example of timing issue:

Open On-Chip Debugger v0.12.0-esp32-20241016 (2024-10-16-14:17)
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html

debug_level: 2

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

Info : Listening on port 6666 for tcl connections

Info : Listening on port 4444 for telnet connections

[/OpenOCD]
[Flash]
Failed to flash (via JTag), due to some unknown error in tcl, please try to relaunch open-ocd
[/Flash]
[OpenOCD]
Info : esp_usb_jtag: serial (40:4C:CA:51:3
5:A8)

Info : esp_usb_jtag: Device found. Base speed 24000KHz, div range 1 to 255

Info : clock speed 24000 kHz

Info : JTAG tap: esp32c6.tap
0 tap/device found: 0x0000dc25 (mfg: 0x612 (Espressif Systems), part: 0x000d, ver: 0x0)

Info : [esp32c6] datacoun
t=2 progbufsize=16

Info : [esp32c6] Examined RISC-V core; found 
2 harts
Info : [esp32c6]  XLEN=32, misa=0x40903105
Info : [esp32c6] Examination succeed
Info : [esp32c6] starting gdb server 
on 3333
Info : Listening on port 3333 for gdb connections

Info : accepting 'tcl' connection on tcp/6666
Info : dropped 'tcl' connection

How has this been tested?

As described above

Test Configuration:

  • ESP-IDF Version: 5.4
  • OS (Windows,Linux and macOS): Windows 11

Checklist

  • PR Self Reviewed
  • Applied Code formatting
  • Added Documentation
  • Added Unit Test
  • Verified on all platforms - Windows,Linux and macOS

- Remove serial port validation when flashing with JTAG
- Add validation to make sure OpenOCD accepts commands before we try flashing
@radurentea radurentea self-assigned this Jan 28, 2025
Copy link

Download the artifacts for 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Flash via JTAG _without_ serial (VSC-1575)
1 participant