OK here is how to setup jtag for 900c and how to flash a bricked device
we used a PC with windows server 2003, and then another with XP. parallel port is used. also cygwin might be required, not 100% sure, as you'll see below.
-
jtag cable:
link to a nice homemade cable that costs a few cents/pennies/whatever to build and that is recognized as wiggler by the software:
http://hpcmonex.net/nec900/files/jtag/900c_jtag.jpg
-
jtag pinout:
you can connect the cable to either of two places, but i suspect you'll prefer the second one:
1
) on the white connector under the modem:
test - 8, H11-nTRST 9, H12-TCK 1, H13-TMS 3, H15-TDI 5, H16-TDO 10, A1-DC3,3V
it looks like this:
http://hpcmonex.net/nec900/files/jtag/JTAG_header.jpg
2
) under the cf slot - sorry no pic for now, but it's right at the side, 2x 10 pins, jtag is the left one if the slot is facing up and you:
test - 3, H11-nTRST 2, H12-TCK 10, H13-TMS 8, H15-TDI 7, H16-TDO 4, A1-DC3,3V 5
(you should use the xscale docs to understand the first half of the listings, the numbers in third place always mean their current pinout on the 900c..
)
if the cable you use is the above one then it's sufficient to just get TCK, TMS, TDI and TDO setup. the rest isn't needed.
use the above linked jpg to see where to connect them on your LPT port on your PC.
then just boot up the 900c and connect it to the LPT on the PC. if it doesn't seem to be booting due to being a brick, well, at least make sure it's powered on, keep it on AC or something
-
software:
software is jtag tools 0.5.1
(http://openwince.sourceforge.net/jtag
) running under cygwin
(http://cygwin.com
).
here's a version compiled for cygwin:
http://hpcmonex.net/nec900/files/jtag/jtag900cfinal.zip
the strange thing is, the software should work either under full cygwin environment or just with the included cygwin dll's.
on my PC for who knows what reason, it does not work under full cygwin so we worked out a method to work without cygwin
option a
) if you use full cygwin to run the software: install cygwin from cygwin.com, then copy the unzipped download under home\yourusername\
(let's assume you create a folder named jtag under this
) then run cygwin and cd into jtag\src
option b
) if you don't use full cygwin to run jtag tools: you probably still need to install cygwin, see below. but in any case, just unzip the jtag900cfinal.zip somewhere, take the dlls from cygwindlls folder, copy them to src folder.
then take the usr folder, go into it until you get to jtag folder- copy that folder and its contents under cygwin\usr\local\share
(note, when you opt for b
) then make sure cygwin isn't running when running jtag.exe
)
now you will also need to install and enable ioperm, this is available as a binary from full cygwin
(with setup.exe it is under Devel packages
), i have not yet tested if it works without it, sorry..
just go into cygwin\bin then using cmd, and enter this command: ioperm -i
(this will activate it, -u deactivates it
)
after this you are ready to run the jtagtools:
-
commands to flash under jtag tools:
--- if under cygwin, cd into the src folder and type: ./jtag
if outside, cd into src and just type jtag
you should get the >jtag prompt:
N:\jtag\full\src>jtag
JTAG Tools 0.5.1
Copyright (C) 2002, 2003 ETC s.r.o.
JTAG Tools is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain conditions.
There is absolutely no warranty for JTAG Tools.
Warning: JTAG Tools may damage your hardware! Type "quit" to exit!
Type "help" for help.
--- now if you are using the above mentioned home made cable, we need to initialize it,
type the command: cable parallel 0x378 WIGGLER
(your parallel port might be at a different address, see device manager.
)
if you are using a different cable then see jtag help
this should give us
(if you got ioperm activated!!
) :
jtag> cable parallel 0x378 WIGGLER
Initializing Macraigor Wiggler JTAG Cable on parallel port at 0x378
--- next command is to detect cpu: detect
jtag> detect
IR length: 5
Chain length: 1
Device Id: 01101001001001100100000000010011
Manufacturer: Intel
Part: PXA250
Stepping: PXA255A0
Filename: /usr/local/share/jtag/intel/pxa250/pxa250c0
--- next command is to find the flash: detectflash
jtag> detectflash
Query identification string:
Primary Algorithm Command Set and Control Interface ID Code: 0x0001 (I
el/Sharp Extended Command Set)
Alternate Algorithm Command Set and Control Interface ID Code: 0x0000
ull)
Query system interface information:
Vcc Logic Supply Minimum Write/Erase or Write voltage: 2700 mV
Vcc Logic Supply Maximum Write/Erase or Write voltage: 3600 mV
Vpp [Programming] Supply Minimum Write/Erase voltage: 0 mV
Vpp [Programming] Supply Maximum Write/Erase voltage: 0 mV
Typical timeout per single byte/word program: 256 us
Typical timeout for maximum-size multi-byte program: 256 us
Typical timeout per individual block erase: 2048 ms
Typical timeout for full chip erase: 0 ms
Maximum timeout for byte/word program: 1024 us
Maximum timeout for multi-byte program: 1024 us
Maximum timeout per individual block erase: 16384 ms
Maximum timeout for chip erase: 0 ms
Device geometry definition:
Device Size: 16777216 B (16384 KiB, 16 MiB)
Flash Device Interface Code description: 0x0002 (x8/x16)
Maximum number of bytes in multi-byte program: 32
Number of Erase Block Regions within device: 1
Erase Block Region Information:
Region 0:
Erase Block Size: 131072 B (128 KiB)
Number of Erase Blocks: 128
--- if you want to make sure it's indeed able to read the flash correctly:
jtag> readmem 0x0 0x1000 filename
address: 0x00000000
length: 0x00001000
reading:
addr: 0x00001000
that'll contain first 4K of bootloader... if you see ECEC ascii string in the file near the start in a hexeditor then fine. but that verification only makes sense if you have an intact bootloader
so if your device is bricked then i guess just FF FF FF FF is fine, if readmem at least can dump it to a file.
--- ok now you are ready to flash using flashmem
for example if you want to flash a bootloader it should go like this:
jtag> flashmem 0x0 saboot.nb0
Note: Supported configuration is 2 x 16 bit or 1 x 16 bit only
Manufacturer: Intel
Chip: 28F128J3A
program:
addr: 0x0007FFFC
verify:
addr: 0x0007FFFC
Done.
that takes about 40 mins to flash in, 10 mins to verify.
well, that's it.
here's my first jtagging session log
(lost the first part of it but that was all errors anyway
)
http://hpcmonex.net/jtaglog.txt
Edited by cmonex 2008-03-19 12:37 AM