From 853e52472d31ade20084f3dfe93b4ee50c4b16fb Mon Sep 17 00:00:00 2001 From: Alexey Brodkin Date: Thu, 26 Nov 2020 17:15:50 +0300 Subject: [PATCH] board: arc: hsdk_2cores: Re-add missing taps into JTAG chain On introduction of a "simplified" HSDK configuration where we only use 2 cores out of 4 (in assumption that it will be working much more reliably) we excluded a bit too much of details from OpenOCD script. In particular we stripped not-used cores from JTAG chain description which made OpenOCD quite unhappy: ----------------------------->8---------------------------- Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling" Info : clock speed 10000 kHz Info : JTAG tap: arc-em.cpu2 tap/device found: 0x200c24b1 (mfg: 0x258 (ARC International), part: 0x00c2, ver: 0x2) Warn : JTAG tap: arc-em.cpu2 UNEXPECTED: 0x200c24b1 (mfg: 0x258 (ARC International), part: 0x00c2, ver: 0x2) Error: JTAG tap: arc-em.cpu2 expected 1 of 1: 0x200424b1 (mfg: 0x258 (ARC International), part: 0x0042, ver: 0x2) Info : JTAG tap: arc-em.cpu1 tap/device found: 0x200824b1 (mfg: 0x258 (ARC International), part: 0x0082, ver: 0x2) Warn : JTAG tap: arc-em.cpu1 UNEXPECTED: 0x200824b1 (mfg: 0x258 (ARC International), part: 0x0082, ver: 0x2) Error: JTAG tap: arc-em.cpu1 expected 1 of 1: 0x200024b1 (mfg: 0x258 (ARC International), part: 0x0002, ver: 0x2) Info : JTAG tap: auto0.tap tap/device found: 0x200424b1 (mfg: 0x258 (ARC International), part: 0x0042, ver: 0x2) Info : JTAG tap: auto1.tap tap/device found: 0x200024b1 (mfg: 0x258 (ARC International), part: 0x0002, ver: 0x2) Error: Trying to use configured scan chain anyway... ----------------------------->8---------------------------- That lead us to the situation when the target cores were programmed in a wrong way effectively failing all tests. Fixing it now. Signed-off-by: Alexey Brodkin --- boards/arc/hsdk/support/openocd-2-cores.cfg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/boards/arc/hsdk/support/openocd-2-cores.cfg b/boards/arc/hsdk/support/openocd-2-cores.cfg index 1060e695b83..7e1c6a6ba54 100644 --- a/boards/arc/hsdk/support/openocd-2-cores.cfg +++ b/boards/arc/hsdk/support/openocd-2-cores.cfg @@ -41,6 +41,10 @@ set _CHIPNAME arc-em # OpenOCD discovers JTAG TAPs in reverse order. +set _TARGETNAME4 $_CHIPNAME.cpu4 +jtag newtap $_CHIPNAME cpu4 -irlen 4 -ircapture 0x1 -expected-id 0x200c24b1 +set _TARGETNAME3 $_CHIPNAME.cpu3 +jtag newtap $_CHIPNAME cpu3 -irlen 4 -ircapture 0x1 -expected-id 0x200824b1 set _TARGETNAME2 $_CHIPNAME.cpu2 jtag newtap $_CHIPNAME cpu2 -irlen 4 -ircapture 0x1 -expected-id 0x200424b1 set _TARGETNAME1 $_CHIPNAME.cpu1