1#
2# Copyright 2024 NXP
3#
4# SPDX-License-Identifier: Apache-2.0
5#
6
7if(CONFIG_SOC_MCXN947_CPU0)
8  board_runner_args(jlink "--device=MCXN947_M33_0" "--reset-after-load")
9  board_runner_args(linkserver  "--device=MCXN947:FRDM-MCXN947")
10  board_runner_args(linkserver  "--core=cm33_core0")
11  board_runner_args(linkserver  "--override=/device/memory/1/flash-driver=MCXN9xx_S.cfx")
12  board_runner_args(linkserver  "--override=/device/memory/1/location=0x10000000")
13  # Linkserver v1.4.85 and earlier do not include the secure regions in the
14  # MCXN947 memory map, so we add them here
15  board_runner_args(linkserver "--override=/device/memory/-=\{\"location\":\"0x30000000\",\
16                               \"size\":\"0x00060000\",\"type\":\"RAM\"\}")
17  board_runner_args(linkserver "--override=/device/memory/-=\{\"location\":\"0x30060000\",\
18                               \"size\":\"0x00008000\",\"type\":\"RAM\"\}")
19  # Define region for peripherals
20  board_runner_args(linkserver "--override=/device/memory/-=\{\"location\":\"0x50000000\",\
21                               \"size\":\"0x00140000\",\"type\":\"RAM\"\}")
22else()
23  message(FATAL_ERROR "Support for cpu1 not available yet")
24endif()
25
26# Pyocd support added with the NXP.MCXN947_DFP.17.0.0.pack CMSIS Pack
27board_runner_args(pyocd "--target=mcxn947")
28
29include(${ZEPHYR_BASE}/boards/common/linkserver.board.cmake)
30include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
31include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
32