Dangerous Prototypes

Dangerous Prototypes => Bus Pirate Support => OpenOCD JTAG => Topic started by: robots on January 30, 2010, 10:41:03 pm

Title: OpenOCD integration
Post by: robots on January 30, 2010, 10:41:03 pm
I'm almost finished with integration of the OpenOCD binary interface into main firmware. I have added ISR for UART tx/rx.

The parts missing/not working are:
- fallback on inactivity (i had some trouble with the timer setup- can someone review the commented code in OpenOCD.c ? please :) )
- add defines for other than v3 BP (this can break stuff :(, i hope i didn't mess up too much)
- ADCs (5v readout works, 3v3 not so much)
- patch for openocd

I will finish this tomorrow. As i had enough coding for this day. Vision getting blurred .... :)
Title: Re: OpenOCD integration
Post by: robots on January 31, 2010, 02:54:24 pm
I have added the latest openocd patch to SVN.

http://code.google.com/p/the-bus-pirate ... te-v3.diff (http://code.google.com/p/the-bus-pirate/source/browse/trunk/documents/openocd-0.3.0-rc0-buspirate-v3.diff)

Compile instructions stay the same.

This patch is to be used with the latest nightly FW.

I have fixed things:
- adcs now work
- on other than BPv3 the TRST signal is not supported (it is not needed as the jtag reset can be done using TMS signal)

I have removed the timeout implementation, as there is a way in openocd to turn off the polling. This would break a lot of stuff.

You need to exit openocd using command shutdown (in telnet) , exit (on command line) so that the buspirate is in known state (speed, and other setting). If not you will have to replug the usb.

Almost forgot .. I have added command:
buspirate_mode sets the pin accordingly
buspirate_pullup <1 | 0> enables/disables pullups
Title: Re: OpenOCD integration
Post by: robots on February 06, 2010, 01:50:49 am
Tip for openocd:

Turn off "poll mode" to achieve more speed. It goes from:
wrote 53056 byte from file FLASH_RUN/stm32_menu.elf in 8.606988s (6.019818 kb/s)
to:
wrote 53056 byte from file FLASH_RUN/stm32_menu.elf in 8.010809s (6.467824 kb/s)

Which is almost half second, and almost 1 and half for the full memory flash :) (i have 128k)

( ! ) 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.00882057840session_write_close ( )...(null):0
20.00912189432ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.00912190208Database_MySQL->query( ).../DatabaseHandler.php:119
40.05142328936Database_MySQL->error( ).../Db-mysql.class.php:273