Monday, May 21st 2018, 5:23am UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Date of registration: Aug 26th 2016

Posts: 4

1

Friday, August 26th 2016, 4:56pm

[SOLVED] JTAG error on Raspberry Pi 2 memory access

Hi all,
I am trying to connect to the RPi2 JTAG.
I have the following setup
- Raspberry Pi 2 running Raspbian 8.0 (Jessie)
- OpenOCD 0.9.0 with a J-Link EDU connected to a Ubuntu system.

I setup the GPIO in order to expose the JTAG interface and the JTAG connection works: I can halt/resume processors.
The issues start whenever I tried to access the memory (with the CPU halted).
For example

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
> halt                                 
ttbcr 0ttbr0 378a806attbr1 406a
rpi2.cpu.3 rev 5, partnum c07, arch f, variant 0, implementor 41
number of cache level 2
cache l2 present :not supported
rpi2.cpu.3 cluster f core 3 multi core
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x60000093 pc: 0x80021868
MMU: enabled, D-Cache: enabled, I-Cache: enabled

> dump_image ram.bin 0x08000 0x1000
timeout waiting for DSCR bit change
in procedure 'cache_config'


Is there anyone aware of this issue?
Is there anything I can do to dig into the problem? I was thinking about disabling the cache...

Any help would be appreciated.
Best
Alex

SEGGER - Niklas

Super Moderator

Date of registration: Oct 6th 2014

Posts: 1,691

2

Friday, August 26th 2016, 5:43pm

Hi Alex,

There is a bug that causes Full-Speed-USB J-Links (V9 and older, J-Link Pro V3 and older) to not work correctly with OpenOCD. (We need to look into this, but at the moment, we assume that has to be fixed on OpenOCD side)

Could please open and make a screenshot of J-Link Commander (JLinkExe)?

Best regards,
Niklas
Would you like to be added to the J-Link software update notification list, so you get informed automatically when a new version becomes available?
Just write me a PM or in case you want to subscribe to it yourself, please use this link: Link
Notification for J-Link, J-Link Debugger, SystemView & J-Scope: Link
Notification for Embedded Studio: Link

Date of registration: Aug 26th 2016

Posts: 4

3

Monday, August 29th 2016, 5:41am

Hi Niklas,
as per your suggestion I launched JLinkExe (V6.00g).
As soon I connected the J-Link device it upgraded the J-Link firmware (without no possibility to avoid this)

Source code

1
2
3
4
5
6
7
Connecting to J-Link via USB...Updating firmware:  J-Link V9 compiled Aug 17 2016 11:20:49
Replacing firmware: J-Link V9 compiled Oct  9 2015 20:34:47
Waiting for new firmware to boot
New firmware booted successfully
O.K.
Firmware: J-Link V9 compiled Aug 17 2016 11:20:49
Hardware version: V9.30


After the upgrade I wasn't able to get the device working

1) JlinkExe doesn't found any chain (HW setup as before with OpenOCD)

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify device / core. <Default>: Unspecified
Type '?' for selection dialog
Device>?
Please specify target interface:
  J) JTAG (Default)
  S) SWD
  F) FINE
  I) ICSP
  C) C2
TIF>J
Device position in JTAG chain (IRPre,DRPre) <Default>: -1,-1 => Auto-detect
JTAGConf>
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>1000
No valid device has been selected.


How can I specify the JTAG chain?
In openOCD I have a working config if that can be helpful.

2) The J-Link device doesn't work with OpenOCD anymore due to USB errors X(

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Info : J-Link V9 compiled Aug 17 2016 11:20:49
Info : J-Link caps 0xb9ff7bbf
Info : J-Link hw version 93000
Info : J-Link hw type J-Link
Info : J-Link max mem block 69952
Info : J-Link configuration
Info : USB-Address: 0x0
Info : Kickstart power on JTAG-pin 19: 0xffffffff
Info : Vref = 3.329 TCK = 0 TDI = 0 TDO = 1 TMS = 0 SRST = 1 TRST = 1
Info : J-Link JTAG Interface ready
Info : clock speed 1000 kHz
Error: usb_bulk_read failed (requested=87, result=0)
Error: jlink_tap_execute failed USB io (-107)
Error: Trying to use configured scan chain anyway...
Error: usb_bulk_write failed (requested=10, result=0)
Error: jlink_tap_execute failed USB io (-107)
Error: usb_bulk_write failed (requested=6, result=0)
Error: jlink_tap_execute failed USB io (-107)
Warn : Bypassing JTAG setup events due to errors
Error: usb_bulk_write failed (requested=92, result=0)
Error: jlink_tap_execute failed USB io (-107)
Error: usb_bulk_write failed (requested=88, result=0)


How can I revert back to the previous firmware?

Thanks
Alex

SEGGER - Alex

Super Moderator

Date of registration: Dec 18th 2007

Posts: 1,516

4

Friday, September 2nd 2016, 4:53pm

How to revert the J-Link firmware is explained in the J-Link User Guide.
Please note that you are doing this on your own risk and that there is no support given for older firmware versions.


Best regards
Alex

SEGGER - Niklas

Super Moderator

Date of registration: Oct 6th 2014

Posts: 1,691

5

Wednesday, September 7th 2016, 3:33pm

Hello Forum,

the issue regarding OpenOCD + J-Link models with Full Speed USB (V9 and older) has been fixed with the firmware "J-Link V9 compiled Sep 1 2016 18:29:50" or later, which is included in V6.00i or higher of the J-Link software & documentation pack.

Best regards,
Niklas
Would you like to be added to the J-Link software update notification list, so you get informed automatically when a new version becomes available?
Just write me a PM or in case you want to subscribe to it yourself, please use this link: Link
Notification for J-Link, J-Link Debugger, SystemView & J-Scope: Link
Notification for Embedded Studio: Link

Date of registration: Aug 26th 2016

Posts: 4

6

Saturday, September 10th 2016, 10:11am


the issue regarding OpenOCD + J-Link models with Full Speed USB (V9 and older) has been fixed with the firmware "J-Link V9 compiled Sep 1 2016 18:29:50" or later, which is included in V6.00i or higher


Guys, thanks a lot!
I upgraded the J-Link firmware to the latest version and everything is back to normal with OpenOCD! :thumbsup:

Date of registration: Aug 26th 2016

Posts: 4

7

Saturday, September 10th 2016, 10:27am


Could please open and make a screenshot of J-Link Commander (JLinkExe)?


Please find attached a screenshot of JLinkExe; it seems JLinkExe doesn't detect the Raspberry Pi.
I am sure the connection are fine because I am able to connect with OpenOCD using the same hardware setup.

Is there anything I can try to make the JLinkExe work with the Pi?

Thanks for your support.
Alex
AlessandroDN has attached the following image:
  • Screen Shot 2016-09-10 at 11.26.48.png

SEGGER - Niklas

Super Moderator

Date of registration: Oct 6th 2014

Posts: 1,691

8

Monday, September 12th 2016, 9:27am

Hi Alex,

as their is no "device specific" support for the Raspberry Pi (BCM 2835/2836/2837), you just need to specify the core, which should be Cortex-A7 for the Raspberry Pi II.

Best regards,
Niklas
Would you like to be added to the J-Link software update notification list, so you get informed automatically when a new version becomes available?
Just write me a PM or in case you want to subscribe to it yourself, please use this link: Link
Notification for J-Link, J-Link Debugger, SystemView & J-Scope: Link
Notification for Embedded Studio: Link