Debugging without ICE Hardware

Introduction

If a dedicated ICE debugger is not available, it is still possible to load firmware into memory using the USB Debug Agent port available on some carrier boards.

Note

Although possible, it is always recommended to use a dedicated ICE-1000/2000 debugger for faster and more flexible debugging.

Limitations

The following regularly used OpenOCD feature set may not work as intended or have undefined behaviours when using the USB Debug Agent:

  • Flashing QSPI

  • Hard reset

  • Loading successive firmware files

Setup Instructions

Step 1: Configure Board Boot Mode

Switch the board to boot mode 0 and press RESET.

Step 2: Configure JTAG Interface Switches

Set all JTAG interface switches to the required configuration:

Warning

This will disable the JTAG interface used by the ICE debugger.

Step 3: Connect USB Debug Agent

Connect the USB Debug Agent on the carrier board to the host PC via USB cable.

Step 4: Start OpenOCD

Start OpenOCD with the adi-debugagent interface:

$sdk_usr/bin/openocd -f $sdk_usr/share/openocd/scripts/interface/adi-dbgagent.cfg -f $sdk_usr/share/openocd/scripts/board/ev-sc598-som.cfg -c init -c reset -c halt

Where sdk_usr is the SDK installation’s usr directory, for example:

/opt/adi-distro-glibc/5.0.1/sysroots/x86_64-adi_glibc_sdk-linux/usr/

Note

Replace the target/board configuration file as required by your hardware.

Step 5: Connect GDB to OpenOCD

In a separate terminal, connect GDB to OpenOCD:

$sdk_usr/bin/aarch64-adi_glibc-linux/aarch64-adi_glibc-linux-gdb -ex "tar ext :3333"

Loading Firmware

Once connected, load the firmware using GDB:

(gdb) load u-boot-proper-sc598-som-ezkit.elf
(gdb) c

The firmware will be loaded into memory and execution will begin.

Soft Reset via RCU

To perform a soft reset through the Reset Control Unit (RCU):

(gdb) set *0x3108C000=0x1

This command triggers a system reset without requiring physical hardware reset.

References