blob: 0901269c8a260a2b3f585aa3b71be38bd064e0e3 [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" \
Kevin Peng23a583c2021-09-08 22:33:33 +080015 -DTFM_LIB_MODEL=ON \
wschang010481a92020-10-16 10:02:06 +080016 -DTFM_PLATFORM=nuvoton/m2351 \
WSChang0bbb7fdf2021-01-12 11:38:19 +080017 -DTFM_TOOLCHAIN_FILE=../toolchain_GNUARM.cmake \
wschang010481a92020-10-16 10:02:06 +080018 -DTEST_NS=ON \
19 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
wschang010481a92020-10-16 10:02:06 +080020 $ make install
21
22Define TEST_NS=ON or TEST_S=ON for non-secure or secure regression test.
23CMAKE_BUILD_TYPE could be "Release", "RelWithDebInfo" or "Minsizerel"
Kevin Peng23a583c2021-09-08 22:33:33 +080024TFM_LIB_MODEL=OFF and TFM_ISOLATION_LEVEL=2 can also be set but them cannot be
wschang02b2540f2020-11-03 11:52:21 +080025defined with TEST_S=ON or TEST_NS=ON at the same time due to limited RAM size
26of M2351. Other cmake parameters should not be changed.
wschang010481a92020-10-16 10:02:06 +080027
28Flashing Image with Nuvoton NuLink Tool
29---------------------------------------
30
31NuMaker-PFM-M2351 board supports on board ICE called NuLink.
wschang02b2540f2020-11-03 11:52:21 +080032Connect NuLink to PC with USB cable and using
33`NuLink Command Tool <https://github.com/OpenNuvoton/Nuvoton_Tools>`__
wschang010481a92020-10-16 10:02:06 +080034to flashing the image.
35
36The commands are as follows:
37
38.. code:: doscon
39
40 > NuLink_M2351_M261 -C
41 > NuLink_M2351_M261 -E ALL
42 > NuLink_M2351_M261 -W APROM ./build/bin/bl2.bin 0
43 > NuLink_M2351_M261 -W APROM ./build/bin/tfm_s_ns_signed.bin 0 0x10000
wschang02b2540f2020-11-03 11:52:21 +080044 > NuLink_M2351_M261 -W NSCBA 0x50000
wschang010481a92020-10-16 10:02:06 +080045
46--------------
47
WSChang0bbb7fdf2021-01-12 11:38:19 +080048*Copyright (c) 2020-2021, Nuvoton Technology Corp. All rights reserved.*