Skip to main content
zqizh.1
Associate III
Nov 23, 2021 6:02 AM UTC
Solved

"regression.sh" in "STM32Cube_FW_L5_V1.4.0" can't execute successfully

Hi,

I don't do any change to the script file, please advise how to let the script work normally.

Rgds,

QiZhang

D:\>cd D:\WSL_DIR\STM32Cube_FW_L5_V1.4.0\Projects\STM32L562E-DK\Applications\TFM\TFM_SBSFU_Boot\STM32CubeIDE

D:\WSL_DIR\STM32Cube_FW_L5_V1.4.0\Projects\STM32L562E-DK\Applications\TFM\TFM_SBSFU_Boot\STM32CubeIDE>bash regression.sh

regression script started

Regression to RDP 0, enable tz

regression.sh: line 16: $'STM32_Programmer_CLI\r': command not found

regression.sh: line 59: syntax error: unexpected end of file

D:\WSL_DIR\STM32Cube_FW_L5_V1.4.0\Projects\STM32L562E-DK\Applications\TFM\TFM_SBSFU_Boot\STM32CubeIDE>

This topic has been closed for replies.
Pavel A.
Pavel A.Best answer
Nov 26, 2021 10:28 PM UTC

> my PC OS is win 10 , with WSL2 installed

So, when you type 'bash' it actually runs in the WSL. It does not run on the Windows side. Do you fully understand the consequences?

Maybe you would rather prefer a Windows-native bash such as one that comes with git or Cygwin?

4 replies

ST Technical Moderator
Nov 26, 2021 5:27 AM UTC

Hello @zqizh.1​ ,

I have checked from my side and I cannot reproduce this issue.

Were you able to resolve this ? If yes, it will be interesting to share with us your update.

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
zqizh.1
zqizh.1Author
Associate III
Nov 26, 2021 9:21 AM UTC

Hi,

I have solved it with below work around solution:

1) change "STM32_Programmer_CLI" to"STM32_Programmer_CLI.exe" in line 4

2) remove "\r"

sed 's/\r$//' regression.sh > tmp.sh

mv tmp.sh regression.sh

my PC OS is win 10 , with WSL2 installed.

Please give a formal way.

Rgds,

QiZhang

Pavel A.
Pavel A.Best answer
Nov 26, 2021 10:28 PM UTC

> my PC OS is win 10 , with WSL2 installed

So, when you type 'bash' it actually runs in the WSL. It does not run on the Windows side. Do you fully understand the consequences?

Maybe you would rather prefer a Windows-native bash such as one that comes with git or Cygwin?

zqizh.1
zqizh.1Author
Associate III
Nov 29, 2021 1:53 AM UTC

I've followed your instruction, uninstall the WSL2, and install the Cygwin.

$ cd /cygdrive/d/WSL_DIR/STM32Cube_FW_L5_V1.4.0/Projects/STM32L562E-DK/Applications/TFM/TFM_SBSFU_Boot/STM32CubeIDE/

1) run "./regression.sh" no problem.

2) run "./TFM_UPDATE.sh" fail.

Please advise.

Thanks.