WSChang0 | bbb7fdf | 2021-01-12 11:38:19 +0800 | [diff] [blame] | 1 | NuMaker-PFM-M2354 |
| 2 | ================== |
| 3 | |
| 4 | Building TF-M |
| 5 | ------------- |
| 6 | |
| 7 | Build TF-M with M2354 by following commands: |
| 8 | |
| 9 | .. code:: bash |
| 10 | |
| 11 | $ mkdir build |
| 12 | $ cd build |
| 13 | $ cmake ../ \ |
| 14 | -G"Unix Makefiles" \ |
| 15 | -DTFM_PLATFORM=nuvoton/m2354 \ |
| 16 | -DTFM_TOOLCHAIN_FILE=../toolchain_GNUARM.cmake \ |
WSChang0 | a3325dd | 2022-04-21 19:57:57 +0800 | [diff] [blame] | 17 | -DMCUBOOT_FIH_PROFILE=MEDIUM \ |
WSChang0 | bbb7fdf | 2021-01-12 11:38:19 +0800 | [diff] [blame] | 18 | -DTEST_S=ON \ |
| 19 | -DTEST_NS=ON \ |
WSChang0 | bbb7fdf | 2021-01-12 11:38:19 +0800 | [diff] [blame] | 20 | -DTFM_ISOLATION_LEVEL=2 \ |
| 21 | -DCMAKE_BUILD_TYPE=Release \ |
| 22 | $ make install |
| 23 | |
| 24 | Define TEST_NS=ON or TEST_S=ON for non-secure or secure regression test. |
| 25 | CMAKE_BUILD_TYPE could be "Release", "Debug", "RelWithDebInfo" or "Minsizerel" |
Kevin Peng | 23a583c | 2021-09-08 22:33:33 +0800 | [diff] [blame] | 26 | TFM_ISOLATION_LEVEL=2 can also be set. |
WSChang0 | bbb7fdf | 2021-01-12 11:38:19 +0800 | [diff] [blame] | 27 | Other cmake parameters should not be changed. |
| 28 | |
| 29 | Flashing Image with Nuvoton NuLink Tool |
| 30 | --------------------------------------- |
| 31 | |
| 32 | NuMaker-PFM-M2354 board supports on board ICE called NuLink. |
| 33 | Connect NuLink to PC with USB cable and using |
| 34 | `NuLink Command Tool <https://github.com/OpenNuvoton/Nuvoton_Tools>`__ |
| 35 | to flashing the image. |
| 36 | |
| 37 | The commands are as follows: |
| 38 | |
| 39 | .. code:: doscon |
| 40 | |
| 41 | > NuLink_M2354 -C |
| 42 | > NuLink_M2354 -E ALL |
| 43 | > NuLink_M2354 -W APROM ./build/bin/bl2.bin 0 |
| 44 | > NuLink_M2354 -W APROM ./build/bin/tfm_s_ns_signed.bin 0 0x20000 |
| 45 | > NuLink_M2354 -W NSCBA 0x70000 |
| 46 | |
| 47 | -------------- |
| 48 | |
WSChang0 | a3325dd | 2022-04-21 19:57:57 +0800 | [diff] [blame] | 49 | *Copyright (c) 2021-2022, Nuvoton Technology Corp. All rights reserved.* |