Need help connecting ARM-USB-OCD-H to Wireless PrintServer.

Started by spork_schivago, January 09, 2016, 11:59:17 PM

Previous topic - Next topic

spork_schivago

Hello,

Sorry if this is a very basic question.   I'm very knew to circuit design and the electronic world in general.   I wanted to try dumping the flash off this old Linksys WPS54G V1 wireless print server that I have and mess around with it before working on some more expensive equipment.   It uses a standard ARM 20-pin configuration.  I've soldered the wires to the pad.   It has a Marvell 88W8510 CPU.   I believe that has an ARM9 core.   It has a Macronix MX29LV800TTC-70 flash chip of 1MB.   It also has a EtronTech EM636165TS-6 x 2 RAM chip (4MB).

I believe I've successfully installed the WinUSB drivers for my ARM-USB-OCD-H device that I got in the mail yesterday.   I'm trying to follow the directions but I'm getting a little confused picking the target.   So far, for my openOCD command line, I have:

openocd -f ..\scripts\interface\ftdi\olimex-arm-usb-ocd-h.cfg

I've looked in ..\scripts\target but didn't really see anything that resembles 88W8510.   Could someone please help me figure out which interface file I need to pick?   I'd greatly appreciate it.   Thanks!

spork_schivago

#1
Also, I just checked in Device Manager (I'm running Windows 10 64-bit), There's one Olimex OpenOCD JTAG ARM-USB-OCD-H that is showing up under Other devices and is showing with no drivers installed, even though I used the Zadig installer like the README had suggested.   Interface #0 seems to of installed properly.   The directions said just install for Interface #0 if I wanted to use the COM emulation stuff and because I don't have a COM port on either computer, I'd like to use the COM emulation port.   Am I doing something wrong?   Thanks!

spork_schivago

I made some progress by reading the OpenOCD documentation and I have created a board.cfg file and a target.cfg file but I'm still having issues.   I've used Zidag to install drivers for Interface #1.

I run OpenOCD...

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


It just stays there.   Not sure if I have to connect via telnet or not.   The Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED worries me though.   What exactly does that mean and how can I fix it?   Here's my board cfg file and my target cfg file.


#
# Linksys WPS54G v1
#
# 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 0x159463d3
}

source [find target/88w8510.cfg]



# telnet_port 4444
# gdb_port 3333

# interface 0

reset_config trst_only

# jtag newtap auto0 tap -irlen 4 -expected-id 0x159463d3
jtag newtap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPID

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


I got the reset_config trst_only command from someone elses OpenOCD .cfg file for a system that uses the same 88w8510 chipset.    I'm not sure how to figure out the NOR flash base address.   I've downloaded the datasheet but don't see anything in there.   Maybe I should ask that question in the OpenOCD forums.   Mainly worried about the error though.   Any ideas?

JohnS

Few use Win10, even fewer use JTAG or OpenOCD or the JTAG tool you have with Win10.  You may get lucky with someone else who does but if not you'll have to find another way.  (I dumped Windows so can't help.)

John

spork_schivago

Quote from: JohnS on January 11, 2016, 01:12:32 AM
Few use Win10, even fewer use JTAG or OpenOCD or the JTAG tool you have with Win10.  You may get lucky with someone else who does but if not you'll have to find another way.  (I dumped Windows so can't help.)

John

Hey John,

Thanks for the reply!   I have an OpenSUSE box as well.   Would it be better trying this from Linux?  If so, any suggestions on what programs I should be looking for?  I'd just like to simply read the flash and then write it back right now but seem to be struggling.   Windows 10 could definitely be the cause!   Thanks for the input.

JohnS

Any Linux will be "easier" - for someone somewhat used to Linux (need not be an expert).

You can just install it (openocd) for your distribution.  Then follow its setup.  (And you want FTDI not the deprecated FT2232 or the like.  FTDI includes ft2232 etc but does it via newer more supportable code.)

I'd try it with a commoner device if you can, so you can check it's working.  If it doesn't, try root and if then OK you know what's wrong is udev rule(s) or the like.

Probably easier to use a supported ARM chip than the other you mention if it's not supported as if it isn't you have to learn oocd config etc - no biggie but another hill to climb for a newbie.  Make your life easier!

John

spork_schivago

Quote from: JohnS on January 11, 2016, 09:47:30 AM
Any Linux will be "easier" - for someone somewhat used to Linux (need not be an expert).

You can just install it (openocd) for your distribution.  Then follow its setup.  (And you want FTDI not the deprecated FT2232 or the like.  FTDI includes ft2232 etc but does it via newer more supportable code.)

I'd try it with a commoner device if you can, so you can check it's working.  If it doesn't, try root and if then OK you know what's wrong is udev rule(s) or the like.

Probably easier to use a supported ARM chip than the other you mention if it's not supported as if it isn't you have to learn oocd config etc - no biggie but another hill to climb for a newbie.  Make your life easier!

John

