aboutsummaryrefslogtreecommitdiff
path: root/lite-tf-m/tfm-build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lite-tf-m/tfm-build.sh')
-rwxr-xr-xlite-tf-m/tfm-build.sh30
1 files changed, 19 insertions, 11 deletions
diff --git a/lite-tf-m/tfm-build.sh b/lite-tf-m/tfm-build.sh
index f2c60e6de1..edb440f892 100755
--- a/lite-tf-m/tfm-build.sh
+++ b/lite-tf-m/tfm-build.sh
@@ -18,27 +18,35 @@ else
fi
# Set the config file to use
-configfile=ConfigRegression
+#configfile=ConfigRegression
-target=AN521
+#target=AN521
# Generate the S and NS makefiles
-cmake -G"Unix Makefiles" \
- -DPROJ_CONFIG=`$readlink -f ../configs/$configfile.cmake` \
- -DTARGET_PLATFORM=$target \
- -DCMAKE_BUILD_TYPE=Debug \
- -DBL2=False \
- -DCOMPILER=GNUARM \
- ../
+#cmake -G"Unix Makefiles" \
+# -DPROJ_CONFIG=`$readlink -f ../configs/$configfile.cmake` \
+# -DTARGET_PLATFORM=$target \
+# -DCMAKE_BUILD_TYPE=Debug \
+# -DBL2=False \
+# -DCOMPILER=GNUARM \
+# ../
+
+cmake -DTFM_PLATFORM=mps2/an521 \
+ -DTFM_TOOLCHAIN_FILE=../toolchain_GNUARM.cmake \
+ -DCMAKE_BUILD_TYPE=Debug \
+ -DBL2=False \
+ -DTEST_S=ON -DTEST_NS=ON \
+ -DTFM_TEST_REPO_PATH=../../tf-m-tests \
+ ../
# Build the binaries
make install
# Convert S and NS binaries to .hex file
arm-none-eabi-objcopy -S --gap-fill 0xff -O ihex \
- install/outputs/$target/tfm_s.axf tfm_s.hex
+ install/outputs/*/*/tfm_s.axf tfm_s.hex
arm-none-eabi-objcopy -S --gap-fill 0xff -O ihex \
- install/outputs/$target/tfm_ns.axf tfm_ns.hex
+ install/outputs/*/*/tfm_ns.axf tfm_ns.hex
# Generate a single hex file for convenience/QEMU sake
srec_cat tfm_s.hex -Intel tfm_ns.hex -Intel -o tfm_full.hex -Intel