ObKo / stm32-cmake

CMake for stm32 developing.
MIT License
1.2k stars 339 forks source link

Incorrect TARGET_TRIPLET variable handling #328

Closed r2axz closed 1 year ago

r2axz commented 1 year ago

Describe the bug

The TARGET_TRIPLET environment variable mentioned in README.md is not used anywhere in stm32-cmake sources. There is STM32_TARGET_TRIPLET, but common.cmake does not pull it from the environment. As a result, the build system always generates No STM32_TARGET_TRIPLET specified, using default: arm-none-eabi and uses the default value.

Sources to reproduce

Reproducible in any project that uses stm32-cmake.

Steps to reproduce

Run STM32_TOOLCHAIN_PATH=... TARGET_TRIPLET=arm-none-eabi STM32_CUBE_F1_PATH=.. cmake ..:

Search for No STM32_TARGET_TRIPLET specified, using default: arm-none-eabi in the command output.

Expected behavior

stm32-cmake should pick up STM32_TARGET_TRIPLET from the environment the same way it picks up STM32_TOOLCHAIN_PATH, README.md should contain the correct variable name (STM32_TARGET_TRIPLET, not just TARGET_TRIPLET).