Re: HOW2: Repair Pogo E02 with Raspberry PI (JTAG) and OpenOCD
May 30, 2015 06:33AM
I tried to compile opnocd, unfortunately the command
sudo make install
ends with an error
root@raspberrypi:/openocd-git# make install
Making install in jimtcl
make[1]: Entering directory '/openocd-git/jimtcl'
make[1]: Nothing to be done for 'install'.
make[1]: Leaving directory '/openocd-git/jimtcl'
Making install in src
make[1]: Entering directory '/openocd-git/src'
make  install-recursive
make[2]: Entering directory '/openocd-git/src'
Making install in jtag
make[3]: Entering directory '/openocd-git/src/jtag'
make  install-recursive
make[4]: Entering directory '/openocd-git/src/jtag'
Making install in hla
make[5]: Entering directory '/openocd-git/src/jtag/hla'
make[6]: Entering directory '/openocd-git/src/jtag/hla'
make[6]: Nothing to be done for 'install-exec-am'.
make[6]: Nothing to be done for 'install-data-am'.
make[6]: Leaving directory '/openocd-git/src/jtag/hla'
make[5]: Leaving directory '/openocd-git/src/jtag/hla'
Making install in aice
make[5]: Entering directory '/openocd-git/src/jtag/aice'
make[6]: Entering directory '/openocd-git/src/jtag/aice'
make[6]: Nothing to be done for 'install-exec-am'.
make[6]: Nothing to be done for 'install-data-am'.
make[6]: Leaving directory '/openocd-git/src/jtag/aice'
make[5]: Leaving directory '/openocd-git/src/jtag/aice'
Making install in drivers
make[5]: Entering directory '/openocd-git/src/jtag/drivers'
Making install in usb_blaster
make[6]: Entering directory '/openocd-git/src/jtag/drivers/usb_blaster'
make[7]: Entering directory '/openocd-git/src/jtag/drivers/usb_blaster'
make[7]: Nothing to be done for 'install-exec-am'.
make[7]: Nothing to be done for 'install-data-am'.
make[7]: Leaving directory '/openocd-git/src/jtag/drivers/usb_blaster'
make[6]: Leaving directory '/openocd-git/src/jtag/drivers/usb_blaster'
make[6]: Entering directory '/openocd-git/src/jtag/drivers'
make[7]: Entering directory '/openocd-git/src/jtag/drivers'
make[7]: Nothing to be done for 'install-exec-am'.
 /bin/mkdir -p '/usr/share/openocd/OpenULINK'
 /usr/bin/install -c -m 644 ./OpenULINK/ulink_firmware.hex '/usr/share/openocd/OpenULINK'
