microsoft / vscode-embedded-tools

Official issue tracking repository for Microsoft's Embedded Tools VS Code extension.
MIT License
43 stars 3 forks source link

Add a setting to allow a custom path to STM32CubeIDE #43

Open OllyMcBrideOB opened 1 year ago

OllyMcBrideOB commented 1 year ago

Type: Feature Request

1. Custom STM32CubeIDE Path

It would be great if there was a setting for this extension to allow us to use a custom path to STM32CubeIDE install location.

I've had to go through and completely uninstall my existing STM32CubeIDE installation and re-install it in the 'default location' because this extension kept on throwing an error and preventing me from running the new (& excellent) STM32 VS Code Extension.

2. Clearer Error Message

It would also be useful if we could make it more obvious that this extension is responsible for the following VSCode error window popup:

Could not find path to "arm-none-eabi-gdb". Ensure STM32CubeIDE is installed.

As the error popup simply takes you to launch.json, but gives zero indication about which tool is unable to locate arm-none-eabi-gdb.

benmcmorran commented 1 year ago

Thanks for the feedback. For the custom STM32CubeIDE path, I'd like to design this in a way that ensures the generated CMake projects remain portable between developers. The main place where this becomes an issue is in the CMake toolchain file where CMake discovers the compilers provided by STM32CubeIDE or STM32CubeCLT. Would it work for you if the new custom path setting is written to a CMakeUserPresets.json file in the converted project and then consumed via inheritance in CMakePresets.json (and eventually via a CMake variable in the toolchain file)? That should allow the feature to use an absolute, user-specific path without harming portability.

For the error message, that should be an easy change to clarify the wording.