Skip to main content
Romain Mahieu
Associate
February 2, 2020
Question

STM32CubeIDE and ubuntu 18.04 bash script

  • February 2, 2020
  • 2 replies
  • 860 views

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

This topic has been closed for replies.

2 replies

KnarfB
Super User
February 2, 2020

Usually, the first line is only

#!/bin/bash

hth

KnarfB

Romain Mahieu
Associate
February 2, 2020

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