Skip to main content
Associate II
May 10, 2025 7:52 PM UTC
Solved

Why this extension do not USE environment variables?

STM32CLT has written an environment variable %STM32CLT_PATH% when it was installed, and the "armToolchainPath" is specified also in launch.json. Why not use it when creating a project, and try to search for the tool chain in PATH? Instead, you people write the entire toolchain into system-wide PATH, that will stop other MCU's toolchain from working!  

To Fix:

 
change cmake/gcc-arm-none-eabi.cmake:11 and following to:

cmake_path(SET TOOCHAIN_PATH $ENV{STM32CLT_PATH} )
set(TOOLCHAIN_PREFIX ${TOOCHAIN_PATH}/GNU-tools-for-STM32/bin/arm-none-eabi-)

set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc${CMAKE_HOST_EXECUTABLE_SUFFIX})
set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER})
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++${CMAKE_HOST_EXECUTABLE_SUFFIX})
set(CMAKE_LINKER ${TOOLCHAIN_PREFIX}g++${CMAKE_HOST_EXECUTABLE_SUFFIX})
set(CMAKE_OBJCOPY ${TOOLCHAIN_PREFIX}objcopy${CMAKE_HOST_EXECUTABLE_SUFFIX})
set(CMAKE_SIZE ${TOOLCHAIN_PREFIX}size${CMAKE_HOST_EXECUTABLE_SUFFIX})

that's quite bit easy

This topic has been closed for replies.
AlanCui4080Best answer
Associate II
May 11, 2025 1:29 AM UTC

AlanCui4080_0-1746926652673.png

Thank you! i switched it to latest STM32Cube Extension, and now it finally can manage toolchain by itself.

It provided much better experience than old one, and i will advise it to all my mates.

if i can know when it can be a stable release?

5 replies

Cartu38 OpenDev
Graduate II
May 10, 2025 8:13 PM UTC

Have you got a chance to try brand new released solution ? STM32CubeCLT is not required anymore ! Some brand new integrated solution is promoted instead so called STM32Cube bundles serving the same but revisited experience. May help possibly.

Associate II
May 10, 2025 8:17 PM UTC

STM32CubeCLT is necessary for this extension as far as i know. The STM32CubeIDE as eclipse is much worse than VS Code.

Cartu38 OpenDev
Graduate II
May 10, 2025 8:38 PM UTC

Not for the brand new VSCode solution. Released 3 dans agora as pre-release. See pinned post.