Skip to main content
Visitor II
September 18, 2025
Question

Header files not found by VSC

  • September 18, 2025
  • 3 replies
  • 451 views

I have problem that most headers are not visible so a lot of dependent problems occured.

All files are present - the same project compoiled in STM32CubeIDE works.

There is note that "clang(pp_file_not_found)"

Tried to add paths in CMakeLists.txt but no luck.

    This topic has been closed for replies.

    3 replies

    Graduate II
    September 18, 2025

    @Jacek3 have you a .clangd file added by STM32Cube to your project root ?

    If not maybe look at https://community.st.com/t5/stm32cube-for-visual-studio-code/after-installing-stm32cube-for-visual-studio-code-why-do-two/td-p/839930 ... not code indexing related by explain a bit proper process to end up good setup.

    Jacek3Author
    Visitor II
    September 19, 2025

    @Cartu38 OpenDev Thank You for response.

    Yes, I have .clangd file, but it was created rather by VSC, not STM32Cube.

    My .clangd file:

    CompileFlags:
     Add:
     - '-ferror-limit=0'
     - '-Wno-implicit-int'
     CompilationDatabase: build/release/build
    Diagnostics:
     Suppress:
     - unused-includes
     - unknown_typename
     - unknown_typename_suggest
     - typename_requires_specqual

     

    I have in Output window:

    [driver] NOTE: You are configuring with preset release, but there are some overrides being applied from your VS Code settings.
    and
    can't open .map file
     
    I suppose that the reason is that STM32Cube use .../Release or .../Debug while compile but VSC use .../buil/release or .../built/debug. 
    Do You know how can i change it in VSC?
    Graduate II
    November 22, 2025
    Visitor II
    November 19, 2025

    I don't think the debug and release thing is the issue, I'm on Debug and have the same issue, and to change it just go to Command Palette: (Ctrl:Shift:P) and then type CMake: Select Configure Preset and select that