JTAG debugging support

Name

JTAG support -- Usage

Use of JTAG for debugging

JTAG can be used to single-step and debug applications loaded in RAM, or even applications resident in ROM.

The MPC512x core only supports two hardware breakpoints, and so they should be used sparingly. If using a GDB front-end such as Eclipse, check it has not set unnecessary extra breakpoints. Some JTAG devices give the option of whether to set hardware or software breakpoints by default. Be sure to configure your device appropriately.

Ronetix PEEDI notes

On the Ronetix PEEDI, the peedi.mpc5121ads.cfg file should be used to setup and configure the hardware to an appropriate state to load programs. This includes setting up the clocks, chip selects and SDRAM controller.

The peedi.mpc5121ads.cfg file also contains an option to define whether hardware or software breakpoints are used by default, using the CORE0_BREAKMODE directive in the [PLATFORM_MPC8300] section. Edit this file if you wish to use hardware break points, and remember to restart the PEEDI to make the changes take effect.

On the PEEDI, debugging can be performed either via the telnet interface or using powerpc-eabi-gdb and the GDB interface. In the case of the latter, powerpc-eabi-gdb needs to connect to TCP port 2000 on the PEEDI's IP address. For example:

      (gdb) target remote 111.222.333.444:2000
     

By default when the PEEDI is powered up, the target will always run the initialization section of the peedi.mpc5121ads.cfg file, and halts the target. This behaviour is repeated whenever the board is reset.

If the board is reset (by pressing the reset button) and the 'go' command is then given, then the board will boot as normal. If a RedBoot is resident in flash, it will be run.

Consult the PEEDI documentation for information on other features.

Configuration of JTAG applications

If the JTAG device has initialized the processor, such as by using the peedi.mpc5121ads.cfg configuration on the PEEDI, applications can be loaded directly into RAM without requiring a ROM monitor. This loading can be done directly through the JTAG device, or where supported by the JTAG device, through GDB.

In order to configure the application to support this mode, some configuration settings are required. Firstly CYGSEM_HAL_USE_ROM_MONITOR must be disabled. Secondly the CYGDBG_HAL_DIAG_TO_DEBUG_CHAN option should be disabled in order to prevent HAL diagnostic output being encoded into GDB ($O) packets. Selecting the JTAG startup type in the configuration tool sets these options automatically.

Running RAM applications

Once loaded and running via JTAG, HAL diagnostic output will appear by default on PSC3.

2017-02-09
Documentation license for this page: eCosPro License