jimmo wrote: ↑Wed Sep 18, 2019 11:08 am
Can you post a corrected version, if that might be useful to other people reading this thread.
Okay,
Official website for OpenOCD (Open On Chip Debugger) is:
http://openocd.org/
Version 0.10.0 is available here:
https://sourceforge.net/projects/openoc ... cd/0.10.0/
Windows users may prefer windows binaries available here :
http://www.freddiechopin.info/en/downlo ... /4-openocd
I downloaded windows binaries. It doesn't need any installation. Simply extract the zip file wherever you want, then go to PATH_TO_INSTALL_DIR\openocd\scripts\board and search the config file for your particular board. Mine was stm32f7discovery and st_nucleo_f4.cfg As far as I see there are too many config options for several boards, chips, fpga, interface ... A User's guide also exits. Notice that 2 sets of binaries exist for 32 bit and 64 bit in \bin and \bin-x64 directories. On my 64 bit machine both sets worked well.
On Linux and OsX, installation, configuration and running should be different, you may get inspiration from this video:
https://youtu.be/R5wub5ywzTU
Let's go ahead ;
Connect your board and test it is connected and communicating normally.
Code: Select all
>cd PATH_TO_INSTALL_DIR\openocd
>bin\openocd -f board/YOUR_BOARD.cfg #for 64 bit you may try bin-x64
if all right, you will see some messages on the command screen telling that the openocd is connected to your board and waiting for a telnet connection.
Then open another command screen and
Code: Select all
>telnet localhost 4444 #you have to have telnet installed
alternatively you may use PuTTY and establish a telnet connection to hocalhost over 4444 port.
if still all right, on the second command screen you will see
OpenOCD is waiting commands from you. Don't enter "help", it prints an encyclopedia on the screen
directing output to a file with "help > openocd_help.txt" looks like working but I couldn't find the output file.
OpenOCD is a very capable tool so I recommend you to look at its manual and other documents to see what is possible. I will give you some examples:
Code: Select all
> targets
this prints info on connected targets
> flash banks
> reg
> reg r0
these print corresponding info on registers respectively