SparkFun Forums 

Where electronics enthusiasts find answers.

Open source ARM Debugger
By Spork Schivago
#187194
Hello,

I'm very new to PCB design and bought an ARM-USB-OCD-H JTAG device. It came in the mail the other day. I've tried my darndest to follow the directions but seem to be having some issues. I've downloaded OpenOCD from Olimex's website and followed the instructions in the README. It says to use Zidag's utility to install WinUSB drivers. I'm running Windows 10 64-bit and I've done as they described. The README say if I plan on using the COM port emulator, only install for Interface #0. I don't have a COM port on any machine so I only installed for Interface #0.

In Device manager, I see the ARM-USB-OCD-H under Universal Serial Bus Devices but I also see one under Other Devices! I figure maybe the Other Devices one is just there because I didn't install the WinUSB drivers for Interface #1. Am I correct in thinking this or do I have a problem?

Also, I want to dump the NAND on this Linksys WPS54G V1 Wireless Print server but I can't seem to find a target .cfg file for the Marvell 88W8510 CPU. I believe it has an ARM9 core inside of it. Running OpenOCD without any target, it tells me I need to add a line like this:
Code: Select all
jtag newtap auto0 tap -irlen 4 -expected-id 0x159463d3
So I added that line to my test.cfg file. Also, before I got that far, it errored out about me needing to specify adapter_khz or jtag_rclk. I did some research and I believe I now have that properly set in the olimex-arm-usb-ocd-h.cfg file. I set adapter_khz to 500.

With jtag newtap auto0 tap -irlen 4 -expected-id 0x159463d3 set, I now get a new error and I'm not sure how to proceed. This is what the new error says:
Code: Select all
Open On-Chip Debugger 0.9.0-rc1 (2015-04-24-22:09)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
adapter speed: 500 kHz
jtag
Warn : Interface already configured, ignoring
trst_only separate trst_push_pull
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : clock speed 500 kHz
Info : JTAG tap: auto0.tap tap/device found: 0x159463d3 (mfg: 0x1e9, part: 0x5946, ver: 0x1)
Warn : gdb services need one or more targets defined
Here's some info on the wireless print server...
CPU: Marvell 88W8510
FLASH: Macronix MX29LV800TTC-70
FLASH SIZE: 1MB
RAM CHIP: EtronTech EM636165TS-6 x 2
RAM SIZE: 4MB

I could really use some help and it'd be greatly appreciated! Thank you!!!
By Spork Schivago
#187197
Just a little update, I was reading more of the manual for the ARM-USB-OCD-H and when I got further into it, it said to use the Zadig utility and install for both interfaces. I did that and now Device Manager doesn't show any Other devices. Hopefully this still means I have COM Port emulation.
By Spork Schivago
#187201
I made some progress I think by reading the OpenOCD manual instead of the ARM-USB-OCD-H manual. I'm still having some issues though. I cannot get the datasheet for the Marvel 88W8510-BAN without having something called a non-disclosure agreement(?). Marvel says to contact my local sales agent to obtain one before asking for documentation otherwise my request will not be answered so I contacted the closest sales representative and I'm waiting for a response.

I've downloaded the datasheet for the flash chip but I'm having trouble figuring out information like base address. I see in the OpenOCD documentation about flash that there's a mrvlqspi driver for the QSPI flash controller of Marvell’s Wireless Microcontroller platform. Because this is a Marvel 88W8510-BAN, would I select that driver and have it auto-detect the size and everything?

These are the files I've created:
(board file)
Code: Select all
#
# Linksys WPS54G v1 (board file)
#

source [find target/88w8510.cfg]

# Boards may override chip names, perhaps based on role,
# but the default should match what the vendor uses
if { [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 0x3f0f0f0f
}
(target file)
Code: Select all
# Target file for 88W8510
# telnet_port 4444
# gdb_port 3333

# interface 0

reset_config trst_only

jtag newtap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPID

set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME arm9tdmi -chain-position $_TARGETNAME

# flash bank cfi 0xffe00000 0x200000 2 2 88w8500
I borrowed the reset_config trst_only line from someone's OpenOCD file for this same Marvel chipset. I'm assuming that's correct. The flash value seems to be where I'm stuck I think. I'm not 100% sure what value to use. It's a NOR flash chip. But how do I find the base address? I don't see it in the datasheet anywhere. Any help would be greatly appreciated.

Thank you!
By Spork Schivago
#187202
I still get errors when I try OpenOCD though.
Code: Select all
openocd.exe -f ..\scripts\interface\ftdi\olimex-arm-usb-ocd-h.cfg -f ..\scripts\board\linksys-wps54gv1.cfg
Open On-Chip Debugger 0.9.0-rc1 (2015-04-24-22:09)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
adapter speed: 500 kHz
jtag
trst_only separate trst_push_pull
88w8510.cpu
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : clock speed 500 kHz
Info : JTAG tap: 88w8510.cpu tap/device found: 0x159463d3 (mfg: 0x1e9, part: 0x5946, ver: 0x1)
Info : Embedded ICE version 5
Info : 88w8510.cpu: hardware has 2 breakpoint/watchpoint units
The window just freezes there. I think I need to enable the telnet stuff and telnet to the local host on the right point to get a window. But I don't get the error message about the LibUSB
By Spork Schivago
#187216
No one has any ideas what I'm doing wrong? I've tried just about everything I could think of to just try and read the flash. I can talk to the controller successfully I believe. I can halt it. I just can't seem to read the flash. :(