cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE and ubuntu 18.04 bash script

Romain Mahieu
Associate II

Hello, I use STM32CubeIDE on ubuntu 18.04.1 with the X-CUBE-AWS package and B-L475E-IOT01A board, during building process, postscript.sh script is invoqued to create bin file, but an error throw :

"../../../../../BootLoader_OSC/2_Images_SECoreBin/SW4STM32/postbuild.sh" "../.." "./B-L475E-IOT01_AWS.elf" "./B-L475E-IOT01_AWS.bin" "1" "bigelf"
/bin/bash: -  : option non valable

header of postbuild.sh is:

#!/bin/bash - 
#Post build for SECBOOT_ECCDSA_WITH_AES128_CBC_SHA256
# arg1 is the build directory
# arg2 is the elf file path+name
# arg3 is the bin file path+name
# arg4 is the version
# arg5 when present forces "bigelf" generation
projectdir=$1
FileName=${3##*/}
execname=${FileName%.*}
elf=$2
bin=$3
version=$4

2 REPLIES 2
KnarfB
Principal III

Usually, the first line is only

#!/bin/bash

hth

KnarfB

Romain Mahieu
Associate II

Hello, thk for interest but syntax is OK, I have resolved the problem, ST 'engineer' (maybee trainee) use CRLF in a bash file... probably an WSL evangelist..