Skip to main content
zqizh.1
Associate III
November 23, 2021
Solved

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

  • November 23, 2021
  • 2 replies
  • 1404 views

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.
Best answer by Pavel A.

> 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?

2 replies

Technical Moderator
November 26, 2021

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

"When your question is answered, please close this topic by clicking ""Accept as Solution"".ThanksImen"
zqizh.1
zqizh.1Author
Associate III
November 26, 2021

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
Super User
November 26, 2021

> 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
November 29, 2021

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.