1# Copyright (c) 2021, NXP Semiconductors. All rights reserved. 2# Copyright (c) 2020, Linaro. All rights reserved. 3# Copyright (c) 2020, Arm Limited. All rights reserved. 4# SPDX-License-Identifier: BSD-3-Clause 5 6import os 7import platform 8 9# Move to the TF-M root directory 10os.chdir('../../../../../../') 11 12# Remove previous build folder 13if os.path.isdir("build"): 14 if platform.system() == 'Windows': 15 os.system('rd /s /q build') 16 else: 17 os.system('rm -rf build') 18 19# Generate the S and NS makefiles 20os.system('cmake -S . -B build -DTFM_PLATFORM=nxp/lpcxpresso55s69 -DTFM_TOOLCHAIN_FILE=toolchain_GNUARM.cmake -DTFM_PROFILE=profile_medium -DCMAKE_BUILD_TYPE=Relwithdebinfo -DBL2=OFF -DTEST_S=ON -DTEST_NS=ON -DTFM_ISOLATION_LEVEL=2 -G"Unix Makefiles"') 21 22# Build the binaries 23os.chdir('build') 24os.system('make install')