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 .... :)
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
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)