Skip to main content

Show Posts

This section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.

Messages - gonemad

4
OpenOCD JTAG / Re: buspirate.cfg?
Yes, I know that. But since I am not able to find the relevant target config files, I'm hoping to find something or some that are similar enough to the BCM6348. And according to:
http://www.linux-mips.org/wiki/Broadcom_SOCs
This chip is very similar to BCM3348,6358,6368.  So if I can find any OpenOCD target files for any of these, it should be a lot easier to make one for my own chip.

I have also tried to find any BSDL files for these, in vain. Perhaps my google skills are not up to date?

Yes, I have all(?) UrJTAG configuration (?) files from the "data" directory, for both: 6348 and 6358.

Here's 6348:
Code: [Select]
register	BR		 1
register BSR 480
register DIR 32
register EJIMPCODE 32
register EJADDRESS 32
register EJDATA 32
register EJCONTROL 32
register EJALL 96

instruction length 5

instruction BYPASS 11111 BR
instruction SAMPLE/PRELOAD 00010 BSR
instruction IDCODE 00001 DIR
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

As you can see this is very short and boring, so I cannot see how you can use this info. Any ideas?
(I have a pending question on OpenOCD forum, but it has to be accepted by moderator first, who seem to have been eaten by a giant Easter chicken.)

PS. I am not intending to do any advanced JTAG analysis, I just would like to perform a chain scan, reading some chip/board binary info and possibly erase/reflash NVRAM. So do I still need a complete set of target config file(s)?
5
OpenOCD JTAG / Re: buspirate.cfg?
Quote
But i am not sure about the results :). Is your cpu supported by openocd ?

Well, that is my question. I'm sure it is supported in principle, since you should be able to create the appropriate scripts for any jtag'able device. In addition, other people have managed to use other Broadcom devices with OpenOCD, but I have not found any one script for the chips set in question, which is BCM63xx.
And like you already mentioned, it is MIPS based, and MIPS are in fact one of the "supported" chips, according to OpenOCD manual, although I (and others) have not been able to find this "support".

(I'm really starting to dislike that term "support". It seems it can mean just about anything, but most of the time nothing! ;)
6
OpenOCD JTAG / Re: buspirate.cfg?
@ Robots:  Thanks! Seem to work, see results here: viewtopic.php?f=27&t=1702&p=21004#p21004

But I need a OpenOCD config file for the only board I have, which is a Broadcom 63xx based one... Or is it possible to successfully send the chain scan command (or others) to the board, without having to specify a target config file?
7
OpenOCD JTAG / Re: buspirate.cfg?
Hi! Just to clarify:
Quote
Thanks for the tip on #, I updated the wiki page with a note. Have the comments been removed from the examples included in the development version you compiled?

You CAN have "#" comments after a configuration line, iff you terminate the line with a " ;" (notice the space), otherwise OpenOCD thinks that "# blah bla" is part of the configuration.

"buspirate_pullup 0 # Pullup disabled"              ==> NOT OK!
"buspirate_pullup 0 ;# Pullup disabled"            ==> OK!
"buspirate_pullup 0; # Pullup disabled"            ==> probably OK!
"#buspirate_pullup blah blah # Pullup disabled" ==> OK!

Quote
Where there any example configuration files in the version you got? I have only used pre-compiled windows versions in the past, and they always included a bunch of examples.

Could you elaborate?
I'm really clueless here, there are tons of files around.
/openocd/contrib/  --> just one "example.cfg"
/openocd/scripts/ --> board, chip, cpld, cpu, interface,target,test subdirectories...

Where should I post what I have so far (regarding BP/OpenOCD and windows)? Perhaps I start a new thread, so I can update/edit my post as my progress move along.
8
Bus Pirate Development / Re: Re: Firmware v6
When can we expect the next update?? (It's already been more than 6 months, since last one...and there are some improvements still to be resolved.)
9
OpenOCD JTAG / Re: buspirate.cfg?
Hi,
After editing and experimenting with the buspireate.cfg file, I finally got a little bit more on the way, but then everything failed with the same error as in this post:  viewtopic.php?f=27&t=1702#p19292

So now I am stuck again...

In the meantime I'll respond to your post:
Quote
I'm sorry, I don't see the instructions you're refering to.
They were:
http://forum.sparkfun.com/viewtopic.php?t=11221
http://piconomic.co.za/fwlib/_b_u_i_l_d ... o_c_d.html

Here's my buspireate.cfg file:
Code: [Select]
interface buspirate
buspirate_port /dev/com13
buspirate_speed normal
reset_config srst_only

In fact I have some comments about the OpenOCD & the buspirate.cfg files:

1) "#" Comments after .cfg commands are not working/allowed ??
Because of this you may wanna update this page: http://dangerousprototypes.com/docs/Bus ... or_OpenOCD

2) OpenOCD configuration files should now declare "transports",
  which is not currently present in "buspirate.cfg". (See adapter.c:171)
  (Adding a "transport select jtag" line to the .cfg file crashes OpenOCD.)

