cancel
Showing results for 
Search instead for 
Did you mean: 

"STM32Cube Clangd" extension does not work correctly with "starm-clang" toolchain

ankes
Associate III

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'".

ankes_0-1765044084159.png

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

0 REPLIES 0