Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tools:openocd [2024/08/24 11:16] darrontools:openocd [2025/02/23 18:10] (current) darron
Line 13: Line 13:
 ===Install=== ===Install===
  
-==RPi==+Build from source enabling every supported interface type. 
 + 
 +==Dependencies==
  
 Install prerequisites. Install prerequisites.
  
 <code> <code>
-apt install build-essential git automake libtool libhidapi-dev libcapstone-dev libusb-1.0-0-dev libjaylink-dev pkg-config+apt install build-essential git automake libtool libhidapi-dev libcapstone-dev libusb-1.0-0-dev libjaylink-dev libgpiod-dev libftdi-dev pkg-config
 </code> </code>
 +
 +==Dev==
  
 Install into /usr/local Install into /usr/local
Line 26: Line 30:
 mkdir -p /opt/src mkdir -p /opt/src
 cd /opt/src cd /opt/src
-git clone https://git.code.sf.net/p/openocd/code openocd+git clone --recursive https://git.code.sf.net/p/openocd/code openocd
 cd openocd cd openocd
 ./bootstrap ./bootstrap
-./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio --enable-picoprobe --enable-jlink --enable-ft232r --enable-cmsis-dap --enable-cmsis-dap-v2 --with-capstone+./configure --prefix=/usr/local --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio --enable-picoprobe --enable-jlink --enable-ft232r --enable-cmsis-dap --enable-cmsis-dap-v2 --enable-dummy --with-capstone --enable-openjtag --enable-aice --enable-presto --enable-usb-blaster --enable-internal-jimtcl
 make -j 4 make -j 4
 make install make install
 </code> </code>
  
-NB ST provide modified version for their processors+STMicroelectronics and RPi provide modified versions of OpenOCD for their processors 
 + 
 +==STM== 
 + 
 +Install into /opt 
 + 
 +<code> 
 +mkdir -p /opt/src 
 +cd /opt/src 
 +git clone https://github.com/STMicroelectronics/OpenOCD openocd.stm 
 +cd openocd.stm 
 +./bootstrap 
 +./configure --prefix=/opt/openocd.stm --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio --enable-picoprobe --enable-jlink --enable-ft232r --enable-cmsis-dap --enable-cmsis-dap-v2 --enable-dummy --with-capstone --enable-openjtag --enable-aice --enable-presto --enable-usb-blaster 
 +make -j 4 
 +make install 
 +</code> 
 + 
 +==RPi== 
 + 
 +Install into /opt 
 + 
 +<code> 
 +mkdir -p /opt/src 
 +cd /opt/src 
 +git clone https://github.com/raspberrypi/openocd openocd.rpi 
 +cd openocd.rpi 
 +./bootstrap 
 +./configure --prefix=/opt/openocd.rpi --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio --enable-picoprobe --enable-jlink --enable-ft232r --enable-cmsis-dap --enable-cmsis-dap-v2 --enable-dummy --with-capstone --enable-openjtag --enable-aice --enable-presto --enable-usb-blaster 
 +make -j 4 
 +make install 
 +</code> 
 + 
 +==Test== 
 + 
 +<code> 
 +/opt/openocd.rpi/bin/openocd -f "interface/cmsis-dap.cfg" -f "target/rp2350.cfg" -c "adapter speed 4000" 
 +Open On-Chip Debugger 0.12.0+dev-gebec9504d (2024-10-17-18:47) 
 +Licensed under GNU GPL v2 
 +For bug reports, read 
 +        http://openocd.org/doc/doxygen/bugs.html 
 +Info : Hardware thread awareness created 
 +Info : Hardware thread awareness created 
 +Info : Hardware thread awareness created 
 +Info : Hardware thread awareness created 
 +cortex_m reset_config sysresetreq 
 +adapter speed: 4000 kHz 
 +Info : Listening on port 6666 for tcl connections 
 +Info : Listening on port 4444 for telnet connections 
 +Info : Using CMSIS-DAPv2 interface with VID:PID=0x2e8a:0x000c, serial=1C789DE3E289C250 
 +Info : CMSIS-DAP: SWD supported 
 +Info : CMSIS-DAP: Atomic commands supported 
 +Info : CMSIS-DAP: Test domain timer supported 
 +Info : CMSIS-DAP: FW Version = 2.0.0 
 +Info : CMSIS-DAP: Interface Initialised (SWD) 
 +Info : SWCLK/TCK = 0 SWDIO/TMS = 0 TDI = 0 TDO = 0 nTRST = 0 nRESET = 0 
 +Info : CMSIS-DAP: Interface ready 
 +Info : clock speed 4000 kHz 
 +Info : SWD DPIDR 0x4c013477 
 +Info : [rp2350.dap.core0] Cortex-M33 r1p0 processor detected 
 +Info : [rp2350.dap.core0] target has 8 breakpoints, 4 watchpoints 
 +Info : [rp2350.dap.core0] Examination succeed 
 +Info : [rp2350.dap.core1] Cortex-M33 r1p0 processor detected 
 +Info : [rp2350.dap.core1] target has 8 breakpoints, 4 watchpoints 
 +Info : [rp2350.dap.core1] Examination succeed 
 +Info : starting gdb server for rp2350.dap.core0 on 3333 
 +Info : Listening on port 3333 for gdb connections 
 +</code> 
 + 
 +==Update==
  
 <code> <code>
-git clone https://github.com/STMicroelectronics/OpenOCD openocd.stm32+make distclean 
 +git pull --recurse-submodules 
 +...
 </code> </code>