blob: 52424a74b191fb24eaf0fbaa54e00495328b6837 [file] [log] [blame]
wschang010481a92020-10-16 10:02:06 +08001NuMaker-PFM-M2351
2==================
3
4Building TF-M
5-------------
6
WSChang0f9ea65c2023-11-06 09:24:53 +08007Build TF-M regression test with M2351 by following commands:
wschang010481a92020-10-16 10:02:06 +08008
9.. code:: bash
10
WSChang0f9ea65c2023-11-06 09:24:53 +080011 $ cd tf-m-test/tests_reg
12 $ cmake -S spe -B build_spe \
wschang010481a92020-10-16 10:02:06 +080013 -G"Unix Makefiles" \
14 -DTFM_PLATFORM=nuvoton/m2351 \
WSChang0f9ea65c2023-11-06 09:24:53 +080015 -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
wschang010481a92020-10-16 10:02:06 +080025
26Define TEST_NS=ON or TEST_S=ON for non-secure or secure regression test.
27CMAKE_BUILD_TYPE could be "Release", "RelWithDebInfo" or "Minsizerel"
WSChang0f9ea65c2023-11-06 09:24:53 +080028Other cmake parameters should not be changed.
wschang010481a92020-10-16 10:02:06 +080029
30Flashing Image with Nuvoton NuLink Tool
31---------------------------------------
32
33NuMaker-PFM-M2351 board supports on board ICE called NuLink.
wschang02b2540f2020-11-03 11:52:21 +080034Connect NuLink to PC with USB cable and using
35`NuLink Command Tool <https://github.com/OpenNuvoton/Nuvoton_Tools>`__
wschang010481a92020-10-16 10:02:06 +080036to 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
WSChang0f9ea65c2023-11-06 09:24:53 +080044 > 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
wschang010481a92020-10-16 10:02:06 +080050
51--------------
52
WSChang0f9ea65c2023-11-06 09:24:53 +080053*Copyright (c) 2021-2023, Nuvoton Technology Corp. All rights reserved.*