Skip to content

Commit ff42698

Browse files
committed
trusted-firmware-m: pass compiler path to STM32L552 postbuild script
The STM32 post-build script is passed the compiler full name and path, so it can work with the Zephyr SDK as well. Signed-off-by: Ioannis Glaropoulos <[email protected]>
1 parent be36ece commit ff42698

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

trusted-firmware-m/platform/ext/target/stm/common/stm32l5xx/boards/scripts/gcc/preprocess.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
# arg1 is the build directory
1515
# arg2 is the file to preprocess
1616
# arg3 is output file beeing preprocessed
17+
# arg4 is the GCC compiler full path
18+
1719
function preprocess
1820
(
19-
arm-none-eabi-gcc -E -P -xc -I$1 -o$3 $2
21+
$4 -E -P -xc -I$1 -o$3 $2
2022
)

trusted-firmware-m/platform/ext/target/stm/common/stm32l5xx/boards/scripts/postbuild.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ SCRIPT=$(readlink -f $0)
1717
# Absolute path this script
1818
projectdir=`dirname $SCRIPT`
1919
source $projectdir/preprocess.sh
20+
# Compiler full name & path is passed as argument
21+
compiler_full_path=$1
2022
# the file to preprocess is generated and present outside of install dir
2123
bl2_file_to_preprocess=$projectdir/image_macros_to_preprocess_bl2.c
2224
preprocess_bl2_file=$projectdir/image_macros_preprocessed_bl2.c
@@ -25,7 +27,7 @@ updatesh=$projectdir/TFM_UPDATE.sh
2527

2628
basedir=$projectdir
2729
echo preprocess bl2 file
28-
preprocess $projectdir $bl2_file_to_preprocess $preprocess_bl2_file
30+
preprocess $projectdir $bl2_file_to_preprocess $preprocess_bl2_file $compiler_full_path
2931
stm_tool=$basedir"/scripts/stm_tool.py"
3032
#determine/check python version command
3133
cmd="python3"

0 commit comments

Comments
 (0)