Skip to main content
Visitor II
October 1, 2025
Solved

Bundles and compiler not found if relocating CMAKE_BINARY_DIR

  • October 1, 2025
  • 2 replies
  • 269 views

I'm using CMake presets to setup a bunch of variables (ccache launcher, build type, toolchainfile, binaryDir).

 

My binaryDir is outside of source tree:

"${sourceParentDir}/build/${sourceDirName}/${presetName}"

And vscode configure fails to find arm-none-eabi-gcc, it seems that the process seeks the .settings/bundles.store.json to find the correct gnu-tools-for-stm32 but it fails since it look up cmake binary dir instead of cmake source dir.

 

Copying my .settings directory does fix it, but I have multiple projects lying on the same place and I don't want to mix their settings.

 

Is this an intended behavior or should the .settings files be searched in source dir instead ?

 

Thanks

    This topic has been closed for replies.
    Best answer by Julien D

    @stephane0 Thank for this valuable feedback.

    Yes having the CMake binaryDir inside the project tree is a constraint we have.

    Similarly you must open a folder which contains the top CMakeLists.txt file of your project as another hard constraint.

    Such may evolve in the future however as per of today we don't have other option.

    2 replies

    Julien DAnswer
    ST Employee
    October 1, 2025

    @stephane0 Thank for this valuable feedback.

    Yes having the CMake binaryDir inside the project tree is a constraint we have.

    Similarly you must open a folder which contains the top CMakeLists.txt file of your project as another hard constraint.

    Such may evolve in the future however as per of today we don't have other option.

    stephane0Author
    Visitor II
    October 1, 2025

    Ok @Julien D , thanks for the clarification.