aboutsummaryrefslogtreecommitdiff
path: root/platform/ext/target/nxp/lpcxpresso55s69/scripts/build_tfm_demo.py
blob: 267a04cf56c785140dec3071d1781c3b536e7917 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Copyright (c) 2020, Linaro. All rights reserved.
# Copyright (c) 2020, Arm Limited. All rights reserved.
# Copyright (c) 2021, NXP Semiconductors. All rights reserved.
# SPDX-License-Identifier: BSD-3-Clause

import os
import platform

# Move to the TF-M root directory
os.chdir('../../../../../../')

# Remove previous build folder
if os.path.isdir("build"):
    if platform.system() == 'Windows':
        os.system('rd /s /q build')
    else:
        os.system('rm -rf build')

# Generate the S and NS makefiles
os.system('cmake -S . -B build -DTFM_PLATFORM=nxp/lpcxpresso55s69 -DTFM_TOOLCHAIN_FILE=toolchain_GNUARM.cmake -DCMAKE_BUILD_TYPE=Relwithdebinfo -DBL2=OFF -DTFM_PSA_API=ON -DTFM_ISOLATION_LEVEL=2 -G"Unix Makefiles"')

# Build the binaries
os.chdir('build')
os.system('make install')