Skip to main content
fronders
Associate III
December 24, 2022
Question

SECoreBin postbuild script incorrectly updates PATH

  • December 24, 2022
  • 1 reply
  • 859 views

I'm using SBSFU v2.6.2 on a Windows 10 x64 machine with CubeIDE v1.11.0

I was recently modifying the postbuild script in an SBSFU-based project and noticed it has a bug setting the PATH variable when looking for prepareimage executable:

export PATH=$basedir"\win\prepareimage";$PATH > /dev/null 2>&1

The semicolon makes PATH to be equal only to path to prepareimage, and for example toolchain's objcopy cannot be used later in the script.

Also you don't need to export the PATH as the variable is already in the environment and any change of the value of the variable is reflected in the environment anyway.

My suggestion is to change the above line to:

PATH=$basedir"\\win\\prepareimage":$PATH > /dev/null 2>&1

This is present in all 3 variations of postbuild script for different crypto schemes

This topic has been closed for replies.

1 reply

Jocelyn RICARD
ST Employee
January 2, 2023

Hello @fronders​ ,

thank you for raising the issue. I will raise a ticket to development team for this.

Best regards

Jocelyn