Skip to content

Commit 55ca99f

Browse files
waqar-tahirstgloorious
authored andcommitted
platform: Add support of frdmmcxn947
The commit adds support for the ARM Cortext-M33 based NXP frdmmcxn947 development board to Trusted Firmware-M (TF-M). This includes: - Native peripheral driver for Flash and LPUART - System, Flash and RAM configuration files for dual-core CM33 architecture - Platform Native drivers from MCUX SDK - TF-M target configuration for secure/non-secure domains - s/ns board configuration for FRDM-MCXN947 - Platform documentation added - updates in common hal files to be re-used by multiple NXP platforms. This imporoves code reusability and standardization across NXP MCU platforms Change-Id: I6ad23001d1e79dda786ff858c686465cd89f6b5b Signed-off-by: Waqar Tahir <waqar.tahir@nxp.com>
1 parent 6c6d839 commit 55ca99f

File tree

148 files changed

+149363
-50
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+149363
-50
lines changed
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
###############
2+
FRDM-MCXN947
3+
###############
4+
5+
The NXP FRDM-MCXN947 is a development board for the N94x 150 MHz Arm Cortex-M33 TrustZone microcontroller, which is for Industrial and Consumer IoT Applications.
6+
7+
MCU device and part on board is shown below:
8+
9+
* Device: MCXN947
10+
* Boardname: frdmmcxn947
11+
12+
You can find more information about the `FRDM-MCXN947 on the official NXP product page`_.
13+
14+
****************
15+
1. Building TF-M
16+
****************
17+
18+
Prepare the tf-m-tests repository inside the TF-M base folder.
19+
20+
.. code-block:: bash
21+
22+
cd <TF-M base folder>
23+
git clone https://git.trustedfirmware.org/TF-M/tf-m-tests.git
24+
25+
Currently FRDM-MCXN947 only supports builds without secondary bootloader (BL2).
26+
27+
1.1 Building TF-M demo without BL2
28+
==================================
29+
To build S and NS application image without a BL2, run the following commands:
30+
31+
.. code:: bash
32+
33+
cd <TF-M base folder>/tf-m-test/tests_reg
34+
cmake -S spe -B build_spe -DTFM_PLATFORM=nxp/frdmmcxn947 -DCONFIG_TFM_SOURCE_PATH=<TF-M base folder>/trusted-firmware-m -G"Unix Makefiles" -DBL2=OFF
35+
cmake --build build_spe -- install
36+
cmake -S . -B build_test -G"Unix Makefiles" -DCONFIG_SPE_PATH=<TF-M base folder>/tf-m-tests/tests_reg/build_spe/api_ns
37+
cmake --build build_test
38+
39+
40+
1.2 Building TF-M regression tests
41+
==================================
42+
43+
To build the S and NS regression tests without BL2, run the following commands:
44+
45+
* Profile Medium:
46+
47+
.. code:: bash
48+
49+
cd <TF-M base folder>/tf-m-test/tests_reg
50+
cmake -S spe -B build_spe -DTFM_PLATFORM=nxp/frdmmcxn947 -DCONFIG_TFM_SOURCE_PATH=<TF-M base folder>/trusted-firmware-m -G"Unix Makefiles" -DTFM_PROFILE=profile_medium -DTEST_S=ON -DTEST_NS=ON -DBL2=OFF
51+
cmake --build build_spe -- install
52+
cmake -S . -B build_test -G"Unix Makefiles" -DCONFIG_SPE_PATH=<TF-M base folder>/tf-m-tests/tests_reg/build_spe/api_ns
53+
cmake --build build_test
54+
55+
* Profile Small:
56+
57+
.. code:: bash
58+
59+
cd <TF-M base folder>/tf-m-test/tests_reg
60+
cmake -S spe -B build_spe_small -DTFM_PLATFORM=nxp/frdmmcxn947 -DCONFIG_TFM_SOURCE_PATH=C:/Code/tfm-upstream/trusted-firmware-m -G"Unix Makefiles" -DBL2=OFF -DTFM_PROFILE=profile_small -DTEST_S=ON -DTEST_NS=ON -DTEST_S_CRYPTO=ON -DTEST_NS_CRYPTO=ON -DTEST_S_ATTESTATION=OFF -DTEST_S_STORAGE=OFF -DTEST_S_PLATFORM=OFF -DTEST_NS_ATTESTATION=OFF -DTEST_NS_STORAGE=OFF -DTEST_NS_PLATFORM=OFF -DTEST_S_PLATFORM=OFF -DTEST_NS_SFN_BACKEND=OFF -DTEST_S_SFN_BACKEND=OFF
61+
cmake --build build_spe_small -- install
62+
cmake -S . -B build_test_small -G"Unix Makefiles" -DCONFIG_SPE_PATH=C:/Code/tfm-upstream/tf-m-tests/tests_reg/build_spe_small/api_ns
63+
cmake --build build_test_small
64+
65+
66+
***********************************
67+
2. Flashing TF-M with Segger J-Link
68+
***********************************
69+
70+
To install the J-Link Software and documentation pack, follow the steps below:
71+
72+
#. Download the appropriate package from the `J-Link Software and documentation pack`_ website
73+
#. Depending on platform, install the package or run the installer
74+
#. When connecting a J-Link-enabled board such as an frdmmcxn947 , a serial port should come up
75+
76+
Flash them with JLink as follows:
77+
78+
* Flash Erase:
79+
80+
.. code-block:: console
81+
82+
83+
JLinkExe -device MCXN947_M33_0 -if swd -speed 4000 -autoconnect 1
84+
J-Link>exec EnableEraseAllFlashBanks
85+
J-Link>erase 0x00 0x180000
86+
J-Link>r
87+
88+
* Flash Write:
89+
90+
.. code-block:: console
91+
92+
JLinkExe -device MCXN947_M33_0 -if swd -speed 4000 -autoconnect 1
93+
J-Link>r
94+
J-Link>h
95+
J-Link>loadfile build_spe/bin/tfm_s.bin 0x00
96+
J-Link>h
97+
J-Link>loadfile build_spe/bin/tfm_ns.bin 0x80000
98+
J-Link>r
99+
100+
.. _J-Link Software and documentation pack: https://www.segger.com/jlink-software.html
101+
.. _FRDM-MCXN947 on the official NXP product page : https://www.nxp.com/design/design-center/development-boards-and-designs/FRDM-MCXN947
102+
103+
--------------
104+
105+
*Copyright 2025 NXP*
106+
*SPDX-License-Identifier: BSD-3-Clause*

docs/platform/nxp/index.rst

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1-
############
2-
NXP platform
3-
############
1+
=============
2+
NXP platforms
3+
=============
4+
5+
This document contains SOC and boards supported by NXP.
46

57
.. toctree::
68
:maxdepth: 1
7-
:titlesonly:
9+
:caption: SOC and Boards
10+
:glob:
811

912
LPCXpresso55S69 <lpcxpresso55s69/README.rst>
13+
FRDM-MCXN947 <frdmmcxn947/README.rst>
14+
15+
--------------
16+
17+
*Copyright 2025 NXP*
18+
*SPDX-License-Identifier: BSD-3-Clause*

0 commit comments

Comments
 (0)