Thank you again John, for your advice.   I'll get right on setting up OpenOCD for Linux.   I was under the impression the Marvel 88w8510 was a supported ARM chip.   It has an ARM9 core and if I don't use an openOCD .cfg file, it seems to auto-detect the chip.   It seems I'm able to talk to the chip and issue commands.   I just seem to be struggling with trying to dump the NOR flash.   Can't seem to figure out the whole cfg stuff for it.   Is this what you mean by an ARM chip that's supported?   Are their chips out there that OpenOCD support that just automatically configure the settings for the flash and stuff so I don't have to try and figure it out myself?   Thanks for the help!

JohnS

If it's not NOR in the CPU or directly connected to JTAG then you need to know how to leap frog from CPU to the chip.  Good luck.

It may require things that are unpublished or awkward to find out and utterly different to what would be needed on another CPU (whether ARM or not).

You likely need the circuit diagram as well as how the CPU accesses it.

If you relish the challenge, great.

It'll be far easier if it happens to have oocd detailed support already but I don't think it does.

Many ARM chips are already supported, along with their internal flash or sometimes their external flash.

John

spork_schivago

Quote from: JohnS on January 11, 2016, 09:58:41 PM
If it's not NOR in the CPU or directly connected to JTAG then you need to know how to leap frog from CPU to the chip.  Good luck.

It may require things that are unpublished or awkward to find out and utterly different to what would be needed on another CPU (whether ARM or not).

You likely need the circuit diagram as well as how the CPU accesses it.

If you relish the challenge, great.

It'll be far easier if it happens to have oocd detailed support already but I don't think it does.

Many ARM chips are already supported, along with their internal flash or sometimes their external flash.

John

I gotcha!   Thanks John, you've been more than helpful.   Although I do love a challenge, I'll try finding something a bit easier to mess around with right now, till I get the hang of everything.  Thanks!

JohnS

There are some really cheap ARM boards with a JTAG connector on places like ebay.  On-chip flash is easier (appears in directly accessible address space).  Look at oocd for ideas of what's already supported and buy cheap items :)

Olimex make quite a few very good value boards, too.

That way you can play very cheaply and get used to software, hardware, etc.

I can't recall if there's direct oocd support for such as stm32f103c8.  There is for some of the ST Discovery boards.
(Just mentioning ST as an example, not important to go with them.)

By all means ask on the oocd list as people there are friendly and helpful.

John

spork_schivago

Quote from: JohnS on January 11, 2016, 11:47:22 PM
There are some really cheap ARM boards with a JTAG connector on places like ebay.  On-chip flash is easier (appears in directly accessible address space).  Look at oocd for ideas of what's already supported and buy cheap items :)

Olimex make quite a few very good value boards, too.

That way you can play very cheaply and get used to software, hardware, etc.

I can't recall if there's direct oocd support for such as stm32f103c8.  There is for some of the ST Discovery boards.
(Just mentioning ST as an example, not important to go with them.)

By all means ask on the oocd list as people there are friendly and helpful.

John

Thanks John.   I've asked on the OpenOCD forums for help with the same problem I'm having here because it took a few days to get a response.   Turns out the OpenOCD forums are over at SparkFun.   Never got a response.   But I'm sure they probably just couldn't help with my problem.   I think if I ask the question, like hey, what's a good development ARM based JTAG board that OpenOCD supports that has built-in flash, just to play around with, I'd probably get an answer real quick.   I thought perfor I got into building a circuit with an ARM board, I would figure out how to play with an already built system, like this wireless printer, but perhaps it's better going the other way.   I also might have more luck with their mailing list.

Again, I just wanted to thank you for taking the time to answer my questions.   You definitely got me pointed in the right direction here I feel.   Much appreciated.

JohnS

I think that may just be a SparkFun forum.  There's an oocd ML or two.  But doesn't sound like you really need anything else unless you get stuck.

John

spork_schivago

Quote from: JohnS on January 12, 2016, 02:09:16 AM
I think that may just be a SparkFun forum.  There's an oocd ML or two.  But doesn't sound like you really need anything else unless you get stuck.

John

I thought that too at first John but on OpenOCD's website (OpenOCD.org), they seem to have a link in the support section to it entitled Forums ( http://openocd.org/discussion/forum/ ).   It shows it's their forum but it's hosted by SparkFun.   I think the mailing lists might be a better choice for future problems.   Maybe the forums aren't monitored as frequently or something?   Anyway, I was thinking this one.   It's a STM32F103RBT6 Dev Board

http://www.ebay.com/itm/like/271851108997?ul_noapp=true&chn=ps&lpid=82

I want to eventually make something that has a touch screen on it so this could come in real handy.   However, I'd need to purchase one of those adapters because this says JTAG/SWD.

I don't see a board.cfg for it, even though there's a bunch of stm32*'s.   There's even an STM32F0 .cfg file, so close!   But I see other people are using OpenOCD to work with this board.   The guy that has a post on using this board with OpenOCD, he provides a copy of OpenOCD.cfg file that he uses with it, all setup and everything.

JohnS


spork_schivago

Quote from: JohnS on January 12, 2016, 09:34:17 AM
You can likely use stm32f1x.cfg

John
Thanks again John.   I don't see any stm32f1x.cfg files.   I don't see any .cfg files under board that even start with stm32f1...where would I find this file?   I've even checked the sourceforge github repository for it but couldn't find it...