2025-12-06 10:21 AM - edited 2025-12-06 10:22 AM
Hi all,
I've been in the process of switching from the GNU toolchain (which is working alright) to the ST-provided clang but I am having difficulties with the mentioned extension.
The following has two links to two different branches of the same repository. First one uses GNU toolchain, and the other uses starm-clang:
The project can be built in both branches, and works correctly with the first but the latter one has a rather interesting problem with clangd. After configuring and building if you open e.g. "Core/Src/i2s.c" you can see an error message at the very beginning:
"Unsupported option '-mcpu=' for target 'x86_64-pc-windows-msvc'".
It seems as-if the cross-compilation settings for the clangd program are not set at all. For some reason it belives we are building for the host architecture.
There is also a second problem with clangd, but it is related to the STM32CubeF0 repository and the CMSIS headers. Thus I do not believe it to be related to the extension, but for those interested, you can find the issue here https://github.com/STMicroelectronics/STM32CubeF0/issues/22