README.rst
1NuMaker-PFM-M2351
2==================
3
4Building TF-M
5-------------
6
7Build TF-M regression test with M2351 by following commands:
8
9.. code:: bash
10
11 $ cd tf-m-test/tests_reg
12 $ cmake -S spe -B build_spe \
13 -G"Unix Makefiles" \
14 -DTFM_PLATFORM=nuvoton/m2351 \
15 -DTFM_TOOLCHAIN_FILE=[tf-m path]/toolchain_GNUARM.cmake \
16 -DCMAKE_BUILD_TYPE=Release \
17 -DTEST_S=ON -DTEST_NS=ON
18 $ cmake --build build --parallel -- install
19 $ cmake -S . -B build_test \
20 -G"Unix Makefiles" \
21 -DCONFIG_SPE_PATH=[tf-m-tests path]/tests_reg/build_spe/api_ns \
22 -DTFM_TOOLCHAIN_FILE=cmake/toolchain_ns_GNUARM.cmake \
23 -DCMAKE_BUILD_TYPE=Release \
24 $ cmake --build build_test --parallel -- install
25
26Define TEST_NS=ON or TEST_S=ON for non-secure or secure regression test.
27CMAKE_BUILD_TYPE could be "Release", "RelWithDebInfo" or "Minsizerel"
28Other cmake parameters should not be changed.
29
30Flashing Image with Nuvoton NuLink Tool
31---------------------------------------
32
33NuMaker-PFM-M2351 board supports on board ICE called NuLink.
34Connect NuLink to PC with USB cable and using
35`NuLink Command Tool <https://github.com/OpenNuvoton/Nuvoton_Tools>`__
36to flashing the image.
37
38The commands are as follows:
39
40.. code:: doscon
41
42 > NuLink_M2351_M261 -C
43 > NuLink_M2351_M261 -E ALL
44 > NuLink_M2351_M261 -W NSCBA 0x80000 0
45 > NuLink_M2351_M261 -S
46 > NuLink_M2351_M261 -C
47 > NuLink_M2351_M261 -W APROM .\build_spe\bin\bl2.bin 0
48 > NuLink_M2351_M261 -W APROM .\build_spe\bin\tfm_s_signed.bin 0 0x20000 0
49 > NuLink_M2351_M261 -W APROMNS .\build_test\bin\tfm_ns_signed.bin 0
50
51--------------
52
53*Copyright (c) 2021-2023, Nuvoton Technology Corp. All rights reserved.*
54