openocd/src/jtag/adapter.c:
Code: [Select]
168         if (!jtag_interface->transports)
169                LOG_WARNING("Adapter driver '%s' did not declare "
170                        "which transports it allows; assuming "
171                        "legacy JTAG-only", jtag_interface->name);
172                retval = allow_transports(CMD_CTX,
173                                        jtag_interface->transports
174                                                ? : jtag_only);
175                        if (ERROR_OK != retval)
176                                return retval;

3) There is at least one spelling error in the info messages in the "buspirate.c" file:
  "Error: Buspirate error. Is is binary//OpenOCD support enabled?"

In fact this is the error I now keep on getting, as referred to in the top thread link.

4) There often seem to be some problems with the "reset_config srst_only" line...

The line that I use for testing (not actually connecting to anything) is this:
Code: [Select]
openocd.exe -f bitpirate.cfg -f stm32.cfg

However, I am curious as to which target chip to use for a MIPS based Broadcom 6348 ?
In the OpenOCD documentation they say they support a mips_m4k, but I can't find it/load it...
http://openocd.berlios.de/doc/html/CPU- ... figuration

So how can I find out how to add that board to this target list, if it is not already there/supported?

In addition it has the following:
Flash: 29LV320CBTC-90G, 32Mbit
SDRAM: Winbond W9812G6GH-6 (2Mx4x16 bits)
10
OpenOCD JTAG / buspirate.cfg?
The fog is slowly beginning to dissipate...

About the router SW/HW, that is a forum by itself. See any threads on OpenWRT. I don't think I need to specify this at the moment, as it would distract from the basic and current problems. But I can tell you it is a Broadcom 6348 SoC with what seem to be a standard 14 pin MIPS JTAG...

Quote
Have you tried to follow any of the OpenOCD examples and perform a chain scan? Have you tried to connect to the Bus Pirate via OpenOCD? I think the functionality you want is there in the main firmware.

This is exactly what I'd like to do! But I just can't find a working procedure. However, I have successfully compiled OpenOCD for Cygwin on WinVista, given some of the instructions on the Michal Demin page and others. Here are the results:

Code: [Select]
$ ./bootstrap
$ ./configure --enable-buspirate --enable-maintainer-mode --disable-werror --disable-shared --enable-ft2232_ftd2xx --with-ftd2xx-win32-zipdir=/cygdrive/c/myusr/ftd2xx
$ make && make install
$ which openocd.exe

/usr/local/bin/openocd.exe

$ openocd.exe --help

Open On-Chip Debugger 0.5.0-dev-00858-g3c6af51-dirty (2011-04-21-20:38)
Licensed under GNU GPL v2
For bug reports, read
        --------------------------------------------------
Open On-Chip Debugger
Licensed under GNU GPL v2
--help      | -h      display this help
--version    | -v      display OpenOCD version
--file      | -f      use configuration file <name>
--search    | -s      dir to search for config files and scripts
--debug      | -d      set debug level <0-3>
--log_output | -l      redirect log output to file <name>
--command    | -c      run <command>

But then the instructions are talking about copying the content of the /usr/local/share/openocd/scripts/interface/buspirate.cfg file and change it to my needs. Although not saying anything how to determine these. So now what??
11
OpenOCD JTAG / Re: 5.9 and 5.10 firmware still no OpenOCD?
[EDIT - removed last comment and supplied new info.]

So I basically got the same results as the other guys after updating to Firmware V6.0RC!!

$ openocd.exe -f bitpirate.cfg
Code: [Select]
Open On-Chip Debugger 0.5.0-dev-00858-g3c6af51-dirty (2011-04-21-20:38)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.berlios.de/doc/doxygen/bugs.html
Warn : Adapter driver 'buspirate' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
srst_only separate srst_gates_jtag srst_open_drain
Info : Buspirate Interface ready!
Error: Translation from jtag_speed to khz not implemented
Info : adapter-specific clock speed value 0
Warn : There are no enabled taps.  AUTO PROBING MIGHT NOT WORK!!
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: IR capture error at bit 0, saw 0x00 not 0x...3
Warn : Bypassing JTAG setup events due to errors
Warn : gdb services need one or more targets defined
[HANG!]

I particularly don't like the error:
Quote
Error: Translation from jtag_speed to khz not implemented

I can accept the other errors as I am not connecting to anything and neither specifying a board... So instead I tried:

$ openocd -f bitpirate.cfg -f stm32.cfg -c "init"

