cancel
Showing results for 
Search instead for 
Did you mean: 

Hello, I have a project that i have imported but when I try and build it i get this error. Any help would be appreciated as I am new to STM32CubeIDE.

MHarr.8
Associate II

16:11:04 **** Build of configuration Debug for project 16174prog07_2_Images_SECoreBin ****

make all 

"../../prebuild.sh" "../.."

../../prebuild.sh: cd: line 12: can't cd to C:/Users/michael/STM32CubeIDE/Integ/Docs: No such file or directory

prepareimage with windows executeable

C:/Users/michael/STM32CubeIDE/Integ/Docs & Source Code June 2021/16174prog07/source/externals/alc-iot/middlewares/third_party/STM32_Secure_Engine/Utilities/KeysAndImages/win/prepareimage/prepareimage.exe conf ../../../Inc/se_crypto_config.h

../../prebuild.sh: line 1: C:/Users/michael/STM32CubeIDE/Integ/Docs: not found

selected

bash: SECBOOT_AES128_GCM_AES128_GCM_AES128_GCM: unknown operand

bash: SECBOOT_ECCDSA_WITH_AES128_CBC_SHA256: unknown operand

bash: SECBOOT_ECCDSA_WITHOUT_ENCRYPT_SHA256: unknown operand

recopy postbuild.sh script with .sh script

cat: can't open '../../.sh': No such file or directory

cat ../../.sh : failed

make[1]: *** [makefile:93: pre-build] Error 1

make: *** [makefile:61: all] Error 2

"make all" terminated with exit code 2. Build might be incomplete.

16:11:05 Build Failed. 2 errors, 0 warnings. (took 836ms)

6 REPLIES 6
MM..1
Chief II

You dont write what you import , but from error log your import is total miss. Remove this project from workspace and delete folder.

Recomm is first create project with wizard and learn from it. Maybe later you import project properly.

Hello,
Thanks for your reply.
After downloading the STM32CubeIDE I then imported an existing project into my work space which was successful but when I tried to build this project I then get error during the build phase. I know this project is good because it was built by a colleague and can be built on his PC but not my PC.
From the error log that I have attached during my original message you can see that error 1 is due to the makefile. Does anyone know what this means?
Also it has been suggested that I need to have Linux gcc compilers and command tools on my windows PC for me to build projects. Does anyone have any comments on this?
Thanks,
Mike
Guillaume K
ST Employee

hello

it's always easier to help when providing details: what software are you using ? which version ? for what STM32 microcontroller ? on what platform ? (PC, Windows/Linux, Mac ?), etc.

from the log I presume you are trying to use SBSFU Cube expansion package on a Windows PC with STM32CubeIDE.

Which version of SBSFU are you using ? which STM32CubeIDE version ?

SBSFU uses pre-build and post-build shell scripts. They can be shell scripts or DOS batch. The scripts may have trouble depending on your config (which OS you are running your IDE, which IDE, ...)

it seems the SECoreBin pre-build script doesn't like the spaces in the name of the directory you are running the project.

try to move the project to a directory without spaces. Also, on Windows PC it's better to install the software close to root directory ( C:\ ). There's a limitation in number of characters for the project path (256).

Hi Mike , when on other PC project works, then zip folder move and unzip in your pc in folder same as PC1 or folder without spaces and characters as &

Best is for example c:\projects\nameyourproject

After unzip locate .project file and double click.

Hello,
Yes you are correct, details are as followed.
The software I am using is STM32CubeIDE, version 1.7.0. The microcontroller is the STM32L476RGT6 and the platform is Windows 10.
I removed the spaces in the directory path as you suggested and the initial error is no longer seen and I managed to build some of the nestled projects but not all of them.
I now get the following error:
make all
rm -rf 16174prog07.elf && make -C ../../../ -f make_pre.mke all
+-------------------------------+
| pre_build_user_options.mke does not exist! |
+-------------------------------+
Copying default file to pre_build_user_options.mke
You may need to edit the file to setup the program paths for your machine
cp ../../templates/pre_build_user_options.mke pre_build_user_options.mke
make (e=3): The system cannot find the path specified.
Starting Pre-Build
make[2]: *** No rule to make target 'pre_build_user_options.mke', needed by 'configure'. Stop.
make[1]: *** [makefile:133: pre-build] Error 2
make: *** [makefile:101: all] Error 2
"make all" terminated with exit code 2. Build might be incomplete.
I am not sure what is error is and what I need to do to fix it. Does anyone have any ideas why this latest error is happening?
Thanks,
Mike
Hello,
Thanks for your suggestion. This is a really good way to keep the integrity of the project.
Thanks,
Mike