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

Fix: Treat GD32E508 in JTAG transport as ADIv5 #2053

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

ALTracer
Copy link
Contributor

Detailed description

  • No new features.
  • The existing problem is GD32E508ZE device no longer accepted by BMD since introduction of Feature: ADIv6 JTAG support #1981 ADIv6 JTAG-DP support, v1.10.0-1445-g e010084 (bisected), because this chip is only ADIv5.
  • The PR "solves" it by recognizing 0xba04 partno and setting DP version to 0 like older JTAG-DP, which used to work.

A temporary patch "like LPC43xx errata" may not be ideal, because this is not mentioned in GD32E5 errata, but likely ends up an actual Cortex-M33 DAP ("TEALDAP") that is SWJ-DP MINDP. But I leave DPv0/v1 and ADIv6 DPv3 distinction details to maintainers. It works with JLink and with OpenOCD, and it used to work with BMD, it's not new.
Note: the other in-tree CM33 chips, STM32H5, identify as 0xba00 which corresponds to CoreSight SoC-400 JTAG-DP, and ST is known to have used CoreSight SoC-400 IP in STM32H7/MP15 (SWO and TPIU at least). And RP2350 (ADIv6) relies on SW-DP.

Tested using BMDA v2.0.0-rc1 driving JLink V9, also driving blackpill-f411ce around v1.10.0-1200 (as remote v0 adapter without HL).

ID code 0x0ba04477: ADIv5 JTAG-DP port.
ID code 0x790007a3: Gigadevice BSD.
Unknown JTAG-DP found, please report partno code ba04
Not using ADIv5 acceleration commands
DP DPIDR 0x0be11477 (v1 MINDP rev0) designer 0x43b partno 0xbe

Your checklist for this pull request

Closing issues

@dragonmux dragonmux added this to the v2.0 release milestone Jan 15, 2025
@dragonmux dragonmux added Bug Confirmed bug Regression Bug caused by a regression labels Jan 15, 2025
Copy link
Member

@dragonmux dragonmux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM pending the fix we're working on writing to make the DP versioning behaviour correct in the low-level. Please rebase this on main and we'll get it merged.

Thank you for the contribution!

@dragonmux dragonmux merged commit cff3b4e into blackmagic-debug:main Jan 15, 2025
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed bug Regression Bug caused by a regression
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants