Need help reading NOR flash chip using ARM-USB-OCD-H JTAG device. - Page 1
Forum section: electronics / beginners

author: Spork Schivago
author_rank: Frequent Contributor
timestamp: January 11, 2016, 01:05:16 am
content: Hello,I'm very new to the electronic world and using the JTAG device. I've played a little bit with PICs but would like to simply read the Macronix MX29LV800TTC-70 1MB NOR flash chip and then write it back on this Linksys WPS54G v1 Wireless Print Server. The print server has a Marvel 88w8510 processor and 4MB of RAM.I've found a standard 20-pin JTAG interface on this device and soldered some wires to hook it up to my ARM-USB-OCD-H JTAG device. I've (hopefully successfully) created some files for OpenOCD. They're as follows:Code:## linksys-wps54gv1.cfg board .cfg file for the Linksys WPS54G v1 wireless print server## Boards may override chip names, perhaps based on role,# but the default should match what the vendor usesif { [info exists CHIPNAME] } {set _CHIPNAME $CHIPNAME} else {set _CHIPNAME 88w8510}# ONLY use ENDIAN with targets that can change it.if { [info exists ENDIAN] } {set _ENDIAN $ENDIAN} else {set _ENDIAN little}# TAP identifiers may change as chips mature, for example with# new revision fields (the "3" here). Pick a good default; you# can pass several such identifiers to the "jtag newtap" command.if { [info exists CPUTAPID ] } {set _CPUTAPID $CPUTAPID} else {set _CPUTAPID 0x159463d3}source [find target/88w8510.cfg]Code:## 88w8510.cfg target .cfg file for the Marvel 88w8510 processor#telnet_port 4444gdb_port 3333# interface 0reset_config trst_only# jtag newtap auto0 tap -irlen 4 -expected-id 0x159463d3jtag newtap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPIDset _TARGETNAME $_CHIPNAME.cputarget create $_TARGETNAME arm9tdmi -chain-position $_TARGETNAMEflash bank MX29LV800 mrvlqspi 0x0 0 0 0 $_TARGETNAME 0x46010000# flash bank MX29LV800 cfi 0x00000000 0xfffff 1 1 $_TARGETNAMEI believe I can successfully talk to the CPU just fine. I can halt it and everything but I'm having trouble with the NOR flash. The reset_config trst_only statement I don't really understand but borrowed it from someone elses CFG file I found on the net for a router that had the same Marvel 88w8510 processor.I've tried using the Marvel flash driver, as you can see in this example. I got it from the OpenOCD documentation. It does not appear to auto-detect the flash properly though and errors out when I try doing stuff. I've also tried using the CFI driver but can't figure out how I determine the base-address. The datasheet lists addresses but it shows them starting at 0x00000 and going upwards.Could someone who has more experience in this matter please help me figure out what I'm doing wrong? I've tried using UrJTAG but it doesn't appear to work in 64-bit versions of Windows. I've tried compiling from source but failed. When I contacted the developers, I was told UrJTAG for Windows is now considered dead. I'm definitely open for suggestions.

author: Spork Schivago
author_rank: Frequent Contributor
timestamp: January 11, 2016, 04:02:45 am
content: John, over at the Olimex forums, said very few use Windows 10 and even less use the tools I'm using with Windows 10. I have a Linux box as well. Does anyone have any suggestions on how I could do this in Windows? Any good programs? Maybe still use OpenOCD but something else to help me figure out the base address for the NOR flash? Thanks!