cancel
Showing results for 
Search instead for 
Did you mean: 

Setup as STM32Cube project fails

DamianoF
Associate III

I'm encountering a persistent issue when setting up an STM32Cube project in VS Code. Even when reverting to a previously working commit or starting a fresh setup from scratch (using the "Setup as an STM32Cube project" button), the process fails.

The following error message appears:

"Cube project discovery CMake configure step failed. Setup might be incomplete. Please check output logs"

I have tested this on two different machines running both Linux and Windows, but the result is the same. Here are the relevant logs:

 

2026-02-20 08:41:11.309 [Info] Adding cube-cmake path to environment: /home/user/.vscode/extensions/stmicroelectronics.stm32cube-ide-build-cmake-1.43.0/resources/cube-cmake/linux
2026-02-20 08:41:19.016 [Info] Running STM32Cube commands 'cube pack sync + cube pack install STMicroelectronics.stm32f4xx_dfp.1.1.0'
2026-02-20 08:41:19.665 [Error] /home/user/Downloads/project needs to be configured first
2026-02-20 08:41:22.979 [Info] Activating STM32Cube configurations for the code indexing feature...
2026-02-20 08:41:23.006 [Info] Configuring code indexing for '/home/user/Downloads/project'
2026-02-20 08:41:23.029 [Info] Cannot find project's build info yet
 
1 ACCEPTED SOLUTION

Accepted Solutions
DamianoF
Associate III

I did a mistake on my side and I forgot to add an import to my CMakelists.txt. I am sorry

View solution in original post

4 REPLIES 4
Nawres GHARBI
ST Employee

Hi @DamianoF 

If you are reverting to a previous working commit ensure you do a clean build before discovering the project

If the project clean is not sufficient you can remove the .setting and .vscode from your project then relaunch the discovery.

DamianoF
Associate III

Hello and thank you for the reply,

obviously I cleaned the build folder and removed the .settings and .vscode folders (which were not tracked with git)

Julien D
ST Employee

Hi @DamianoF,

Could you show us the errors from the CMake/Build output channel?

Also make sure that, once .vscode/settings.json is created during project setup, it well contains the configuration for cube-cmake tool.

And finally ninja, cmake and gnu-tools-for-stm32 should be part of .settings/bundles.store.json.

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.
DamianoF
Associate III

I did a mistake on my side and I forgot to add an import to my CMakelists.txt. I am sorry