blob: b0776c338a11e6dfd1c0df856b9ae14b12fa06a1 [file] [log] [blame]
wschang010481a92020-10-16 10:02:06 +08001NuMaker-PFM-M2351
2==================
3
4Building TF-M
5-------------
6
7Build TF-M with M2351 by following commands:
8
9.. code:: bash
10
11 $ mkdir build
12 $ cd build
13 $ cmake ../ \
14 -G"Unix Makefiles" \
15 -DTFM_PLATFORM=nuvoton/m2351 \
WSChang0bbb7fdf2021-01-12 11:38:19 +080016 -DTFM_TOOLCHAIN_FILE=../toolchain_GNUARM.cmake \
wschang010481a92020-10-16 10:02:06 +080017 -DTEST_NS=ON \
18 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
wschang010481a92020-10-16 10:02:06 +080019 $ make install
20
21Define TEST_NS=ON or TEST_S=ON for non-secure or secure regression test.
22CMAKE_BUILD_TYPE could be "Release", "RelWithDebInfo" or "Minsizerel"
Summer Qin2db78c82022-10-10 17:17:44 +080023TFM_ISOLATION_LEVEL=2 can also be set but it cannot be
wschang02b2540f2020-11-03 11:52:21 +080024defined with TEST_S=ON or TEST_NS=ON at the same time due to limited RAM size
25of M2351. Other cmake parameters should not be changed.
wschang010481a92020-10-16 10:02:06 +080026
27Flashing Image with Nuvoton NuLink Tool
28---------------------------------------
29
30NuMaker-PFM-M2351 board supports on board ICE called NuLink.
wschang02b2540f2020-11-03 11:52:21 +080031Connect NuLink to PC with USB cable and using
32`NuLink Command Tool <https://github.com/OpenNuvoton/Nuvoton_Tools>`__
wschang010481a92020-10-16 10:02:06 +080033to flashing the image.
34
35The commands are as follows:
36
37.. code:: doscon
38
39 > NuLink_M2351_M261 -C
40 > NuLink_M2351_M261 -E ALL
41 > NuLink_M2351_M261 -W APROM ./build/bin/bl2.bin 0
42 > NuLink_M2351_M261 -W APROM ./build/bin/tfm_s_ns_signed.bin 0 0x10000
wschang02b2540f2020-11-03 11:52:21 +080043 > NuLink_M2351_M261 -W NSCBA 0x50000
wschang010481a92020-10-16 10:02:06 +080044
45--------------
46
WSChang0bbb7fdf2021-01-12 11:38:19 +080047*Copyright (c) 2020-2021, Nuvoton Technology Corp. All rights reserved.*