Use Raspberry Pi Debug Probe with OpenOCD and i.MX93 FRDM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Use Raspberry Pi Debug Probe with OpenOCD and i.MX93 FRDM

Use Raspberry Pi Debug Probe with OpenOCD and i.MX93 FRDM

Use Raspberry Pi Debug Probe with OpenOCD and i.MX93 FRDM

 

This document explains the integration process of the Raspberry Pi Debug Probe (Very low cost debugger) with the OpenOCD (On Chip Debugger) tool with the i.MX93 FRDM board.

 

Also, we will use GDB (GNU DeBugger) to interact with the OpenOCD.

 

1. Install and Configure OpenOCD

 

Update and install dependencies

sudo apt update

sudo apt install build-essential libtool automake pkg-config libusb-1.0-0-dev libhidapi-dev libftdi1-dev libjim-dev jimsh

 

Clone the OpenOCD repo

cd openocd

 

Run ./bootstrap to create the configuration file

git submodule update --init --recursive

./bootstrap

./configure --enable-cmsis-dap --enable-hidapi

 

Make OpenOCD

make -j$(nproc)

sudo make install

 

Download the configuration file for i.MX93

You can dowload the imx93.cfg in the Table 2. Software requirements on Ubuntu PC of the AN14367

Then, copy the downloaded file to the openocd/tcl/target/ as below:

cp ../imx93_new-b42b7c4cac18508442d3df035cec1c6d.cfg tcl/target/imx93.cfg

 

2. Create UDEV rules

 

sudo nano /etc/udev/rules.d/99-openocd.rules

Add the below in that file:

ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="000c", MODE="660", GROUP="plugdev", TAG+="uaccess"

 

Reload rules

sudo udevadm control --reload-rules && sudo udevadm trigger

 

3. Connecting the Hardware

 

To make the DAP works in the i.MX93 FRDM, we must rework the board removing the resistors R3017 and R3018:

 

frdm_r3017r3018_sch.png

frdm_r3017r3018.png

 

Now, we need to connect the Raspberry Pi Debug Probe with the SWD (P14) of our i.MX93 FRDM board:

 

FRDM-IMX93.jpeg

 

rpdebug.jpeg

 

4. Running the Debug Session

 

In this moment, with the RP Debug Probe connected, we can Boot the i.MX93 FRDM board and run the below command to start the OpenOCD:

$ openocd -s tcl -f interface/cmsis-dap.cfg -c "adapter speed 1000" -f target/imx93.cfg

 

tic-mpu@tic-mpu:~/Debug_test/openocd$ openocd -s tcl -f interface/cmsis-dap.cfg -c "adapter speed 1000" -f target/imx93.cfg
Open On-Chip Debugger 0.12.0+dev-02429-ge4c49d860 (2026-03-21-23:05)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
adapter speed: 1000 kHz
Warn : DEPRECATED: auto-selecting transport "swd". Use 'transport select swd' to suppress this message.
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=E6633861A33A1B2C
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 1000 kHz
Info : SWD DPIDR 0x5ba02477
Info : imx93.a55.0: hardware has 6 breakpoints, 4 watchpoints
Info : [imx93.a55.0] external reset detected
Info : [imx93.a55.0] Examination succeed
Info : [imx93.m33] Cortex-M33 r1p0 processor detected
Info : [imx93.m33] target has 8 breakpoints, 4 watchpoints
Info : [imx93.m33] Examination succeed
Info : [imx93.ahb] Examination succeed
Info : [imx93.a55.0] starting gdb server on 3333
Info : Listening on port 3333 for gdb connections
Info : [imx93.m33] starting gdb server on 3334
Info : Listening on port 3334 for gdb connections
Info : [imx93.ahb] gdb port disabled

 

From the Logs, we can see we have two ports:

3333 for Cortex A55 [imx93.a55.0]
3334 for Cortex M33 [imx93.m33]

 

Install gdb-multiarch

 

Now, we can install GDB:

sudo apt install gdb-multiarch

And start a Debug session:

$ gdb-multiarch ~/linux-imx/vmlinux

 

$ gdb-multiarch ~/linux-development/linux-imx/vmlinux
GNU gdb (Ubuntu 15.1-1ubuntu1~24.04.1) 15.1
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/tic-mpu/linux-development/linux-imx/vmlinux...
(gdb) target extended-remote localhost:3333
Remote debugging using localhost:3333
0x00000000fff118fc in ?? ()

 

A simple example of how to read a register with GDB:

(gdb) x/xw 0x43810000
0x43810000:     0x02010001

 

 

Happy debugging!

 

 

Best regards,

Salas. 

No ratings
Version history
Last update:
‎03-31-2026 12:08 PM
Updated by: