From 84fce99b5e39727131124df609d9437992642594 Mon Sep 17 00:00:00 2001 From: Jiafei Pan Date: Mon, 28 Apr 2025 11:21:45 +0800 Subject: [PATCH] boards: imx91_evk: add JLink runner support Use JLink runner to flash and debug on i.MX91 EVK. Signed-off-by: Jiafei Pan --- boards/nxp/imx91_evk/board.cmake | 8 +++++ boards/nxp/imx91_evk/doc/index.rst | 47 ++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 boards/nxp/imx91_evk/board.cmake diff --git a/boards/nxp/imx91_evk/board.cmake b/boards/nxp/imx91_evk/board.cmake new file mode 100644 index 00000000000..25a91be4733 --- /dev/null +++ b/boards/nxp/imx91_evk/board.cmake @@ -0,0 +1,8 @@ +# +# Copyright 2025 NXP +# +# SPDX-License-Identifier: Apache-2.0 + +board_runner_args(jlink "--device=MIMX9131" "--no-reset" "--flash-sram") + +include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) diff --git a/boards/nxp/imx91_evk/doc/index.rst b/boards/nxp/imx91_evk/doc/index.rst index be734dfb1ce..e6f7ff26c1b 100644 --- a/boards/nxp/imx91_evk/doc/index.rst +++ b/boards/nxp/imx91_evk/doc/index.rst @@ -72,6 +72,53 @@ CPU's UART1 for A55 core. Programming and Debugging ******************************* +.. zephyr:board-supported-runners:: + +There are multiple methods to program and debug Zephyr + +Option 1. Boot Zephyr by Using JLink Runner +=========================================== + +The default runner for the board is JLink, connect the EVK board's JTAG connector to +the host computer using a J-Link debugger, power up the board and stop the board at +U-Boot command line. + +Then use "west flash" or "west debug" command to load the zephyr.bin +image from the host computer and start the Zephyr application on A55 core0. + +Flash and Run +------------- + +Here is an example for the :zephyr:code-sample:`hello_world` application. + +.. zephyr-app-commands:: + :zephyr-app: samples/hello_world + :host-os: unix + :board: imx91_evk/mimx9131 + :goals: flash + +Then the following log could be found on UART1 console: + +.. code-block:: console + + + *** Booting Zephyr OS build v4.1.0-3063-g2c7ef313ac38 *** + Hello World! imx91_evk/mimx9131 + +Debug +----- + +Here is an example for the :zephyr:code-sample:`hello_world` application. + +.. zephyr-app-commands:: + :zephyr-app: samples/hello_world + :host-os: unix + :board: imx91_evk/mimx9131 + :goals: debug + +Option 2. Boot Zephyr by Using U-Boot Command +============================================= + U-Boot "go" command is used to load and kick Zephyr to Cortex-A55 Core. Copy the compiled ``zephyr.bin`` to the first FAT partition of the SD card and