2025-12-03 7:34 PM
When using Zephyr, commands like west debug require ST tools (e.g. ST-LINK_gdbserver) to be installed and available on the PATH. I believe this currently requires STM32CubeCLT to be installed. However, I'd like to avoid installing STM32CubeCLT since it's deprecated in favor of the new bundle manager that is installed with the VS Code extension.
I'd like to request the ability to install & use the bundle manager by itself (outside of the VS Code environment) to install packages like stlink-gdbserver into a custom location on my machine. The goal would be to add these tools to my path for development. I'd also like to be able to use the bundle manager to install tools into a CI environment (e.g. for use in GitHub actions).
Note: this question is similar to https://community.st.com/t5/stm32cubeide-for-visual-studio/cli-tools-of-new-stm32cube-for-visual-studio-code-extension/m-p/831932/highlight/true#M1028 however the accepted solution in that answer requires installing VS Code and installing the extension for the cube command to work. This request is to be able to:
Additional explanation for #3 above. Currently, the cube bundles are installed with the versions in their install paths (e.g. /Users/<username>/Library/Application Support/stm32cube/bundles/stlink-gdbserver/7.11.0+st.1/bin/). If I simply add this path to my .profile I have to change it whenever the installed version changes (or us a more complicated script to automatically add the latest version to my PATH).
Currently STM32CubeCLT adds a bunch of entries to my system /etc/paths, /etc/profile, etc. PLEASE PLEASE PLEASE I BEG YOU do not do this with the bundle manager moving forward!
It would be great if the bundle manager could provide something like a cube env --as-script command which could be evaluated by the shell to add all the required tools/environment variables to the PATH.
For example, Nordic provides a similar command in their nrftuil tool:
❯ nrfutil sdk-manager toolchain env --as-script --ncs-version v3.1.0
export PATH=/opt/nordic/ncs/toolchains/5c0d382932/bin:/opt/nordic/ncs/toolchains/5c0d382932/usr/bin:/opt/nordic/ncs/toolchains/5c0d382932/usr/local/bin:/opt/nordic/ncs/toolchains/5c0d382932/opt/bin:/opt/nordic/ncs/toolchains/5c0d382932/opt/nanopb/generator-bin:/opt/nordic/ncs/toolchains/5c0d382932/nrfutil/bin:/opt/nordic/ncs/toolchains/5c0d382932/opt/zephyr-sdk/arm-zephyr-eabi/bin:/opt/nordic/ncs/toolchains/5c0d382932/opt/zephyr-sdk/riscv64-zephyr-elf/bin:$PATH
export GIT_EXEC_PATH=/opt/nordic/ncs/toolchains/5c0d382932/Cellar/git/2.37.3/libexec/git-core
export GIT_TEMPLATE_DIR=/opt/nordic/ncs/toolchains/5c0d382932/Cellar/git/2.37.3/share/git-core/templates
export NRFUTIL_HOME=/opt/nordic/ncs/toolchains/5c0d382932/nrfutil/home
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
export ZEPHYR_SDK_INSTALL_DIR=/opt/nordic/ncs/toolchains/5c0d382932/opt/zephyr-sdk
This can be used to automatically add all required paths to the current shell, for example:
eval "$(nrfutil sdk-manager toolchain env --as-script --ncs-version $NCS_VERSION)"
Thanks for considering this feature request!