The addresses you are using look weird. I don't remember whether urjtag
uses virtual or physical addresses, but the first boot code would be at
0xbfc00000 or 0x1fc00000 depending on which address is used.
On May 11, 2011 5:56 PM, "Luka Perkov" <[email protected]> wrote:
>
> Hi,
>
> I'm new to jtag. I'm trying to get urjtag read and write to flash for
> this board (standard ejtag pinout):
>
> http://wiki.openwrt.org/toh/gigaset/sx76x
>
> I'm using this cable:
>
>
http://www.diygadget.com/universal-jtag-adapter-for-routers-modem-fta-and-more.html
>
> And this is how I use urjtag:
>
> ==
> cable wiggler ppdev /dev/parport0
> detect
> part 0
> include /home/luka/jtag_sx763/sx763_register.cfg
> include /home/luka/jtag_sx763/sx763_instruction.cfg
> instruction bypass
> part 1
> include /home/luka/jtag_sx763/sx763_register.cfg
> include /home/luka/jtag_sx763/sx763_instruction.cfg
> instruction bypass
> initbus ejtag
> endian big
> print
> ==
>
> File sx763_register.cfg contains:
>
> ==
> register DIR 32
> register BSR 1
> register EJIMPCODE 32
> register EJADDRESS 32
> register EJDATA 32
> register EJCONTROL 32
> register EJALL 96
> register EJFASTDATA 33
> register BR 1
> ==
>
> And file sx763_instruction.cfg:
>
> ==
> instruction length 5
>
> instruction IDCODE 00001 DIR
> instruction SAMPLE/PRELOAD 00010 BSR
> instruction EJTAG_IMPCODE 00011 EJIMPCODE
> instruction EJTAG_ADDRESS 01000 EJADDRESS
> instruction EJTAG_DATA 01001 EJDATA
> instruction EJTAG_CONTROL 01010 EJCONTROL
> instruction EJTAG_ALL 01011 EJALL
> instruction EJTAGBOOT 01100 BR
> instruction NORMALBOOT 01101 BR
> instruction EJTAG_FASTDATA 01110 EJFASTDATA
> instruction BYPASS 11111 BR
> ==
>
> I have compiled jtag with --enable-jedec-exp but I don't know which
> address to add as argument.
>
> Other things that might be helpful (attached is output from discovery
command):
>
> ==
> jtag> initbus ejtag
> ImpCode=01100000010000010100000000000000 60414000
> EJTAG version: 3.1
> EJTAG Implementation flags: R4k ASID_8 MIPS16 NoDMA MIPS32
> Processor entered Debug Mode.
>
> jtag> print
> No. Manufacturer Part Stepping Instruction
Register
>
------------------------------------------------------------------------------------------------------------------
> 1 EJTAG_DATA
EJDATA
>
> Active bus:
> *0: EJTAG compatible bus driver via PrAcc (JTAG part No. 1)
> start: 0x00000000, length: 0x20000000, data width: 8 bit
> start: 0x20000000, length: 0x20000000, data width: 16 bit
> start: 0x40000000, length: 0x20000000, data width: 32 bit
>
> jtag> detect
> IR length: 10
> Chain length: 2
> Device Id: 00000000000000000000000110000011 (0x0000000000000183)
> Unknown manufacturer!
> Device Id: 00000000000000000000000110000011 (0x0000000000000183)
> Unknown manufacturer!
> chain.c(149) Part 0 without active instruction
> chain.c(200) Part 0 without active instruction
> chain.c(149) Part 0 without active instruction
> ==
>
> I _think_ I can read from flash:
>
> ==
> jtag> readmem 0x5f000000 0x10000000 0x5f000000_0x10000000.bin
>
> # xxd 0x5f000000_0x10000000.bin | head -n 3
> 0000000: 1000 013b 0000 0000 0000 0000 0000 0000 ...;............
> 0000010: 688c 688c 0000 0000 312e 302e 3300 0000 h.h.....1.0.3...
> 0000020: 0000 0000 0000 0000 0000 0000 0000 0000 ................
> # xxd 0x5f000000_0x10000000.bin | grep '688c 688c 0000 0000 312e 302e 3300
0000' | wc -l
> 8
> ==
>
> But I don't understand why data is repeated. Could someone explain?
>
> Also on certain addresses I get only half of data. As you can see every
> second column is 0000:
>
> ==
> # xxd 0x00020000.bin | head -n 20
> 0000000: 0000 beef 0000 0100 0000 0562 0000 de5b ...........b...[
> 0000010: 0000 1e52 0000 7ceb 0000 b8da 0000 029d ...R..|.........
> 0000020: 0000 6d8b 0000 88ee 0000 6109 0000 2d91 ..m.......a...-.
> 0000030: 0000 be36 0000 f86b 0000 9154 0000 cf09 ...6...k...T....
> 0000040: 0000 0cc2 0000 422a 0000 a647 0000 17d0 ......B*...G....
> 0000050: 0000 028f 0000 8e11 0000 59f6 0000 3077 ..........Y...0w
> 0000060: 0000 458f 0000 25e8 0000 0999 0000 85e9 ..E...%.........
> 0000070: 0000 ee9c 0000 7bb6 0000 f508 0000 44f3 ......{.......D.
> 0000080: 0000 8532 0000 204c 0000 ab11 0000 0000 ...2.. L........
> 0000090: 0000 0000 0000 0000 0000 0000 0000 0000 ................
> 00000a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
> 00000b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
> 00000c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
> 00000d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
> 00000e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
> 00000f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
> 0000100: 0000 0000 0000 0000 0000 0000 0000 3736 ..............76
> 0000110: 0000 6461 0000 6265 0000 0000 0000 0006 ..da..be........
> 0000120: 0000 0002 0000 0000 0000 0000 0000 3036 ..............06
> 0000130: 0000 5f31 0000 335f 0000 6e74 0000 655f .._1..3_..nt..e_
> ==
>
> How can I identify starting points of the flash memory so I can make
> full flash backup? After that I would like to use jtag to write custom
> uboot. Flash chip is not detected...
>
> Can someone point me in right direction?
>
> Label on flash chip says:
>
> S29GL064A10TFIR4
>
> Regards,
> Luka
>
>
>
>
------------------------------------------------------------------------------
> Achieve unprecedented app performance and reliability
> What every C/C++ and Fortran developer should know.
> Learn how Intel has extended the reach of its next-generation tools
> to help boost performance applications - inlcuding clusters.
> http://p.sf.net/sfu/intel-dev2devmay
> _______________________________________________
> UrJTAG-development mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/urjtag-development
>
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
UrJTAG-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/urjtag-development