Skip to main content
KR51K
Associate III
February 26, 2021
Solved

Headless build: always building after clean

  • February 26, 2021
  • 2 replies
  • 1423 views

Hello, for static code analysis I need the output from the clean/build process. So I searched how to build my project via command line and found the headless-build.bat (I use windows 10). After some problems with the syntax I finally got it running. The only problem is, that when I want to clean the project (-clean), it automatically builds the project afterwards. I didn’t find anything how to stop this process after cleaning - do you have any idea?

Thanks and best regards

This topic has been closed for replies.
Best answer by KR51K

Hello, thanks for your answer. I found a solution to omiut the first step of cleaning in my tool, so I'm fine with using the clean build as the second build step. But it's good to know the reason!

Thanks and best regards!

2 replies

Markus GIRDLAND
ST Employee
March 1, 2021

Hello COste!

This use case is not supported as of today and the issue is upstream in Eclipse. "Clean" does two different things depending on if it's used "inside" CubeIDE or if you run the command through headless build.

  • Inside CubeIDE: clean runs "rm -rf"
    • CubeIDE removes everything in the "Debug" or "Release" folder depending on which one is active
  • Headless: CubeIDE runs both clean and build
    • CubeIDE removes everything and then rebuilds

What's the specific use case for your static code analysis? Does this block you?

KR51K
KR51KAuthorBest answer
Associate III
March 1, 2021

Hello, thanks for your answer. I found a solution to omiut the first step of cleaning in my tool, so I'm fine with using the clean build as the second build step. But it's good to know the reason!

Thanks and best regards!