make[7]: Leaving directory '/openocd-git/src/jtag/drivers'
make[6]: Leaving directory '/openocd-git/src/jtag/drivers'
make[5]: Leaving directory '/openocd-git/src/jtag/drivers'
make[5]: Entering directory '/openocd-git/src/jtag'
make[6]: Entering directory '/openocd-git/src/jtag'
make[6]: Nothing to be done for 'install-exec-am'.
make[6]: Nothing to be done for 'install-data-am'.
make[6]: Leaving directory '/openocd-git/src/jtag'
make[5]: Leaving directory '/openocd-git/src/jtag'
make[4]: Leaving directory '/openocd-git/src/jtag'
make[3]: Leaving directory '/openocd-git/src/jtag'
Making install in helper
make[3]: Entering directory '/openocd-git/src/helper'
make[4]: Entering directory '/openocd-git/src/helper'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/openocd-git/src/helper'
make[3]: Leaving directory '/openocd-git/src/helper'
Making install in target
make[3]: Entering directory '/openocd-git/src/target'
make  install-recursive
make[4]: Entering directory '/openocd-git/src/target'
Making install in openrisc
make[5]: Entering directory '/openocd-git/src/target/openrisc'
make[6]: Entering directory '/openocd-git/src/target/openrisc'
make[6]: Nothing to be done for 'install-exec-am'.
make[6]: Nothing to be done for 'install-data-am'.
make[6]: Leaving directory '/openocd-git/src/target/openrisc'
make[5]: Leaving directory '/openocd-git/src/target/openrisc'
make[5]: Entering directory '/openocd-git/src/target'
make[6]: Entering directory '/openocd-git/src/target'
make[6]: Nothing to be done for 'install-exec-am'.
make[6]: Leaving directory '/openocd-git/src/target'
make[5]: Leaving directory '/openocd-git/src/target'
make[4]: Leaving directory '/openocd-git/src/target'
make[3]: Leaving directory '/openocd-git/src/target'
Making install in transport
make[3]: Entering directory '/openocd-git/src/transport'
make[4]: Entering directory '/openocd-git/src/transport'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/openocd-git/src/transport'
make[3]: Leaving directory '/openocd-git/src/transport'
Making install in flash
make[3]: Entering directory '/openocd-git/src/flash'
Making install in nor
make[4]: Entering directory '/openocd-git/src/flash/nor'
make[5]: Entering directory '/openocd-git/src/flash/nor'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '/openocd-git/src/flash/nor'
make[4]: Leaving directory '/openocd-git/src/flash/nor'
Making install in nand
make[4]: Entering directory '/openocd-git/src/flash/nand'
make[5]: Entering directory '/openocd-git/src/flash/nand'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '/openocd-git/src/flash/nand'
make[4]: Leaving directory '/openocd-git/src/flash/nand'
make[4]: Entering directory '/openocd-git/src/flash'
make[5]: Entering directory '/openocd-git/src/flash'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '/openocd-git/src/flash'
make[4]: Leaving directory '/openocd-git/src/flash'
make[3]: Leaving directory '/openocd-git/src/flash'
Making install in svf
make[3]: Entering directory '/openocd-git/src/svf'
make[4]: Entering directory '/openocd-git/src/svf'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/openocd-git/src/svf'
make[3]: Leaving directory '/openocd-git/src/svf'
Making install in xsvf
make[3]: Entering directory '/openocd-git/src/xsvf'
make[4]: Entering directory '/openocd-git/src/xsvf'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/openocd-git/src/xsvf'
make[3]: Leaving directory '/openocd-git/src/xsvf'
Making install in pld
make[3]: Entering directory '/openocd-git/src/pld'
make[4]: Entering directory '/openocd-git/src/pld'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/openocd-git/src/pld'
make[3]: Leaving directory '/openocd-git/src/pld'
Making install in server
make[3]: Entering directory '/openocd-git/src/server'
make[4]: Entering directory '/openocd-git/src/server'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/openocd-git/src/server'
make[3]: Leaving directory '/openocd-git/src/server'
Making install in rtos
make[3]: Entering directory '/openocd-git/src/rtos'
make[4]: Entering directory '/openocd-git/src/rtos'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/openocd-git/src/rtos'
make[3]: Leaving directory '/openocd-git/src/rtos'
make[3]: Entering directory '/openocd-git/src'
make[4]: Entering directory '/openocd-git/src'
 /bin/mkdir -p '/usr/bin'
  /bin/bash ../libtool   --mode=install /usr/bin/install -c openocd '/usr/bin'
libtool: install: /usr/bin/install -c openocd /usr/bin/openocd
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/openocd-git/src'
make[3]: Leaving directory '/openocd-git/src'
make[2]: Leaving directory '/openocd-git/src'
make[1]: Leaving directory '/openocd-git/src'
Making install in doc
make[1]: Entering directory '/openocd-git/doc'
restore=: && backupdir=".am$$" && \
am__cwd=`pwd` && CDPATH="${ZSH_VERSION+.}:" && cd . && \
rm -rf $backupdir && mkdir $backupdir && \
if (makeinfo --version) >/dev/null 2>&1; then \
  for f in openocd.info openocd.info-[0-9] openocd.info-[0-9][0-9] openocd.i[0-9] openocd.i[0-9][0-9]; do \
    if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; \
  done; \
else :; fi && \
cd "$am__cwd"; \
if makeinfo   -I . \
 -o openocd.info openocd.texi; \
then \
  rc=0; \
  CDPATH="${ZSH_VERSION+.}:" && cd .; \
