Search code examples
microcontrollerstm32stm32cubemx

Trying to build my project in headless mode but getting WARNING: No Project matched


I have a project in STM32CubeIDE I run this project from the command line in headless mode with this command:

headless-bat -project "my-project-name/Debug" -build

and it builds successfully. But when I try to copy the same project to another directory and try to run it I am getting this error WARNING: No Project matched with my project name written with it. I copied the project to c:/myworkplace and then I run this command:

headless-bat -project "my-project-name/Debug" -workplace "c:\myworkplace" -build

But I got the error which I have mentioned above. Does anyone have any idea?


Solution

  • I have fixed this by modifying the arguments like this:

    stm32cubeidec.exe -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data "path to your workspace" -build your project-name
    

    The project builds successfully in headless mode. If you need detailed instruction it is available here:

    Building Projects with Eclipse from the Command Line