cancel
Showing results for 
Search instead for 
Did you mean: 

Implementation of TFM_SBSFU on STM32U585

PJose.4
Senior

Hi All,

i have downloaded the STM32U585 firmware package from the official sources and want to implement the TFM SBSFU program code into my development board(U585-IOT2A) using STM32 Cube IDE. The user manual mentions installation not possible using Cube IDE and works with EWarm IAR Workbench version 8.50.9. But i am not able to download the mentioned version of EWarm IAR Workbench. Please suggest the following:

  1. Implementation support using STM Cube IDE
  2. Working IDE version of EWarm IDE.

Kindly provide assistance regarding the same.

References Used : UM2851 and STM32U585 Firmware Package

Thanks and Regards

18 REPLIES 18

Hi @Guillaume K​ 

I tried building the program by copying in my c drive and a path with small text and no spaces. I copied the entire firmware folder into this path and tried building the same.

Hope this method is correct. please correct me if i am wrong.

Thanks

did the compilation succeed ?

Hi

The compilation is not succeeding. this same error message is coming as shown in the above screenshot.

Thanks

the error message in the screenshot is truncated on the right so it is not possible to understand the problem.

PJose.4
Senior

Hi @Guillaume K​ 

Following is the error message occuring pasted as plain text(in image full message wont be getting properly)

TFM_SBSFU_Build message

[arm-none-eabi-objdump -DS "TFM_SBSFU_Boot.elf" > "TFM_SBSFU_Boot.elf_asm.txt"

"../postbuild.sh"

C:/Intel/en.stm32cubeu5-v1-2-0/STM32Cube_FW_U5_V1.2.0/Projects/B-U585I-IOT02A/Applications/TFM/TFM_SBSFU_Boot/STM32CubeIDE/Release

../postbuild.sh: cd: line 17: can't cd to C:/Intel/en.stm32cubeu5-v1-2-0/STM32Cube_FW_U5_V1.2.0/Projects/B-U585I-IOT02A/Applications/TFM/TFM_SBSFU_Boot/STM32CubeIDE\..\..\..\..\..\..\..\Middlewares\Third_Party\mcuboot: No such file or directory

Windows_NT

Postbuild with python

python: can't open file 'C:\\Intel\\en.stm32cubeu5-v1-2-0\\STM32Cube_FW_U5_V1.2.0\\Projects\\B-U585I-IOT02A\\Applications\\TFM\\TFM_SBSFU_Boot\\STM32CubeIDE\\Release\\scripts\\imgtool\\main.py': [Errno 2] No such file or directory

postbuild.sh failed

make[1]: *** [makefile:96: post-build] Error 1

make: *** [makefile:62: all] Error 2

"make -j8 all" terminated with exit code 2. Build might be incomplete.]

The line 16 of postbuild.sh is throwing error.

cd $projectdir"\..\..\..\..\..\..\..\Middlewares\Third_Party\mcuboot"

the STM Cube IDE build when running cannot cd to the path in above. but the path is correct and i just verified the same with files inside the respective folder.

Is there any other thing that i have missed.

thanks for support

This line is strange:

../postbuild.sh: cd: line 17: can't cd to C:/Intel/en.stm32cubeu5-v1-2-0/STM32Cube_FW_U5_V1.2.0/Projects/B-U585I-IOT02A/Applications/TFM/TFM_SBSFU_Boot/STM32CubeIDE\..\..\..\..\..\..\..\Middlewares\Third_Party\mcuboot: No such file or directory

in TFM_SBSFU_Boot project, postbuild.sh line 17 is :

cd $projectdir"/../../../../../../Middlewares/Third_Party/mcuboot"

So why are there backslash characters at the end of the line in your log file ? did you change line 17 in postbuild.sh ?

what version of STM32CubeIDE are you using ?

PJose.4
Senior

Hi @Guillaume K​ 

That was done for a testing purpose because windows systems uses backslash for that purpose i just changed the command in postbuild.sh script.

After changing the line 16 to

cd $projectdir"/../../../../../../../Middlewares/Third_Party/mcuboot"

the build output becomes

"../postbuild.sh"
C:/Intel/en.stm32cubeu5-v1-2-0/STM32Cube_FW_U5_V1.2.0/Projects/B-U585I-IOT02A/Applications/TFM/TFM_SBSFU_Boot/STM32CubeIDE/Release
../postbuild.sh: cd: line 16: can't cd to C:/Intel/en.stm32cubeu5-v1-2-0/STM32Cube_FW_U5_V1.2.0/Projects/B-U585I-IOT02A/Applications/TFM/TFM_SBSFU_Boot/STM32CubeIDE/../../../../../../../Middlewares/Third_Party/mcuboot: No such file or directory
Windows_NT
Postbuild with python
python: can't open file 'C:\\Intel\\en.stm32cubeu5-v1-2-0\\STM32Cube_FW_U5_V1.2.0\\Projects\\B-U585I-IOT02A\\Applications\\TFM\\TFM_SBSFU_Boot\\STM32CubeIDE\\Release\\scripts\\imgtool\\main.py': [Errno 2] No such file or directory
postbuild.sh failed
make[1]: *** [makefile:96: post-build] Error 1
make: *** [makefile:62: all] Error 2
"make -j8 all" terminated with exit code 2. Build might be incomplete.

The version of STM Cube IDE is 1.11.0

Thanks

Guillaume K
ST Employee

I've tried to reproduce with the same installation path as you and with STM32CubeIDE 1.11.0 and there is no problem. The postbuild.sh succeeds.

There must be something in your environment on your PC that makes it fail.

Normally when the postbuild.sh is run from CubeIDE TFM_SBSFU_Boot project, it uses a shell provided in CubeIDE installation directory under C:\ST\STM32CubeIDE_1.11.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.make.win32_2.0.100.202202231230\tools\bin\bash.exe.

The postbuild.sh script works when using this shell.

It could be a problem in your PATH environment, another shell installed on your PC, ...

PJose.4
Senior

Hi

I will cross check the shell that is installed in my system and will get back to you.

Thanks for your support