else \
  rc=$?; \
  CDPATH="${ZSH_VERSION+.}:" && cd . && \
  $restore $backupdir/* `echo "./openocd.info" | sed 's|[^/]*$||'`; \
fi; \
rm -rf $backupdir; exit $rc
openocd.texi:8463: Unknown command `raggedright'.
openocd.texi:8468: Bad argument `raggedright' to `@end', using `table'.
openocd.texi:8468: @item found outside of an insertion block.
openocd.texi:8470: @item found outside of an insertion block.
openocd.texi:8472: @item found outside of an insertion block.
openocd.texi:8475: @item found outside of an insertion block.
openocd.texi:8478: Unmatched `@end'.
makeinfo: Removing output file `openocd.info' due to errors; use --force to preserve.
Makefile:301: recipe for target 'openocd.info' failed
make[1]: *** [openocd.info] Error 1
make[1]: Leaving directory '/openocd-git/doc'
Makefile:435: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
Re: HOW2: Repair Pogo E02 with Raspberry PI (JTAG) and OpenOCD
May 30, 2015 10:48AM
"sudo make install" is the Installation after compilation

what steps did you do before?
logged in as user pi?
And what was the output of the compiler (openocd_build.log), here you can find the Errors.

PS: the compilation takes about 30min to 1 hour before you get back prompt in your terminal.

Looks like you messed up something with your compilation because there was nothing to install......



Edited 4 time(s). Last edit at 05/30/2015 11:39AM by joerg_999.
Re: HOW2: Repair Pogo E02 with Raspberry PI (JTAG) and OpenOCD
June 01, 2015 04:16AM
No i logged in as root.
if i log in as normal user it is the output:
marco@raspberrypi:/openocd-git$ {
>  ./bootstrap &&\
>  ./configure --enable-sysfsgpio \
> --enable-maintainer-mode \
> --disable-werror \
> --enable-legacy-ft2232_libftdi \
> --enable-openjtag_ftdi \
> --prefix=/usr\
>  &&\
>  make
>  } > openocd_build.log 2>&1
-bash: openocd_build.log: Permission denied
Seems i can not access to openocd_build.log



Edited 1 time(s). Last edit at 06/01/2015 04:59AM by ueghio.
Re: HOW2: Repair Pogo E02 with Raspberry PI (JTAG) and OpenOCD
June 01, 2015 05:56AM
i did all the steps (beginning from installalation) as user pi.
like you see in my discription i used sudo for the necessary comands to become root
please take a fresh installed RPI and follow the discription step by step without changing anything.

PS: this is one instruction:
{
  ./bootstrap &&\
  ./configure --enable-sysfsgpio \
 --enable-bcm2835gpio \
 --enable-buspirate \
 --enable-maintainer-mode \
 --disable-werror \
 --enable-legacy-ft2232_libftdi \
 --enable-openjtag_ftdi \
 --prefix=/usr\
  &&\
  make
  } > openocd_build.log 2>&1



Edited 3 time(s). Last edit at 02/27/2016 02:51AM by joerg_999.
Re: HOW2: Repair Pogo E02 with Raspberry PI (JTAG) and OpenOCD
June 01, 2015 07:04AM
Same as before with pi user
...
rm -rf $backupdir; exit $rc
openocd.texi:8463: Unknown command `raggedright'.
openocd.texi:8468: Bad argument `raggedright' to `@end', using `table'.
openocd.texi:8468: @item found outside of an insertion block.
openocd.texi:8470: @item found outside of an insertion block.
openocd.texi:8472: @item found outside of an insertion block.
openocd.texi:8475: @item found outside of an insertion block.
openocd.texi:8478: Unmatched `@end'.
makeinfo: Removing output file `openocd.info' due to errors; use --force to preserve.
Makefile:301: recipe for target 'openocd.info' failed
make[1]: *** [openocd.info] Error 1
make[1]: Leaving directory '/home/pi/openocd-git/doc'
Makefile:435: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1



Edited 3 time(s). Last edit at 06/01/2015 07:10AM by ueghio.
Re: HOW2: Repair Pogo E02 with Raspberry PI (JTAG) and OpenOCD
June 01, 2015 07:10AM
here part of my openocd_build.log
tomorrow i will reinstall raspbian on my raspberry pi and will try again



Edited 2 time(s). Last edit at 06/01/2015 12:58PM by ueghio.
Re: HOW2: Repair Pogo E02 with Raspberry PI (JTAG) and OpenOCD
August 10, 2015 03:21PM
Nice work. Thanks.

I am about to try this on a Dockstar. I wrote a zyxel uboot to the device by accident. I had done the TIAO JTAG on this unit before but I don't want to find my pc with parallel port and compile the software again.

I found the cfg file for a Dockstar and was comparing to Pogo. What needs to be changed when using this on my device? Some of the obvious stuff I can find but I want to be sure I am covering all the correct parameters.

Paul
Re: HOW2: Repair Pogo E02 with Raspberry PI (JTAG) and OpenOCD
August 10, 2015 04:16PM
First - i´ve never tried but it should also work on Dockstar with the right config file. You have to use the matching uboot file from bodhi.(You will find it in the uboot section)
The Goal is to use only a Raspberry Pi with OpenOCD compiled on it and no hassle with parallel Port Interface - nothing else,
but you have to figure out the wiring for your device.
This should be able with Google seeking for Dockstar Jtag.
The compiling options for OpenOCD should be the same (if you use a Raspi)
After compiling OpenOCD you will find a basic Dockstar config file in: /usr/share/openocd/scripts/board/dockstar.cfg which you should use.
(maybe this is a good point for starting)
If you need further informations go to the german Version - at the end there are some usefull links which may help you.

PS: you´ve hit the Jackpot when this message appears: Info : feroceon.cpu: hardware has 1 breakpoint/watchpoint unit

joerg_999



Edited 3 time(s). Last edit at 08/10/2015 04:37PM by joerg_999.
Re: HOW2: Repair Pogo E02 with Raspberry PI (JTAG) and OpenOCD
August 10, 2015 04:43PM
Re: HOW2: Repair Pogo E02 with Raspberry PI (JTAG) and OpenOCD
August 10, 2015 06:33PM
Thanks Bohdi and joerg99,

I had already compiled OpenOCD on my Raspi. I was sorting through the pictures to get the connections right. I'll keep you posted.

I use the adapter to match the small pitch on the dockstar. That's pretty handy and I have the 3.3v serial connection.

Paul
Re: HOW2: Repair Pogo E02 with Raspberry PI (JTAG) and OpenOCD
August 11, 2015 05:57PM
Ok, so that worked out.
I was finally able to write to the nand in the telnet terminal. Once that took I was golden.
The Raspi is great for this since it is self contained and networked. I made a few changes to the pogo.cfg to address the dockstar. A few changes I didn't make since I was too tired but did want to try such as switching on the fast downloads.

The cfg file is adapted from the sheevaplug cfg and there are several procs that still have that name. May be some redundancy too.

But overall using the raspberry pi is really a great exploit.

Thanks so much for the help everyone.

Paul
Re: HOW2: Repair Pogo E02 with Raspberry PI (JTAG) and OpenOCD
August 11, 2015 06:44PM
Paul, good to hear!

Yes, I really like this application for the rPi. It is an excellent use for older rPi boards.

If it's different, you might want to post the Dockstar cfg here, too.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 08/11/2015 06:46PM by bodhi.
Re: HOW2: Repair Pogo E02 with Raspberry PI (JTAG) and OpenOCD
August 12, 2015 01:59AM
Hello Paul,
nice that it works on your Dockstar.

joerg_999
Re: HOW2: Repair Pogo E02 with Raspberry PI (JTAG) and OpenOCD
August 12, 2015 10:04AM
Yes, I will post my cfg file and some notes on idiosyncrasies I experienced so that others might benefit. It might be a few days since I am away from my home desk Perhaps I can log in remotely.

Paul
Re: HOW2: Repair Pogo E02 with Raspberry PI (JTAG) and OpenOCD
August 22, 2015 11:26AM
I think this is very much the same as the pogo cfg file. I did use the init_docstar proc when the software command didn't get a proper halt. Read through the cfg file to see other procs available. The Openocd manual has some good stuff on the config file if you are curious. It explains some of the variables used in the config file.

pi@raspberrypi ~ $ cat /usr/share/openocd/scripts/board/dockstar.cfg 
# Marvell SheevaPlug

# I'm using a wiggler compatible cable
source [find interface/sysfsgpio-raspberrypi.cfg]
source [find target/feroceon.cfg]
adapter_khz 200
adapter_nsrst_delay 500

$_TARGETNAME configure \
	-work-area-phys 0x100000 \
	-work-area-size 65536 \
	-work-area-backup 0

# Disabled for the dockstar	
#arm7_9 dcc_downloads enable

# this assumes the hardware default peripherals location before u-Boot moves it
set _FLASHNAME $_CHIPNAME.flash
nand device $_FLASHNAME orion 0 0xd8000000

proc dockstar_init { } {

	# We need to assert DBGRQ while holding nSRST down.
	# However DBGACK will be set only when nSRST is released.
	# Furthermore, the JTAG interface doesn't respond at all when
	# the CPU is in the WFI (wait for interrupts) state, so it is
	# possible that initial tap examination failed.  So let's
	# re-examine the target again here when nSRST is asserted which
	# should then succeed.
	jtag_reset 0 1
	feroceon.cpu arp_examine
	halt 0
	jtag_reset 0 0
	wait_halt

	arm mcr 15 0 0 1 0 0x00052078

	mww 0xD0001400 0x43000C30
	mww 0xD0001404 0x39543000 
	mww 0xD0001408 0x22125451 
	mww 0xD000140C 0x00000833 
	mww 0xD0001410 0x000000CC
	mww 0xD0001414 0x00000000 
	mww 0xD0001418 0x00000000
	mww 0xD000141C 0x00000C52 
	mww 0xD0001420 0x00000042 
	mww 0xD0001424 0x0000F17F 
	mww 0xD0001428 0x00085520 
	mww 0xD000147c 0x00008552 

	# 1st bank is 128 MB
	mww 0xD0001504 0x07FFFFF1 
	# 2nd bank of DRAM is not used
	mww 0xD0001508 0x00000000 
	mww 0xD000150C 0x00000000
	# Commented the 3 following	lines
	#mww 0xD0001504 0x0FFFFFF1 
	#mww 0xD0001508 0x10000000 
	#mww 0xD000150C 0x0FFFFFF5 
	mww 0xD0001514 0x00000000
	mww 0xD000151C 0x00000000
	mww 0xD0001494 0x003C0000 
	mww 0xD0001498 0x00000000
	mww 0xD000149C 0x0000F80F 
	mww 0xD0001480 0x00000001 
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000
	mww 0xD0020204 0x00000000

	mww 0xD0010000 0x01111111 
	mww 0xD0010004 0x11113322 
	mww 0xD0010008 0x00001111

	mww 0xD0010418 0x003E07CF
	mww 0xD001041C 0x000F0F0F
	mww 0xD0010470 0x01C7D943

}

proc sheevaplug_reflash_uboot { } {

	# reflash the u-Boot binary and reboot into it
	sheevaplug_init
	nand probe 0
	nand erase 0 0x0 0xa0000
	nand write 0 uboot.bin 0 oob_softecc_kw
	resume

}

proc sheevaplug_reflash_uboot_env { } {

	# reflash the u-Boot environment variables area
	sheevaplug_init
	nand probe 0
	nand erase 0 0xa0000 0x40000
	nand write 0 uboot-env.bin 0xa0000 oob_softecc_kw
	resume

}

proc sheevaplug_load_uboot { } {

	# load u-Boot into RAM and execute it
	sheevaplug_init
	#load_image uboot.elf
	#verify_image uboot.elf
	load_image u-boot
	verify_image u-boot
	resume 0x00600000

}

proc dockstar_reset_cpu { } {

#	System and User mode registers
#		  r0: 00000000       r1: 00000000       r2: 00000000       r3: 00000000
#		  r4: 00000000       r5: 00000000       r6: 00000000       r7: 00000000
#		  r8: 00000000       r9: 00000000      r10: 00000000      r11: 00000000
#		 r12: 00000000   sp_usr: 7dddee86   lr_usr: dffebe46       pc: ffff0a42
#		cpsr: 400000f3

	reg r1 0
	reg r2 0
	reg r3 0
	reg r4 0
	reg r5 0
	reg r6 0
	reg r7 0
	reg r8 0
	reg r9 0
	reg r10 0
	reg r11 0
	reg r12 0
	reg sp_usr 0
	reg lr_usr 0
	reg pc 0
	# Set the CPU in Supervisor mode
	reg cpsr 0x13

#	FIQ mode shadow registers
#	  r8_fiq: fbcfff64   r9_fiq: d7dfafd6  r10_fiq: 1fff6d2e  r11_fiq: 1db65df4
#	 r12_fiq: ff5a6de4   sp_fiq: 745fe7d5   lr_fiq: 89f7ae3e spsr_fiq: 00000000

	reg r8_fiq 0
	reg r9_fiq 0
	reg r10_fiq 0
	reg r11_fiq 0
	reg r12_fiq 0
	reg sp_fiq 0
	reg lr_fiq 0
	reg spsr_fiq 0

#	Supervisor mode shadow registers
#	  sp_svc: fffeff84   lr_svc: ffff0a43 spsr_svc: 00000000

	reg sp_svc 0
	reg lr_svc 0
	reg spsr_svc 0

#	Abort mode shadow registers
#	  sp_abt: 51fe66f7   lr_abt: d7abaef7 spsr_abt: 00000000

	reg sp_abt 0
	reg lr_abt 0
	reg spsr_abt 0

#	IRQ mode shadow registers
#	  sp_irq: 7fdb4ed5   lr_irq: 6d41122e spsr_irq: 00000000

	reg sp_irq 0
	reg lr_irq 0
	reg spsr_irq 0
	
#	Undefined instruction mode shadow registers
#	  sp_und: 75ffef7e   lr_und: d75b6cd1 spsr_und: 00000000

	reg sp_und 0
	reg lr_und 0
	reg spsr_und 0
	
}
pi@raspberrypi ~ $ /share/openocd/scripts/board/dockstar.cfg 
-bash: /share/openocd/scripts/board/dockstar.cfg: No such file or directory
pi@raspberrypi ~ $ pi@raspberrypi ~ $ cat /usr/share/openocd/scripts/board/dockstar.cfg 
-bash: pi@raspberrypi: command not found
pi@raspberrypi ~ $ 






Edited 1 time(s). Last edit at 08/22/2015 11:28AM by z3bram3n.
Re: HOW2: Repair Pogo E02 with Raspberry PI (JTAG) and OpenOCD
September 27, 2015 04:30PM
I use this information on my Dockstar but have this errors
I hope some one can help me out
root@raspberrypi:~# openocd -f pogo.cfg
Open On-Chip Debugger 0.10.0-dev-00024-gd28ab08 (2015-09-26-12:03)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
SysfsGPIO nums: tck = 11, tms = 25, tdi = 10, tdo = 9
SysfsGPIO num: srst = 24
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain connect_deassert_srst
adapter_nsrst_delay: 200
jtag_ntrst_delay: 200
adapter speed: 200 kHz
adapter_nsrst_delay: 500
Warn : use 'feroceon.cpu' as target identifier, not '0'
pogo_load_uboot
Info : SysfsGPIO JTAG/SWD bitbang driver
Info : JTAG only mode enabled (specify swclk and swdio gpio to add SWD mode)
Info : This adapter doesn't support configurable speed
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: feroceon.cpu: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
Info : Embedded ICE version 0
Info : feroceon.cpu: hardware has 1 breakpoint/watchpoint unit
Error: unexpected Feroceon EICE version signature


I found my problem, the wire connect was the problem



Edited 2 time(s). Last edit at 09/27/2015 07:27PM by markweng.
Re: HOW2: Repair Pogo E02 with Raspberry PI (JTAG) and OpenOCD
September 28, 2015 02:24AM
nice to hear markweng,
that your dockstar is alive now.

joerg_999
This is the result I'm getting. I've checked the connections.

> soft_reset_halt
requesting target halt and executing a soft reset
feroceon.cpu: target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0x00000000
MMU: disabled, D-Cache: disabled, I-Cache: disabled
> nand probe 0
unknown NAND flash device found, manufacturer id: 0x00 device id: 0x00

Any suggestions?
Re: HOW2: Repair Pogo E02 with Raspberry PI (JTAG) and OpenOCD
November 06, 2015 11:17AM
Dockstar or Pogo E02 ?

Try commands:
soft_reset_halt
init

If it doesn´t work you have to reset your Pogo and start from beginning. (sudo openocd -f pogo.cfg)

Also i´ve adjust the adapter-speed in in file Pogo.cfg -> see marked in red in above discription.



Edited 5 time(s). Last edit at 11/06/2015 11:32AM by joerg_999.
@ joerg_999

It is a Pogo E02. I'll try adjusting the speed.

Thanks.
Steps I did:

1.

Pressed Reset Button on Pogo E02

2.

root@pi:~# openocd -f pogo.cfg
Open On-Chip Debugger 0.10.0-dev-00090-gfabbb88 (2015-11-05-18:57)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
SysfsGPIO nums: tck = 11, tms = 25, tdi = 10, tdo = 9
SysfsGPIO num: srst = 24
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain connect_deassert_srst
adapter_nsrst_delay: 200
jtag_ntrst_delay: 200
adapter speed: 1000 kHz
adapter_nsrst_delay: 500
Warn : use 'feroceon.cpu' as target identifier, not '0'
pogo_load_uboot
Info : SysfsGPIO JTAG/SWD bitbang driver
Info : JTAG only mode enabled (specify swclk and swdio gpio to add SWD mode)
Info : This adapter doesn't support configurable speed
Info : JTAG tap: feroceon.cpu tap/device found: 0x20a023d3 (mfg: 0x1e9, part: 0x0a02, ver: 0x2)
Info : Embedded ICE version 0
Info : feroceon.cpu: hardware has 1 breakpoint/watchpoint unit

3.
root@pi:~# telnet localhost 4444
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> soft_reset_halt
requesting target halt and executing a soft reset
feroceon.cpu: target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0x00000000
MMU: disabled, D-Cache: disabled, I-Cache: disabled
> nand probe 0
unknown NAND flash device found, manufacturer id: 0x10 device id: 0x10

I did try having someone hold the reset button and issuing a 'halt'... I was able to detect the nand correctly with some combination only once... Unfortunately I was unable to figure it out again before I could issue any commands to flash the nand. I have extremely limited knowledge around JTAG programming.

I have highlighted in red the difference between what I got as a result and the first post.

Do I need to try something relating to this:
https://code.google.com/p/openrd/issues/detail?id=7

Any help would be appreciated.

I am using a Pi2 running at 1.0 Ghz
Re: HOW2: Repair Pogo E02 with Raspberry PI (JTAG) and OpenOCD
November 06, 2015 05:26PM
give me some time please, i´ll try to find a fix. ( maybe Timing Problems on some Pogos)
I also had one funny Pogo this days who didn´t want to be flashed by Raspi. At the end i flashed with my Buspirate, which is always working.
A second chance after soft_reset_halt is to try the already included scripts like:
pogo_reflash_uboot
pogo_reflash_uboot_env
@joerg_999

Thanks again for your help.

I'll try a few things and post if I find success. One thing I'm going to do is compile with the following options:

{
 ./bootstrap &&\
 ./configure --enable-sysfsgpio \
  --enable-bcm2835gpio
  --enable-maintainer-mode \
 --disable-werror \
 --enable-legacy-ft2232_libftdi \
 --enable-openjtag_ftdi \
 --prefix=/usr\
  &&\
  make
  } > openocd_build.log 2>&1

And then attempt to do jtag with the bcm2835gpio driver:

# Pogoplug E02
# modification joerg_999 20.04.2015
# changed from sheevaplug.cfg to pogo.cfg
source [find interface/raspberrypi2-native.cfg]
#source [find interface/sysfsgpio-raspberrypi.cfg]
source [find target/feroceon.cfg]

Modified raspberrypi2-native.cfg

#
# Config for using Raspberry Pi's expansion header
#
# This is best used with a fast enough buffer but also
# is suitable for direct connection if the target voltage
# matches RPi's 3.3V and the cable is short enough.
#
# Do not forget the GND connection, pin 6 of the expansion header.
#

interface bcm2835gpio

bcm2835gpio_peripheral_base 0x3F000000

# Transition delay calculation: SPEED_COEFF/khz - SPEED_OFFSET
# These depend on system clock, calibrated for stock 700MHz
# bcm2835gpio_speed SPEED_COEFF SPEED_OFFSET
bcm2835gpio_speed_coeffs 146203 36

# Each of the JTAG lines need a gpio number set: tck tms tdi tdo
# Header pin numbers: 23 22 19 21
bcm2835gpio_jtag_nums 11 25 10 9

# or if you have both connected,
# reset_config trst_and_srst srst_push_pull

# Each of the SWD lines need a gpio number set: swclk swdio
# Header pin numbers: 22 18
# bcm2835gpio_swd_nums 25 24

# If you define trst or srst, use appropriate reset_config
# Header pin numbers: TRST - 26, SRST - 18

# bcm2835gpio_trst_num 7
# reset_config trst_only

bcm2835gpio_srst_num 18
reset_config srst_only srst_push_pull

# or if you have both connected,
# reset_config trst_and_srst srst_push_pull

Re: HOW2: Repair Pogo E02 with Raspberry PI (JTAG) and OpenOCD
November 06, 2015 06:44PM
Maybe a good try, dont forget to decrease your Raspi Speed to 700Mhz.
Thanks for your Input.I´ll also do some tests.
Re: HOW2: Repair Pogo E02 with Raspberry PI (JTAG) and OpenOCD
November 12, 2015 06:22PM
I tested the following modifications posted before and attempted to use the bcm2835gpio driver but got the same results.

The speed of the RPi2 is 700 Mhz.

Any other suggestions to try?
Re: HOW2: Repair Pogo E02 with Raspberry PI (JTAG) and OpenOCD
November 13, 2015 01:46AM
The only difference at the time i started (april 2015), was the Raspi OS it was wheezy and now we use jessie.
The second point was the version of openOCD, i used 0.9.0, but that shouldn´t matter.
In the next week(s) i´ll certainly get a defektiv Pogo and give it a try.
The speed of my raspi B+ was 900Mhz (at this time i think it should also work with another speed...)
My last Pogo stuck also on "pogo_init" like your´s

The "quick step procedure" should be:
T1> openocd -f pogo.cfg       # start the show
T2> telnet localhost 4444
T2> soft_reset_halt           # this works realy without reset button, look for ARM state
T2> pogo_init
T2> nand probe 0              # look for 'NAND 128MiB 3.3V 8-bit (Hynix)' found

# for quick flash you can use the scripts in T2:
------------------------------------------------
> pogo_init
> pogo_reflash_uboot
> pogo_reflash_uboot_env

# or 
# if you want load uboot into ram and execute from there
> pogo_load_uboot

(this scripts i also used with my Buspirate on a ubuntu VM (viritual machine) and did work fine)
I´ll try to find the difference...

Update:
use only this reset pin in your configuration:

bcm2835gpio_trst_num 7
reset_config trst_only



joerg_999



Edited 1 time(s). Last edit at 02/27/2016 02:59AM by joerg_999.
TEN
Re: Pogo E02 GPIO (and possibly higher voltages)
November 23, 2015 06:07PM
While taking Pogo E02s apart, have you had a chance to identify GPIO pins otherwise unused (i.e. not even for serial) on their board (no header needed if accessible at least as solder pads or pins) that might drive the Bodhi-ported lirc_rpi http://forum.doozan.com/read.php?2,20686,21168#msg-21168 for RF(-to-IR) remote control transceivers such as http://www.ebay.com/itm/201312653471 (cf. http://forum.doozan.com/read.php?8,21494,21494) ?

With their open base and collector respectively, these particular TX & RX modules (though the latter should better be replaced with a superhet) might even interface with 3,3V without putting the ARM's voltage tolerance in jeopardy (at the PSU's 5V or even up to 12V if it supplies these anywhere), cf. http://www.forum-raspberrypi.de/Thread-433mhz-funk-module-schaltplan.

Or is it even possible to (re-)program and repurpose the JTAG header as GPIO during normal operations?

The ability to use LIRC without a softcarrier and hence drive various radio transceivers might provide a good chance to control the bulk of household electronics (home entertainment, switchable sockets & lights, and conversion back to infrared in more distant locations) from within a Pogoplug, rather than added on a Pi (that better serves Kodi-like AV tasks).



Edited 7 time(s). Last edit at 11/24/2015 01:24AM by TEN.
Hello, my POGO E02 in accordance with your way of frustrating days,
got stuck inside the Telnet,
>soft_reset_halt> soft_reset_halt requesting target halt and executing a soft reset feroceon.cpu: target state: halted target halted in ARM state due to debug-request, current mode: Supervisor cpsr: 0x000000d3 pc: 0x00000000 MMU: disabled, D-Cache: disabled, I-Cache: disabled
And then:
> pogo_init
Halt timed out, wake up GDB.
timed out while waiting for target halted
Please advice. Thank you!
Re: HOW2: Repair Pogo E02 with Raspberry PI (JTAG) and OpenOCD
December 02, 2015 02:12AM
"pogo_init" don´t work like it should, i´ll try to find a solution, please have patience.
joerg_999

Note: see solution in post# 1



Edited 1 time(s). Last edit at 02/27/2016 03:00AM by joerg_999.
Re: HOW2: Repair Pogo E02 with Raspberry PI (JTAG) and OpenOCD
December 09, 2015 05:51AM
Hi Joerg_999. Help me Plz...
I received message

> nand probe 0
unknown NAND flash device found, manufacturer id: 0x10 device id: 0x10


So what can I do?
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: