cancel
Showing results for 
Search instead for 
Did you mean: 

STM32Cube CMake Support incorrectly configures several CMake Tools settings

ankes
Associate III

Hi all,

Dwelving deeper into the life and soul of the STM32Cube extensions I have come across a rather evil little bug. Luckily it is quite easy to reproduce.

  1. Use CubeMX to generate a boilerplate CMake project for any STM32 chip
  2. Open VS Code, and open the folder
  3. In VS Code, disable STM32Cube CMake Support extension
  4. In VS Code, hit "F1" and type "edit user". Select "Preferences: Open User Settings (JSON)"
  5. In the JSON editor, remove the "cmake.environment" key
  6. In VS Code, re-enable the STM32Cube CMake Support

Expected outcome:

The "cmake.environment" setting should be put into the ".vscode\settings.json" file, similar to how "cmake.cmakePath" is placed there by the extension.

Observed outcome:

The "cmake.environment" setting stays in the user's local settings file and affects all projects, ST and non-ST alike. The "${env:PATH}" evaluation is at the end of the line but nevertheless the setting gives preference to ST-sourced tools and executables if they happen to be found from from the folders that get added to the list.

0 REPLIES 0