Code: [Select]
Open On-Chip Debugger 0.5.0-dev-00858-g3c6af51-dirty (2011-04-21-20:38)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.berlios.de/doc/doxygen/bugs.html
Warn : Adapter driver 'buspirate' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
srst_only separate srst_gates_jtag srst_open_drain
1000 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
cortex_m3 reset_config sysresetreq
Info : Buspirate Interface ready!
Error: Translation from jtag_speed to khz not implemented
Info : adapter-specific clock speed value 1000
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: stm32.cpu: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
Warn : Invalid ACK 0 in JTAG-DP transaction
Polling target failed, GDB will be halted. Polling again in 100ms
Polling target failed, GDB will be halted. Polling again in 300ms
Polling target failed, GDB will be halted. Polling again in 700ms
Polling target failed, GDB will be halted. Polling again in 1500ms
Polling target failed, GDB will be halted. Polling again in 3100ms
Polling target failed, GDB will be halted. Polling again in 6300ms
Polling target failed, GDB will be halted. Polling again in 6300ms
Polling target failed, GDB will be halted. Polling again in 6300ms
...
[CTRL-C]
And this seem to work, since it is very similar to the result from one of the comments here:
https://michaldemin.wordpress.com/2010/ ... d-openocd/
although I don't know for sure since I don't have any (supported) board to try it with...

Does anyone know where I can get a OpenOCD config file to some (any really) Broadcom 63xx board? Google didn't give me a jack...
12
Bus Pirate Support / Re: JTAG situation with the Bus Pirate
Hi Ian,

First of all, thanks for your concern with my issues. But let me give you some background to my recent problems.

Some time ago, I needed to change the firmware in my router. It was then clear I needed a serial cable to do this, so I started to look around for a serial cable solution. I then came across the BusPirate which offered many additional and cool features, for hacking into all sorts of hardware. One of those features that caught my attention was the JATG "support", which I knew could be handy in case something went wrong with re-flashing the FW, and potentially bricking the router bootloader firmware. So I decided to buy the BusPirate.

Sure enough, as my SMD soldering skills had become extremely rusty and I no longer had my temperature controlled SMT iron, my new/cheap 35W iron completely burned off the soldering pads for the serial connector. (I am working on repairing this...) So I thought: no problem, I'll just use the JTAG connector and the BPv3 JTAG "support" to reflash the FW, even if extremely slow. To my dismay, after firing up my BP there was no longer any JTAG functionality, as was very nicely described on the "Hack-a-day" link, goggle code link and on your web page: http://dangerousprototypes.com/docs/JTAG , https://code.google.com/p/the-bus-pirat ... usModeJTAG .

I have then spent most of my time navigating between numerous incomprehensible/outdated web pages with unclear and often contradictory information, distributed on several different websites related to the BusPirate. Ending up on your thread: http://dangerousprototypes.com/2010/06/ ... rate-jtag/ .

Giving little information on what is going on while referring to a manual page that is even less helpful, as it was contradictory and missing relevant information about the various firmwares available and distributed with the BP. The links to sourceforge was not very helpful either as neither the site nor the README files explained what to use when and where. In fact it is even clear as to what tool to use to "update", "downgrade" or change the BP firmware.

Should I use the windows GUI, the "ds30 Loader", command line? What?
(E.g. Can I use the original "ds30 loader" found on a different website?) Oh, yes and then there's the "Pirate-Loader console application" and BTW, the ds30loader is NOT compatible with "bootloader v4+". What does "v4+" mean? Is that including v5.x or is it a subversion of V4 only, or something else? Perhaps you start to see the mixed signal and confusion here... I'm sure you'd never design a PCB after these kind of instructions... ;)

In any case, this is what I have. And all I'd like to know, is WHAT I have to do to be able to interact with my board using the JTAG connector?

----
HiZ>i                                                                         
Bus Pirate v3b                                                                 
Firmware v5.10 (r559)  Bootloader v4.4                                         
DEVID:0x0447 REVID:0x3043 (24FJ64GA002 B5)                                     
----

Yes I do understand that this is a an open source project made possible by various altruistic developers, and it may be very difficult to organize all the information about the various PCB versions and firmware versions in one place for a clear and concise overview. And I really do appreciate all of that. And I do like the fact that part of the BP (Seedstudio) money goes back into the open development of new SW/HW etc. But it is also clear that you have no idea/oversight of what is actually written and presented on the various web pages related to this project. I'm not sure the Wiki format is the right one here...

Just think in how many ways a new visitor can interpret a statement like:  "Updating with Bootloader v4". Do you intend updating the BP bootloader? Or updating (something) USING the bootloader v4? Or updating TO bootloader v4? Ask any first time BP buyer, that is not already a JTAG expert, to try to follow/comprehend what is written...

Thanks again. No insult intended, just some clarification and constructive critique.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01602434280session_write_close ( )...(null):0
20.01632565856ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01632566632Database_MySQL->query( ).../DatabaseHandler.php:119
40.05962705352Database_MySQL->error( ).../Db-mysql.class.php:273