cancel
Showing results for 
Search instead for 
Did you mean: 

Postcompilescript: Emty command

hja
Associate

Hello,

 

I'm using STM32CubeIDE Version 1.17.0. A project import from an older Verionen causes an Error message while compiling:

 

Errors occurred during the build.

Errors running builder 'CDT Builder' on project '<Projectname>'.

Internal error building project <Projectname> configuration Debug

Empty command

 

It seems to be caused by the postcompile scripts:

arm-none-eabi-objcopy -O binary ${BuildArtifactFileBaseName}.elf ${BuildArtifactFileBaseName}.bin;

arm-none-eabi-size ${BuildArtifactFileBaseName}.elf;

 

The error disappears, if I remove the scripts. Other imported projects are compiled without any errors.

 

Does somebody have a hint for me?

 

Greetings H.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi Pavel,

 

the problem is solved.

There was a <SPACE> inside the postscript commandline:

arm-none-eabi-objcopy -O binary ${BuildArtifactFileBaseName}.elf ${BuildArtifactFileBaseName}.bin;<SPACE>arm-none-eabi-objcopy -O binary ${BuildArtifactFileBaseName}.elf ${BuildArtifactFileBaseName}.bin;arm-none-eabi-size ${BuildArtifactFileBaseName}.elf;<SPACE>myOwn.bat [param]

 

I needed to remove <SPACE>. That's all.

STM32CubeIDE 1.9.0 works with <SPACE>, but not STM32CubeIDE 1.17.0.

 

Part of this story is that 1.9.0 and 1.17.0 are running on different computers. I didn't spend time to investigate possible charset issues.

 

Regards

View solution in original post

4 REPLIES 4
STea
ST Employee

Hello @hja,

 In the project that you are importing to a newer version could you try to make a new debug/build configuration setup delete old imported build and debug configuration and clean and rebuild the project this will trigger the generation of new build configuration.

If this didn't solve your issue maybe ty to send the old project that you are trying to import to try and reproduce this issue.
Regards 

 

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Pavel A.
Evangelist III

Hmm there was a weird bug in older CubeIDE versions where the objcopy and size commands silently failed to execute when internal builder is selected. Looks like this bug pops out in the new version. Worth to investigate.

@op try to change the post-build command - for example move the commands to a script file and execute this script.

 

 

Hi Pavel,

 

the problem is solved.

There was a <SPACE> inside the postscript commandline:

arm-none-eabi-objcopy -O binary ${BuildArtifactFileBaseName}.elf ${BuildArtifactFileBaseName}.bin;<SPACE>arm-none-eabi-objcopy -O binary ${BuildArtifactFileBaseName}.elf ${BuildArtifactFileBaseName}.bin;arm-none-eabi-size ${BuildArtifactFileBaseName}.elf;<SPACE>myOwn.bat [param]

 

I needed to remove <SPACE>. That's all.

STM32CubeIDE 1.9.0 works with <SPACE>, but not STM32CubeIDE 1.17.0.

 

Part of this story is that 1.9.0 and 1.17.0 are running on different computers. I didn't spend time to investigate possible charset issues.

 

Regards

Pavel A.
Evangelist III

#bugreport

So there's regression in the new version in parsing post-build commands.

The ; char is command separator for the "shell". Spaces before and after the ; in this context are legal and should be stripped. A wild guess: internal builder takes an extra parsing step on the command line to substitute the Eclipse ${variables} ?