wschang0 | 10481a9 | 2020-10-16 10:02:06 +0800 | [diff] [blame] | 1 | NuMaker-PFM-M2351 |
| 2 | ================== |
| 3 | |
| 4 | Building TF-M |
| 5 | ------------- |
| 6 | |
| 7 | Build 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 \ |
WSChang0 | bbb7fdf | 2021-01-12 11:38:19 +0800 | [diff] [blame] | 16 | -DTFM_TOOLCHAIN_FILE=../toolchain_GNUARM.cmake \ |
wschang0 | 10481a9 | 2020-10-16 10:02:06 +0800 | [diff] [blame] | 17 | -DTEST_NS=ON \ |
| 18 | -DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
wschang0 | 10481a9 | 2020-10-16 10:02:06 +0800 | [diff] [blame] | 19 | $ make install |
| 20 | |
| 21 | Define TEST_NS=ON or TEST_S=ON for non-secure or secure regression test. |
| 22 | CMAKE_BUILD_TYPE could be "Release", "RelWithDebInfo" or "Minsizerel" |
Summer Qin | 2db78c8 | 2022-10-10 17:17:44 +0800 | [diff] [blame] | 23 | TFM_ISOLATION_LEVEL=2 can also be set but it cannot be |
wschang0 | 2b2540f | 2020-11-03 11:52:21 +0800 | [diff] [blame] | 24 | defined with TEST_S=ON or TEST_NS=ON at the same time due to limited RAM size |
| 25 | of M2351. Other cmake parameters should not be changed. |
wschang0 | 10481a9 | 2020-10-16 10:02:06 +0800 | [diff] [blame] | 26 | |
| 27 | Flashing Image with Nuvoton NuLink Tool |
| 28 | --------------------------------------- |
| 29 | |
| 30 | NuMaker-PFM-M2351 board supports on board ICE called NuLink. |
wschang0 | 2b2540f | 2020-11-03 11:52:21 +0800 | [diff] [blame] | 31 | Connect NuLink to PC with USB cable and using |
| 32 | `NuLink Command Tool <https://github.com/OpenNuvoton/Nuvoton_Tools>`__ |
wschang0 | 10481a9 | 2020-10-16 10:02:06 +0800 | [diff] [blame] | 33 | to flashing the image. |
| 34 | |
| 35 | The 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 |
wschang0 | 2b2540f | 2020-11-03 11:52:21 +0800 | [diff] [blame] | 43 | > NuLink_M2351_M261 -W NSCBA 0x50000 |
wschang0 | 10481a9 | 2020-10-16 10:02:06 +0800 | [diff] [blame] | 44 | |
| 45 | -------------- |
| 46 | |
WSChang0 | bbb7fdf | 2021-01-12 11:38:19 +0800 | [diff] [blame] | 47 | *Copyright (c) 2020-2021, Nuvoton Technology Corp. All rights reserved.* |