Skip to main content
Associate
January 30, 2025
Solved

Postcompilescript: Emty command

  • January 30, 2025
  • 2 replies
  • 732 views

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.

Best answer by hja

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

2 replies

ST Employee
January 31, 2025

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 

 

Pavel A.
Super User
January 31, 2025

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_it try to change the post-build command - for example move the commands to a script file and execute this script.

 

 

hjaAuthorBest answer
Associate
February 3, 2025

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.
Super User
February 3, 2025

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