IMX7D

From SEGGER - Support Wiki
Jump to: navigation, search

Multi-core support for iMX7D

J-Link script files are necessary to connect to both A7 cores and the M4 core of the iMX7D MCU.

Example package for J-Link Commander:

How to use script files: Please refer to J-Link User Guide (UM08001), chapter 5.10 "J-Link script files"

Startup procedure is:

1)     Start debug session that connects to A7_0
2)     Start debug session that connects to A7_1
3)     Start debug session that connects to M4
[...]
x)     Close debug session that connects to M4
x + 1) Close debug session that connects to A7_1
x + 2) Close debug session that connects to A7_0

Important!

On the iMX7D the A7_1 core cannot be independently debugged without enabling the core by either having something running on the A7_0 or M4 that enables the A7_1 or as part of the A7_0 J-Link script file. In the example script file above, we chose the later case to enable the A7_1 core from within the A7_0 J-Link script file.

M4 Debug Application (Example)

In order to debug an application running on the M4, the application needs to be loaded on the Cortex-M4 using the Cortex-A7. This can be done either by the application running on the A7 core or by loading the code manually (e.g. using J-Link Commander). A step-by-step instruction with detailed information is provided by NXP in the Application Note AN5317 (http://www.nxp.com/assets/documents/data/en/application-notes/AN5317.pdf). A short step-by-step instruction which shows how to reload & debug the code on the M4 using J-Link Commander is given below. The used application is part of the FreeRTOS example, available for download on the NXP webpage. The example has been created to run on the MCIMX7SABRE evaluation board (red LED D10 blinks): File:Blinking imx demo gpt.zip

  1. Start J-Link Commander and connect to the A7 main core using the iMX7D_Connect_CortexA7_0.JLinkScript J-Link script file
  2. Issue a software reset of the M4 (w4 0x3039000C 0xAC)
  3. Load the M4 application code to the TCM_L memory space (loadfile blinking_imx_demo_gpt.bin,0x007F8000)
  4. Set PC and SP according to the build M4 application (In this example: w4 0x00180000 0x20008000 and w4 0x00180004 0x1FFFACFD
  5. Perform a software reset of the M4 core in order to start the application (w4 0x3039000C 0xAA)

--> If the application has been started successfully, the red LED (D10) starts blinking

  1. Start J-Link Commander and connect to the M4 core using the iMX7D_Connect_CortexM4.JLinkScript J-Link script file
  2. Issue a halt request using the h command in J-Link Commander --> LED stops blinking
  3. Let the application run again using the go command in J-Link Commander --> LED starts blinking again