Loading U-Boot without an ICE Debugger (USB Debug Agent)

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.

Unsupported Feature Set

Note

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

The following regularly used OpenOCD feature set may not work as intended or have undefined behaviours:

  • Flashing QSPI

  • Hard reset

  • Loading successive firmware files

Getting Started

  1. Switch board to bootmode 0, press RESET

  2. Set all JTAG interface switches to the required configuration:

Warning

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

  1. Connect the USB Debug Agent on the carrier board with the host.

  2. 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 and may correspond to something like:

/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.

  1. Connect GDB to OpenOCD:

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

Loading Firmware

Connect GDB to OpenOCD and load the firmware:

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

Soft Reset via RCU

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

(gdb) set *0x3108C000=0x1

References