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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/target/adiv5.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,14 @@
* for the second and third JTAG-DPs which are still JTAG-DPv0.
*/
#define JTAG_IDCODE_PARTNO_SOC400_4BIT_ERRATA 0xba01U

/*
* ARM JTAG PARTNO values from Cortex-M33 TRM (ARM document ID 100230, issue 0100)
* A.4.2.2 Identification Code register, IDCODE, Table A-13 pg98
* (for TEALDAP/CM33DAP MINDP SWJ-DP/JTAG-DP)
*/
#define JTAG_IDCODE_PARTNO_SOC400_4BIT_CM33 0xba04U

/*
* ARM JTAG PARTNO values from CoreSight SoC-600 TRM (ARM document ID 101883, issue 0101-00)
* §10.2.2 css600_dp register descriptions, Table 10-2 pg90
Expand Down
3 changes: 3 additions & 0 deletions src/target/adiv5_jtag.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ void adiv5_jtag_dp_handler(const uint8_t dev_index)
/* Correct the LPC43xx errata PARTNO values */
if (dp->partno == JTAG_IDCODE_PARTNO_SOC400_4BIT_ERRATA)
dp->partno = JTAG_IDCODE_PARTNO_SOC400_4BIT;
/* Correct the GD32E50x PARTNO value */
else if (dp->partno == JTAG_IDCODE_PARTNO_SOC400_4BIT_CM33)
dp->partno = JTAG_IDCODE_PARTNO_SOC400_4BIT;

if (dp->partno == JTAG_IDCODE_PARTNO_SOC400_4BIT || dp->partno == JTAG_IDCODE_PARTNO_SOC400_8BIT)
dp->version = 0U;
Expand Down
Loading