For the complete documentation index, see llms.txt. This page is also available as Markdown.

LX2160 JTAG with OpenOCD

The LX2160A SoC features a standard ARM CoreSight Debug Interfaces, which can be used with OpenOCD and generic debug probes in place of NXP's own CodeWarrior Tap and Software.

A range of quirks are needed to accomplish this, most of which deserves thanks to the general community.

SolidRun Boards JTAG Connectors

JTAG Adapters

General purpose JTAG Adapters should be usable, this section lists those that were actually tested.

SEGGER J-Link can connect to SolidRun LX2160 & LX2162 boards by using any of two adapters:

See the OpenOCD Configuration File section below for connecting to an LX2160 board with OpenOCD and J-Link.

On Linux this is as simple as:

sudo openocd -f openocd_jlink_lx2160a.cfg

On Windows the WinUSB driver may be necessary, see SEGGER Documentation for details.

Enable Debugging Fused (Secure-Boot) SoCs

If LX2160/LX2162 eFuses were blown to enable secure boot, debugging through JTAG is disabled by default.

This can be overridden by setting SDBGEN bit in RCW to 1, requiring installation of a special signed debug image. See this patch for pointers on where this bit can be set.

Halt Cortex-A72 Core 0

Once connected to the OpenOCD command-line (telnet), the core can be stopped by a set of direct commands sent to the DAP. At the time of writing the "halt" command did not operate as intended:

The final command should print a value similar to 0x03007f13. Here the least significant bit indicates whether the core is halted (bit set), or still running (bit cleared).

Now automatic control of dap can be re-activated:

OpenOCD has detected the halted state, and other commands may be used to inspect all state, e.g. to print all registers:

Or to print memory at the program counter to find where execution halted:

Here it was halted at an infinite loop, a branch with offset 0.

Note: The halt sequence above has been included in the example OpenOCD config file below as lx2160_halt_core0 command.

References

OpenOCD Configuration File

Example OpenOCD configuration file for connecting to an LX2160 board with J-Link (openocd_jlink_lx2160a.cfg):

Last updated