cancel
Showing results for 
Search instead for 
Did you mean: 

Why this extension do not USE environment variables?

AlanCui4080
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions

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?

View solution in original post

5 REPLIES 5
Cartu38 OpenDev
Lead II

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.

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

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

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?

Cannot answer for ST about move from pre to release. Per their communication sounds may happen mainly based on this community GO kind of. Communication is such they seem to want to listen about end users feedbacks: Great!