Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler flags containing spaces not passed correctly to IntelliSense #1414

Closed
patrislav1 opened this issue Aug 19, 2020 · 15 comments
Closed
Assignees
Labels
bug a bug in the product embedded Feature: cpptools integration fixed (release pending) fixed in pre-release and is pending official release
Projects
Milestone

Comments

@patrislav1
Copy link

patrislav1 commented Aug 19, 2020

Brief Issue Summary

Using custom CMake toolchain which is referenced in project-local kit .vscode\cmake-kits.json:

[
    {
      "name": "arm-gcc from CMake Toolchain",
      "toolchainFile": "${workspaceRoot}/cmake/arm-gcc-toolchain.cmake"
    }
]

Intellisense is configured via .vscode\settings.json to receive configuration from cmake-tools:

{
    "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools"
}

The cmake toolchain succeeds in locating the compiler and cmake-tools receives the compiler information, after I implemented the cmake cache workaround.
The project build works as expected.

However, Intellisense C++ fails to locate the standard C library include files and marks the #include statements with squiggles.

The arm-gcc toolchain is on a Windows machine on a C:\Program Files (x86)\... path, thus containing a whitespace.
When I move it to C:\arm-gnu-toolchain, eliminating the whitespace in the path, and reconfigure the project, then IntelliSense works and the affected #include files are found.

I assume the compiler path is not passed correctly from cmake-tools to IntelliSense, maybe there are quotes missing somewhere along the way.

Platform and Versions

  • Operating System: Windows
  • CMake Version: 3.17.4
  • VSCode Version: 1.48.0
  • CMake Tools Extension Version: 1.4.1
  • Compiler/Toolchain: arm-none-eabi-gcc 6.3.1.508
@bobbrow
Copy link
Member

bobbrow commented Aug 19, 2020

Can you enable Debug logging for cpptools which will print out the configurations sent by CMake Tools?

After enabling the logging, please run the "Reload Window" command to reset the extension which will cause the configuration to be resent. If you can send that log and also the log printed when you run the "Log Diagnostics" command, that would be super helpful. Thanks!

@patrislav1
Copy link
Author

Surprise: the compiler path seems to be passed correctly to cpptools, AFAICS.
cpptools even lists the compiler include paths to be indexed ...
Maybe it is not a cmake-tools bug, but a cpptools one?

Custom browse configuration received: {
  "browsePath": [
    <bunch of source paths>
  ],
  "standard": "c++17",
  "compilerPath": "c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-g++.exe",
  "compilerArgs": []
}
cpptools/didChangeCppProperties
Attempting to get defaults from compiler found on the machine: ''
No suitable compiler found. Please set the "compilerPath" in c_cpp_properties.json.
Code browsing service initialized
Attempting to get defaults from compiler found on the machine: ''
No suitable compiler found. Please set the "compilerPath" in c_cpp_properties.json.
  Folder: C:/SRC/UNIFIEDMMC/TRUNK/ will be indexed
cpptools/didChangeCustomBrowseConfiguration
Attempting to get defaults from compiler in "compilerPath" property: 'c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-g++.exe'
Compiler probe command line: c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-g++.exe -std=c++17 -Wp,-v -E -dD -x c++ -m64 nul
Compiler does not support 64-bit. Falling back to 32-bit intelliSenseMode.
Compiler probe command line: c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-g++.exe -std=c++17 -Wp,-v -E -dD -x c++ -m32 nul
Failed to query compiler. Falling back to no bitness.
Compiler probe command line: c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-g++.exe -std=c++17 -Wp,-v -E -dD -x c++  nul
  Folder: C:/PROGRAM FILES (X86)/GNU ARM EMBEDDED TOOLCHAIN/9 2020-Q2-UPDATE/LIB/GCC/ARM-NONE-EABI/9.3.1/INCLUDE/ will be indexed
  Folder: C:/PROGRAM FILES (X86)/GNU ARM EMBEDDED TOOLCHAIN/9 2020-Q2-UPDATE/LIB/GCC/ARM-NONE-EABI/9.3.1/INCLUDE-FIXED/ will be indexed
  Folder: C:/PROGRAM FILES (X86)/GNU ARM EMBEDDED TOOLCHAIN/9 2020-Q2-UPDATE/ARM-NONE-EABI/INCLUDE/ will be indexed
  Folder: C:/SRC/UNIFIEDMMC/TRUNK/SRC/ will be indexed
  Folder: C:/SRC/UNIFIEDMMC/TRUNK/BUILD/CMAKEFILES/ will be indexed
cpptools/clearCustomConfigurations
cpptools/fileDeleted: file:///c%3A/src/UnifiedMMC/trunk/build/.cmake/api/v1/reply/cache-v2-01a260cfd8f60cdde3ac.json
Populate include completion cache.
Discovering files...
cpptools/fileCreated: file:///c%3A/src/UnifiedMMC/trunk/build/.cmake/api/v1/reply/cache-v2-4930667c738ff51b5427.json
cpptools/fileCreated: file:///c%3A/src/UnifiedMMC/trunk/build/.cmake/api/v1/reply/index-2020-08-20T07-26-12-0073.json
cpptools/fileDeleted: file:///c%3A/src/UnifiedMMC/trunk/build/.cmake/api/v1/reply/index-2020-08-20T07-25-27-0358.json
  Processing folder (recursive): C:/PROGRAM FILES (X86)/GNU ARM EMBEDDED TOOLCHAIN/9 2020-Q2-UPDATE/LIB/GCC/ARM-NONE-EABI/9.3.1/INCLUDE/
  Processing folder (recursive): C:/PROGRAM FILES (X86)/GNU ARM EMBEDDED TOOLCHAIN/9 2020-Q2-UPDATE/LIB/GCC/ARM-NONE-EABI/9.3.1/INCLUDE-FIXED/
  Processing folder (recursive): C:/PROGRAM FILES (X86)/GNU ARM EMBEDDED TOOLCHAIN/9 2020-Q2-UPDATE/ARM-NONE-EABI/INCLUDE/
  Processing folder (recursive): C:/SRC/UNIFIEDMMC/TRUNK/SRC/
Custom configuration provider 'CMake Tools' registered
Custom browse configuration received: {
  "browsePath": [
    <bunch of source paths>
  ],
  "standard": "c++17",
  "compilerPath": "c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-g++.exe",
  "compilerArgs": []
}
cpptools/pauseParsing
cpptools/clearCustomConfigurations
cpptools/didChangeCustomBrowseConfiguration
cpptools/resumeParsing
  Processing folder (recursive): C:/SRC/UNIFIEDMMC/TRUNK/BUILD/CMAKEFILES/
  Discovering files: 2081 file(s) processed
  11 file(s) removed from database
Done discovering files.
Parsing remaining files...
  Parsing: 0 files(s) processed
Done parsing remaining files.
cpptools/clearCustomConfigurations
cpptools/clearCustomConfigurations
Database safe to open

@bobbrow
Copy link
Member

bobbrow commented Aug 20, 2020

I see "browsePath" configurations sent here, but I didn't see any information about source files that were open for IntelliSense. Can you open one of your source files and share what the "custom" configuration for that file is reported to be? And also run the "Log Diagnostics" command after opening that source file in the editor. This will help us know where things might have gone wrong.

@patrislav1
Copy link
Author

Ok, after opening a source file, cpptools shows in the log the compiler path split by spaces, see bottom of the log.

Custom browse configuration received: {
  "browsePath": [
    ("c:/src/unifiedmmc/.......", ...)
  ],
  "standard": "c++17",
  "compilerPath": "c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-g++.exe",
  "compilerArgs": []
}
cpptools/didChangeCppProperties
Attempting to get defaults from compiler found on the machine: ''
No suitable compiler found. Please set the "compilerPath" in c_cpp_properties.json.
Code browsing service initialized
Attempting to get defaults from compiler found on the machine: ''
No suitable compiler found. Please set the "compilerPath" in c_cpp_properties.json.
  Folder: C:/SRC/UNIFIEDMMC/TRUNK/ will be indexed
cpptools/didChangeCustomBrowseConfiguration
Attempting to get defaults from compiler in "compilerPath" property: 'c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-g++.exe'
Compiler probe command line: c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-g++.exe -std=c++17 -Wp,-v -E -dD -x c++ -m64 nul
Compiler does not support 64-bit. Falling back to 32-bit intelliSenseMode.
Compiler probe command line: c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-g++.exe -std=c++17 -Wp,-v -E -dD -x c++ -m32 nul
Failed to query compiler. Falling back to no bitness.
Compiler probe command line: c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-g++.exe -std=c++17 -Wp,-v -E -dD -x c++  nul
Custom configuration provider 'CMake Tools' registered
Custom browse configuration received: {
  "browsePath": [
    ("c:/src/unifiedmmc/.......", ...)
  ],
  "standard": "c++17",
  "compilerPath": "c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-g++.exe",
  "compilerArgs": []
}
  Folder: C:/PROGRAM FILES (X86)/GNU ARM EMBEDDED TOOLCHAIN/9 2020-Q2-UPDATE/LIB/GCC/ARM-NONE-EABI/9.3.1/INCLUDE/ will be indexed
  Folder: C:/PROGRAM FILES (X86)/GNU ARM EMBEDDED TOOLCHAIN/9 2020-Q2-UPDATE/LIB/GCC/ARM-NONE-EABI/9.3.1/INCLUDE-FIXED/ will be indexed
  Folder: C:/PROGRAM FILES (X86)/GNU ARM EMBEDDED TOOLCHAIN/9 2020-Q2-UPDATE/ARM-NONE-EABI/INCLUDE/ will be indexed
  Folder: C:/SRC/UNIFIEDMMC/TRUNK/SRC/ will be indexed
  Folder: C:/SRC/UNIFIEDMMC/TRUNK/BUILD/CMAKEFILES/ will be indexed
textDocument/didOpen: file:///c%3A/src/UnifiedMMC/trunk/src/main.c
cpptools/activeDocumentChange: file:///c%3A/src/UnifiedMMC/trunk/src/main.c
cpptools/textEditorSelectionChange
cpptools/clearCustomConfigurations
Checking for syntax errors: file:///c%3A/src/UnifiedMMC/trunk/src/main.c
Populate include completion cache.
Discovering files...
cpptools/getDocumentSymbols: file:///c%3A/src/UnifiedMMC/trunk/src/main.c (id: 2)
cpptools/getDocumentSymbols
cpptools/getCodeActions: file:///c%3A/src/UnifiedMMC/trunk/src/main.c (id: 3)
textDocument/hover: file:///c%3A/src/UnifiedMMC/trunk/src/main.c (id: 4)
IntelliSense client not available, using Tag Parser for go to definition.
IntelliSense client not available, using Tag Parser for quick info.
using Tag Parser for quick info
cpptools/getFoldingRanges: file:///c%3A/src/UnifiedMMC/trunk/src/main.c (id: 5)
cpptools/getSemanticTokens: file:///c%3A/src/UnifiedMMC/trunk/src/main.c (id: 6)
cpptools/pauseParsing
cpptools/clearCustomConfigurations
cpptools/queryTranslationUnitSource: file:///c%3A/src/UnifiedMMC/trunk/src/main.c (id: 7)
Custom configurations received:
  uri: file:///c%3A/src/UnifiedMMC/trunk/src/main.c
  config: {
  "defines": [
    "ARM_MATH_CM4=true",
    "BOARD=USER_BOARD",
    "__ATSAM4LS8C__",
    "__SAM4LS8C__",
    "printf=iprintf",
    "scanf=iscanf",
    "DEBUG",
    "DEBUG"
  ],
  "standard": "gnu99",
  "includePath": [
    ("c:/src/unifiedmmc/.......", ...)
    (no compiler paths here - only project paths)
  ],
  "intelliSenseMode": "gcc-arm",
  "compilerPath": "c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-gcc.exe",
  "compilerArgs": [
    "-g3",
    "-Og",
    "-Wall",
    "-pedantic",
    "-DDEBUG",
    "-mthumb",
    "-mcpu=cortex-m4",
    "-mlong-calls",
    "-fno-strict-aliasing",
    "-ffunction-sections",
    "-fdata-sections",
    "--param",
    "max-inline-insns-single=500",
    "-Wall",
    "-Wstrict-prototypes",
    "-Wmissing-prototypes",
    "-Werror-implicit-function-declaration",
    "-Wpointer-arith",
    "-Wchar-subscripts",
    "-Wcomment",
    "-Wformat=2",
    "-Wimplicit-int",
    "-Wmain",
    "-Wparentheses",
    "-Wsequence-point",
    "-Wreturn-type",
    "-Wswitch",
    "-Wtrigraphs",
    "-Wunused",
    "-Wuninitialized",
    "-Wunknown-pragmas",
    "-Wfloat-equal",
    "-Wundef",
    "-Wshadow",
    "-Wbad-function-cast",
    "-Wwrite-strings",
    "-Wsign-compare",
    "-Waggregate-return",
    "-Wmissing-declarations",
    "-Wformat",
    "-Wmissing-format-attribute",
    "-Wno-deprecated-declarations",
    "-Wpacked",
    "-Wredundant-decls",
    "-Wnested-externs",
    "-Wlong-long",
    "-Wunreachable-code",
    "-Wcast-align",
    "-Wno-expansion-to-defined",
    "-Wno-deprecated",
    "-Wno-pedantic",
    "-DDEBUG",
    "-O1",
    "-g3",
    "-std=gnu99",
    "--sysroot=C:/Program Files (x86)/GNU Arm Embedded Toolchain/9 2020-q2-update/bin/../arm-none-eabi"
  ]
}
cpptools/didChangeCustomBrowseConfiguration
cpptools/didChangeCustomConfiguration
Attempting to get defaults from compiler in "compilerPath" property: 'c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-gcc.exe'
  Processing folder (recursive): C:/PROGRAM FILES (X86)/GNU ARM EMBEDDED TOOLCHAIN/9 2020-Q2-UPDATE/LIB/GCC/ARM-NONE-EABI/9.3.1/INCLUDE/
  Processing folder (recursive): C:/PROGRAM FILES (X86)/GNU ARM EMBEDDED TOOLCHAIN/9 2020-Q2-UPDATE/LIB/GCC/ARM-NONE-EABI/9.3.1/INCLUDE-FIXED/
  Processing folder (recursive): C:/PROGRAM FILES (X86)/GNU ARM EMBEDDED TOOLCHAIN/9 2020-Q2-UPDATE/ARM-NONE-EABI/INCLUDE/
sending compilation args for C:\SRC\UNIFIEDMMC\TRUNK\SRC\MAIN.C
  include: C:\PROGRAM FILES (X86)\GNU ARM EMBEDDED TOOLCHAIN\9 2020-Q2-UPDATE\ARM-NONE-EABI\INCLUDE\C++\9.3.1
  include: C:\PROGRAM FILES (X86)\GNU ARM EMBEDDED TOOLCHAIN\9 2020-Q2-UPDATE\ARM-NONE-EABI\INCLUDE\C++\9.3.1\ARM-NONE-EABI
  include: C:\PROGRAM FILES (X86)\GNU ARM EMBEDDED TOOLCHAIN\9 2020-Q2-UPDATE\ARM-NONE-EABI\INCLUDE\C++\9.3.1\BACKWARD
  include: C:\PROGRAM FILES (X86)\GNU ARM EMBEDDED TOOLCHAIN\9 2020-Q2-UPDATE\LIB\GCC\ARM-NONE-EABI\9.3.1\INCLUDE
  include: C:\PROGRAM FILES (X86)\GNU ARM EMBEDDED TOOLCHAIN\9 2020-Q2-UPDATE\LIB\GCC\ARM-NONE-EABI\9.3.1\INCLUDE-FIXED
  include: C:\PROGRAM FILES (X86)\GNU ARM EMBEDDED TOOLCHAIN\9 2020-Q2-UPDATE\ARM-NONE-EABI\INCLUDE
  define: __STDC__=1
  (...incredibly long list of defines...)
  other: --g++
  other: --gnu_version=90301
  stdver: c++17
  intelliSenseMode: gcc-arm
Shutting down IntelliSense server: C:\SRC\UNIFIEDMMC\TRUNK\SRC\MAIN.C
  Processing folder (recursive): C:/SRC/UNIFIEDMMC/TRUNK/SRC/
  Processing folder (recursive): C:/SRC/UNIFIEDMMC/TRUNK/BUILD/CMAKEFILES/
  Discovering files: 2082 file(s) processed
  0 file(s) removed from database
Done discovering files.
Parsing remaining files...
  Parsing: 0 files(s) processed
Done parsing remaining files.
Closing the communication channel.
Compiler probe command line: c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-gcc.exe -g3 -Og -Wall -pedantic -mthumb -mcpu=cortex-m4 -mlong-calls -fno-strict-aliasing -ffunction-sections -fdata-sections --param max-inline-insns-single=500 -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror-implicit-function-declaration -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int -Wmain -Wparentheses -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef -Wshadow -Wbad-function-cast -Wwrite-strings -Wsign-compare -Waggregate-return -Wmissing-declarations -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations -Wpacked -Wredundant-decls -Wnested-externs -Wlong-long -Wunreachable-code -Wcast-align -Wno-expansion-to-defined -Wno-deprecated -Wno-pedantic -O1 -g3 -std=gnu99 --sysroot=C:/Program Files (x86)/GNU Arm Embedded Toolchain/9 2020-q2-update/bin/../arm-none-eabi  -Wp,-v -E -dD -x c  nul
arm-none-eabi-gcc.exe: error: Files: No such file or directory
arm-none-eabi-gcc.exe: error: (x86)/GNU: No such file or directory
arm-none-eabi-gcc.exe: error: Arm: No such file or directory
arm-none-eabi-gcc.exe: error: Embedded: No such file or directory
arm-none-eabi-gcc.exe: error: Toolchain/9: No such file or directory
arm-none-eabi-gcc.exe: error: 2020-q2-update/bin/../arm-none-eabi: No such file or directory

No suitable compiler found. Please set the "compilerPath" in c_cpp_properties.json.

@patrislav1
Copy link
Author

Here's the log diagnostics output. As with the previous log, I shorted the list of files as they're proprietary but there's no compiler related paths there, only project-related ones.

-------- Diagnostics - 21.8.2020, 12:26:42
Version: 0.30.0-insiders2
Current Configuration:
{
    "name": "Win32",
    "includePath": [
        "${workspaceFolder}/**"
    ],
    "defines": [
        "_DEBUG",
        "UNICODE",
        "_UNICODE"
    ],
    "intelliSenseMode": "msvc-x64",
    "compilerArgs": [],
    "configurationProvider": "ms-vscode.cmake-tools",
    "browse": {
        "path": [
            "${workspaceFolder}/**"
        ],
        "limitSymbolsToIncludedHeaders": true
    }
}
Custom browse configuration: 
{
    "browsePath": [
        ("c:/src/unifiedmmc/trunk/...") (lots of files)
    ],
    "standard": "c++17",
    "compilerPath": "c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-g++.exe",
    "compilerArgs": []
}
Custom configurations:
[ C:\src\UnifiedMMC\trunk\src\main.c ]
{
    "defines": [
        "ARM_MATH_CM4=true",
        "BOARD=USER_BOARD",
        "__ATSAM4LS8C__",
        "__SAM4LS8C__",
        "printf=iprintf",
        "scanf=iscanf",
        "DEBUG",
        "DEBUG"
    ],
    "standard": "gnu99",
    "includePath": [
        ("c:/src/unifiedmmc/trunk/...") (lots of files)
    ],
    "intelliSenseMode": "gcc-arm",
    "compilerPath": "c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-gcc.exe",
    "compilerArgs": [
        "-g3",
        "-Og",
        "-Wall",
        "-pedantic",
        "-DDEBUG",
        "-mthumb",
        "-mcpu=cortex-m4",
        "-mlong-calls",
        "-fno-strict-aliasing",
        "-ffunction-sections",
        "-fdata-sections",
        "--param",
        "max-inline-insns-single=500",
        "-Wall",
        "-Wstrict-prototypes",
        "-Wmissing-prototypes",
        "-Werror-implicit-function-declaration",
        "-Wpointer-arith",
        "-Wchar-subscripts",
        "-Wcomment",
        "-Wformat=2",
        "-Wimplicit-int",
        "-Wmain",
        "-Wparentheses",
        "-Wsequence-point",
        "-Wreturn-type",
        "-Wswitch",
        "-Wtrigraphs",
        "-Wunused",
        "-Wuninitialized",
        "-Wunknown-pragmas",
        "-Wfloat-equal",
        "-Wundef",
        "-Wshadow",
        "-Wbad-function-cast",
        "-Wwrite-strings",
        "-Wsign-compare",
        "-Waggregate-return",
        "-Wmissing-declarations",
        "-Wformat",
        "-Wmissing-format-attribute",
        "-Wno-deprecated-declarations",
        "-Wpacked",
        "-Wredundant-decls",
        "-Wnested-externs",
        "-Wlong-long",
        "-Wunreachable-code",
        "-Wcast-align",
        "-Wno-expansion-to-defined",
        "-Wno-deprecated",
        "-Wno-pedantic",
        "-DDEBUG",
        "-O1",
        "-g3",
        "-std=gnu99",
        "--sysroot=C:/Program Files (x86)/GNU Arm Embedded Toolchain/9 2020-q2-update/bin/../arm-none-eabi"
    ]
}
Translation Unit Mappings:
[ C:\src\UnifiedMMC\trunk\src\main.c ]:
    C:\SRC\UNIFIEDMMC\TRUNK\SRC\MAIN.C
Translation Unit Configurations:
[ C:\src\UnifiedMMC\trunk\src\main.c ]:
    Process ID: 11216
    Memory Usage: 18 MB
    Includes:
        (C:\SRC\UNIFIEDMMC\TRUNK\....) (lots of files)
    Defines:
        ARM_MATH_CM4=true
        BOARD=USER_BOARD
        __ATSAM4LS8C__
        __SAM4LS8C__
        printf=iprintf
        scanf=iscanf
        DEBUG
        DEBUG
    Standard Version: c99
    IntelliSense Mode: gcc-arm
    Other Flags:
        --gcc
        --gnu_version=90100
Total Memory Usage: 18 MB

@bobbrow
Copy link
Member

bobbrow commented Aug 21, 2020

This is perfect! Thanks for the logs. It looks like the problem is with this compiler flag: "--sysroot=C:/Program Files (x86)/GNU Arm Embedded Toolchain/9 2020-q2-update/bin/../arm-none-eabi". When it is passed to the compiler probe it messes things up because the path is not quoted.

@bobbrow bobbrow added this to the 1.5.0 milestone Aug 21, 2020
@bobbrow bobbrow changed the title Compiler path containing spaces not passed correctly to IntelliSense Compiler flags containing spaces not passed correctly to IntelliSense Nov 30, 2020
@aleun aleun added the embedded label Dec 10, 2020
@elahehrashedi elahehrashedi added this to to do in 1.6.0 Dec 14, 2020
@michelleangela michelleangela moved this from to do to In progress in 1.6.0 Dec 15, 2020
@Trass3r
Copy link

Trass3r commented Feb 3, 2021

#1478

@andreeis
Copy link
Contributor

We almost have CMake Tools 1.6.0 release out the door. Until then, if you want, you can also verify if this problem has been fixed correctly by installing the vsix built here: https://github.com/microsoft/vscode-cmake-tools/actions/runs/557242002#artifacts.

@elahehrashedi elahehrashedi added the fixed (release pending) fixed in pre-release and is pending official release label Feb 11, 2021
@patrislav1
Copy link
Author

Looks like this bug is still present in the current CMake Tools (1.7.3)?

@andreeis
Copy link
Contributor

andreeis commented Jul 13, 2021

@patrislav1, we will double check. Can you answer if this ever worked for 1.6.0? It is possible that it regressed with 1.7.3. Or you didn't check until now?

@patrislav1
Copy link
Author

I worked around it on my machine (changed compiler location) and didn't pay any more attention tbh. Now a colleague installed the same environment (with default compiler location, containing whitespaces) and bumped into the same bug even though he has the recent 1.7.3 version. I'll check if I can reproduce with 1.6.0, if that helps.

@patrislav1
Copy link
Author

With CMake Tools 1.6.0 I see the very same bug. See the debug output below (it's from a German installation, sorry, I hope it's still helpful). The not quoted --sysroot argument stands out, maybe it's related.

Benutzerdefinierte Suchkonfiguration empfangen: {
  "browsePath": [
    "c:/users/patrick/src/damc-ds812zup/build/cmakefiles",
    "c:/users/patrick/src/damc-ds812zup/src",
    "c:/users/patrick/src/damc-ds812zup/libdmmc/src/processors/atmel_sam/asf",
    (...)
  ],
  "standard": "c++17",
  "compilerPath": "c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-g++.exe",
  "compilerArgs": []
}
$/setTraceNotification
$/setTraceNotification
cpptools/didChangeCppProperties
Codesuchdienst initialisiert.
Es wurde der MSVC-IntelliSenseMode angegeben. Der Compiler (cl.exe) wird konfiguriert.
Der Compiler (cl.exe) kann nicht konfiguriert werden.
Es wurde kein geeigneter Compiler gefunden. Legen Sie "compilerPath" in "c_cpp_properties.json" fest.
Es wurde der MSVC-IntelliSenseMode angegeben. Der Compiler (cl.exe) wird konfiguriert.
Der Compiler (cl.exe) kann nicht konfiguriert werden.
Es wurde kein geeigneter Compiler gefunden. Legen Sie "compilerPath" in "c_cpp_properties.json" fest.
  Ordner: C:/USERS/PATRICK/SRC/DAMC-DS812ZUP/ werden indiziert.
cpptools/didChangeCustomBrowseConfiguration
Füllen Sie den Cache für die Includevervollständigung auf.
Dateien werden ermittelt...
Es wird versucht, Standardwerte vom C++-Compiler in der Eigenschaft "compilerPath" abzurufen: c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-g++.exe
Der Compiler für den Standard-C++-Sprachstandard wird über die Befehlszeile abgefragt: "c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-g++.exe" -x c++ -E -dM nul
  Ordner wird verarbeitet (rekursiv): C:/USERS/PATRICK/SRC/DAMC-DS812ZUP/
Erkannte Sprachstandardversion: gnu++14
Der Compiler für den Standard-C-Sprachstandard wird über die Befehlszeile abgefragt: "c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-g++.exe" -x c -E -dM nul
Erkannte Sprachstandardversion: gnu17
Das Standardziel des Compilers wird über die Befehlszeile abgefragt: "c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-g++.exe" -dumpmachine
Der Compiler hat den Standardzielwert zurückgegeben: arm-none-eabi

Befehlszeile der Compilerabfrage: "c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-g++.exe" -std=c++17 -Wp,-v -E -dD -x c++   nul
  Ordner: C:/PROGRAM FILES (X86)/GNU ARM EMBEDDED TOOLCHAIN/9 2020-Q2-UPDATE/LIB/GCC/ARM-NONE-EABI/9.3.1/INCLUDE/ werden indiziert.
  Ordner: C:/PROGRAM FILES (X86)/GNU ARM EMBEDDED TOOLCHAIN/9 2020-Q2-UPDATE/LIB/GCC/ARM-NONE-EABI/9.3.1/INCLUDE-FIXED/ werden indiziert.
  Ordner: C:/PROGRAM FILES (X86)/GNU ARM EMBEDDED TOOLCHAIN/9 2020-Q2-UPDATE/ARM-NONE-EABI/INCLUDE/ werden indiziert.
  Ordner: C:/USERS/PATRICK/SRC/DAMC-DS812ZUP/SRC/ werden indiziert.
  Ordner: C:/USERS/PATRICK/SRC/DAMC-DS812ZUP/LIBDMMC/SRC/ werden indiziert.
  Ordner: C:/USERS/PATRICK/SRC/DAMC-DS812ZUP/BUILD/ werden indiziert.
textDocument/didOpen: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c
cpptools/activeDocumentChange: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c
cpptools/textEditorSelectionChange
cpptools/didChangeSettings
IntelliSense-Engine = Default.
Die erweiterte Farbgebung ist aktiviert.
Fehlerwellenlinien sind aktiviert, wenn alle Headerabhängigkeiten aufgelöst werden.
AutoVervollständigen ist aktiviert.
Dateiausschluss: **/.vscode
Dateiausschluss: **/.git
Dateiausschluss: **/.svn
Dateiausschluss: **/.hg
Dateiausschluss: **/CVS
Dateiausschluss: **/.DS_Store
Suchausschluss: **/node_modules
Suchausschluss: **/bower_components
Suchausschluss: **/*.code-search
cpptools/didChangeSettings
IntelliSense-Engine = Default.
Die erweiterte Farbgebung ist aktiviert.
Fehlerwellenlinien sind aktiviert, wenn alle Headerabhängigkeiten aufgelöst werden.
AutoVervollständigen ist aktiviert.
cpptools/clearCustomConfigurations
Nach Syntaxfehlern wird gesucht: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c
cpptools/getCodeActions: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c (id: 2)
Die Taganalyse von "C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\DRIVERS\SAM\ADC.C" und Abhängigkeiten wird abgebrochen.
  Dateiermittlung: 547 Datei(en) verarbeitet
Die Ermittlung von Dateien ist abgeschlossen.
Füllen Sie den Cache für die Includevervollständigung auf.
Dateien werden ermittelt...
  Ordner wird verarbeitet (rekursiv): C:/PROGRAM FILES (X86)/GNU ARM EMBEDDED TOOLCHAIN/9 2020-Q2-UPDATE/LIB/GCC/ARM-NONE-EABI/9.3.1/INCLUDE/
  Ordner wird verarbeitet (rekursiv): C:/PROGRAM FILES (X86)/GNU ARM EMBEDDED TOOLCHAIN/9 2020-Q2-UPDATE/LIB/GCC/ARM-NONE-EABI/9.3.1/INCLUDE-FIXED/
  Ordner wird verarbeitet (rekursiv): C:/PROGRAM FILES (X86)/GNU ARM EMBEDDED TOOLCHAIN/9 2020-Q2-UPDATE/ARM-NONE-EABI/INCLUDE/
cpptools/getFoldingRanges: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c (id: 3)
cpptools/getSemanticTokens: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c (id: 4)
Kompilierungsargumente für "C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\DRIVERS\SAM\ADC.C" werden gesendet.
  Includes: C:\PROGRAM FILES (X86)\GNU ARM EMBEDDED TOOLCHAIN\9 2020-Q2-UPDATE\ARM-NONE-EABI\INCLUDE\C++\9.3.1
  Includes: C:\PROGRAM FILES (X86)\GNU ARM EMBEDDED TOOLCHAIN\9 2020-Q2-UPDATE\ARM-NONE-EABI\INCLUDE\C++\9.3.1\ARM-NONE-EABI
  Includes: C:\PROGRAM FILES (X86)\GNU ARM EMBEDDED TOOLCHAIN\9 2020-Q2-UPDATE\ARM-NONE-EABI\INCLUDE\C++\9.3.1\BACKWARD
  Includes: C:\PROGRAM FILES (X86)\GNU ARM EMBEDDED TOOLCHAIN\9 2020-Q2-UPDATE\LIB\GCC\ARM-NONE-EABI\9.3.1\INCLUDE
  Includes: C:\PROGRAM FILES (X86)\GNU ARM EMBEDDED TOOLCHAIN\9 2020-Q2-UPDATE\LIB\GCC\ARM-NONE-EABI\9.3.1\INCLUDE-FIXED
  Includes: C:\PROGRAM FILES (X86)\GNU ARM EMBEDDED TOOLCHAIN\9 2020-Q2-UPDATE\ARM-NONE-EABI\INCLUDE
  Define-Anweisung: __STDC__=1
  Define-Anweisung: __cplusplus=201703L
  Define-Anweisung: __STDC_UTF_16__=1
  Define-Anweisung: __STDC_UTF_32__=1
  Define-Anweisung: __STDC_HOSTED__=1
  Define-Anweisung: __GNUC__=9
  Define-Anweisung: __GNUC_MINOR__=3
  Define-Anweisung: __GNUC_PATCHLEVEL__=1
  Define-Anweisung: __VERSION__="9.3.1 20200408 (release)"
  Define-Anweisung: __ATOMIC_RELAXED=0
  Define-Anweisung: __ATOMIC_SEQ_CST=5
  Define-Anweisung: __ATOMIC_ACQUIRE=2
  Define-Anweisung: __ATOMIC_RELEASE=3
  Define-Anweisung: __ATOMIC_ACQ_REL=4
  Define-Anweisung: __ATOMIC_CONSUME=1
    (...)
 Sonstige: --g++
  Sonstige: --gnu_version=90301
  stdver: c++17
  intelliSenseMode: windows-gcc-arm
Nach Syntaxfehlern wird gesucht: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c
  Ordner wird verarbeitet (rekursiv): C:/USERS/PATRICK/SRC/DAMC-DS812ZUP/BUILD/
IntelliSense-Update für Dateien in dieser Übersetzungseinheit wird in die Warteschlange eingereiht: C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\DRIVERS\SAM\ADC.C
  Dateiermittlung: 2209 Datei(en) verarbeitet
  46 Datei(en) aus Datenbank entfernt
Die Ermittlung von Dateien ist abgeschlossen.
Verbleibende Dateien werden analysiert...
  Analyse: 0 Datei(en) verarbeitet
Die Analyse verbleibender Dateien ist abgeschlossen.
Füllen Sie den Cache für die Includevervollständigung auf.
Dateien werden ermittelt...
  Ordner wird verarbeitet (rekursiv): C:/PROGRAM FILES (X86)/GNU ARM EMBEDDED TOOLCHAIN/9 2020-Q2-UPDATE/LIB/GCC/ARM-NONE-EABI/9.3.1/INCLUDE/
  Ordner wird verarbeitet (rekursiv): C:/PROGRAM FILES (X86)/GNU ARM EMBEDDED TOOLCHAIN/9 2020-Q2-UPDATE/LIB/GCC/ARM-NONE-EABI/9.3.1/INCLUDE-FIXED/
  Ordner wird verarbeitet (rekursiv): C:/PROGRAM FILES (X86)/GNU ARM EMBEDDED TOOLCHAIN/9 2020-Q2-UPDATE/ARM-NONE-EABI/INCLUDE/
cpptools/getCodeActions: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c (id: 5)
cpptools/getDocumentSymbols: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c (id: 6)
cpptools/getDocumentSymbols
textDocument/hover: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c (id: 7)
  Ordner wird verarbeitet (rekursiv): C:/USERS/PATRICK/SRC/DAMC-DS812ZUP/SRC/
  Ordner wird verarbeitet (rekursiv): C:/USERS/PATRICK/SRC/DAMC-DS812ZUP/LIBDMMC/SRC/
  Ordner wird verarbeitet (rekursiv): C:/USERS/PATRICK/SRC/DAMC-DS812ZUP/BUILD/
  Dateiermittlung: 2209 Datei(en) verarbeitet
  0 Datei(en) aus Datenbank entfernt
Die Ermittlung von Dateien ist abgeschlossen.
Verbleibende Dateien werden analysiert...
  Analyse: 0 Datei(en) verarbeitet
Die Analyse verbleibender Dateien ist abgeschlossen.
cpptools/finishUpdateSquiggles
Anzahl von Fehlerwellenlinien: 80
Fehlerwellenlinien werden deaktiviert in: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c
IntelliSense-Zeit aktualisieren (Sek.): 0.964
cpptools/getFoldingRanges: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c (id: 8)
cpptools/getCodeActions: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c (id: 9)
textDocument/hover: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c (id: 10)
textDocument/hover: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c (id: 11)
cpptools/fileCreated: file:///c%3A/Users/patrick/src/damc-ds812zup/build/.cmake/api/v1/reply/target-damc-ds812zup-Debug-5d22be234bc7ea8f0665.json
Nach Syntaxfehlern wird gesucht: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c
IntelliSense-Update für Dateien in dieser Übersetzungseinheit wird in die Warteschlange eingereiht: C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\DRIVERS\SAM\ADC.C
cpptools/fileCreated: file:///c%3A/Users/patrick/src/damc-ds812zup/build/.cmake/api/v1/reply/target-damc-ds812zup_bundle-Debug-77b9590a5fa98ec8a3df.json
cpptools/fileCreated: file:///c%3A/Users/patrick/src/damc-ds812zup/build/.cmake/api/v1/reply/target-damc-ds812zup_bundle_flash-Debug-78b1e4d2151b0e1a626e.json
cpptools/fileCreated: file:///c%3A/Users/patrick/src/damc-ds812zup/build/.cmake/api/v1/reply/codemodel-v2-1fd54daea9662ff628ed.json
cpptools/fileCreated: file:///c%3A/Users/patrick/src/damc-ds812zup/build/.cmake/api/v1/reply/index-2021-07-14T07-01-51-0360.json
cpptools/fileDeleted: file:///c%3A/Users/patrick/src/damc-ds812zup/build/.cmake/api/v1/reply/index-2021-07-14T07-00-46-0938.json
cpptools/fileDeleted: file:///c%3A/Users/patrick/src/damc-ds812zup/build/.cmake/api/v1/reply/codemodel-v2-909e6729fe2b080248bd.json
cpptools/fileDeleted: file:///c%3A/Users/patrick/src/damc-ds812zup/build/.cmake/api/v1/reply/target-damc-ds812zup-Debug-f5c98009f88e838a2abc.json
cpptools/fileDeleted: file:///c%3A/Users/patrick/src/damc-ds812zup/build/.cmake/api/v1/reply/target-damc-ds812zup_bundle-Debug-6f7f43872dbb3e08b62f.json
cpptools/fileDeleted: file:///c%3A/Users/patrick/src/damc-ds812zup/build/.cmake/api/v1/reply/target-damc-ds812zup_bundle_flash-Debug-bd06e40194438f36935b.json
Benutzerdefinierter Konfigurationsanbieter "CMake Tools" registriert
Benutzerdefinierte Suchkonfiguration empfangen: {
  "browsePath": [
    "c:/users/patrick/src/damc-ds812zup/build/cmakefiles",
    "c:/users/patrick/src/damc-ds812zup/src",
    "c:/users/patrick/src/damc-ds812zup/libdmmc/src/processors/atmel_sam/asf",
    (...)
  ],
  "standard": "c++17",
  "compilerPath": "c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-g++.exe",
  "compilerArgs": []
}
cpptools/didChangeCppProperties
cpptools/pauseParsing
cpptools/clearCustomConfigurations
cpptools/queryTranslationUnitSource: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c (id: 12)
Benutzerdefinierte Konfigurationen empfangen:
  uri: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c
  config: {
  "defines": [
    "APPLICATION_START=0x00010000",
    "ARM_MATH_CM4=true",
    "BOARD=USER_BOARD",
    "IANA_MANUFACTURER_ID=0x053f",
    "IANA_PRODUCT_ID=0xc0de",
    "__ATSAM4LS8C__",
    "__SAM4LS8C__",
    "DEBUG"
  ],
  "standard": "gnu99",
  "includePath": [
    "c:/users/patrick/src/damc-ds812zup/libdmmc/src/processors/atmel_sam/asf",
    "c:/users/patrick/src/damc-ds812zup/libdmmc/src/processors/atmel_sam/asf/common/boards",
    "c:/users/patrick/src/damc-ds812zup/libdmmc/src/processors/atmel_sam/asf/common/boards/user_board",
    "c:/users/patrick/src/damc-ds812zup/libdmmc/src/processors/atmel_sam/asf/common/services/clock",
    (...)
  ],
  "intelliSenseMode": "gcc-arm",
  "compilerPath": "c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-gcc.exe",
  "compilerArgs": [
    "-g",
    "-mthumb",
    "-mcpu=cortex-m4",
    "-mlong-calls",
    "-fno-strict-aliasing",
    "-ffunction-sections",
    "-fdata-sections",
    "--param",
    "max-inline-insns-single=500",
    "-Wall",
    "-Wstrict-prototypes",
    "-Wmissing-prototypes",
    "-Werror-implicit-function-declaration",
    "-Wpointer-arith",
    "-Wchar-subscripts",
    "-Wcomment",
    "-Wformat=2",
    "-Wimplicit-int",
    "-Wmain",
    "-Wparentheses",
    "-Wsequence-point",
    "-Wreturn-type",
    "-Wswitch",
    "-Wtrigraphs",
    "-Wunused",
    "-Wuninitialized",
    "-Wunknown-pragmas",
    "-Wfloat-equal",
    "-Wundef",
    "-Wshadow",
    "-Wbad-function-cast",
    "-Wwrite-strings",
    "-Wsign-compare",
    "-Wmissing-declarations",
    "-Wformat",
    "-Wmissing-format-attribute",
    "-Wno-deprecated-declarations",
    "-Wpacked",
    "-Wredundant-decls",
    "-Wnested-externs",
    "-Wlong-long",
    "-Wunreachable-code",
    "-Wcast-align",
    "-g3",
    "-Og",
    "-DDEBUG",
    "-std=gnu99",
    "--sysroot=C:/Program Files (x86)/GNU Arm Embedded Toolchain/9 2020-q2-update/bin/../arm-none-eabi"
  ]
}
Nach Syntaxfehlern wird gesucht: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c
cpptools/didChangeCustomBrowseConfiguration
IntelliSense-Server wird heruntergefahren: C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\DRIVERS\SAM\ADC.C
Es wird versucht, Standardwerte vom C++-Compiler in der Eigenschaft "compilerPath" abzurufen: c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-g++.exe
cpptools/didChangeCustomConfiguration
Es wird versucht, Standardwerte vom C-Compiler in der Eigenschaft "compilerPath" abzurufen: c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-gcc.exe
Der Compiler für den Standard-C++-Sprachstandard wird über die Befehlszeile abgefragt: "c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-gcc.exe" -x c++ -E -dM nul
Kompilierungsargumente für "C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\DRIVERS\SAM\ADC.C" werden gesendet.
  Includes: C:\PROGRAM FILES (X86)\GNU ARM EMBEDDED TOOLCHAIN\9 2020-Q2-UPDATE\ARM-NONE-EABI\INCLUDE\C++\9.3.1
  Includes: C:\PROGRAM FILES (X86)\GNU ARM EMBEDDED TOOLCHAIN\9 2020-Q2-UPDATE\ARM-NONE-EABI\INCLUDE\C++\9.3.1\ARM-NONE-EABI
  Includes: C:\PROGRAM FILES (X86)\GNU ARM EMBEDDED TOOLCHAIN\9 2020-Q2-UPDATE\ARM-NONE-EABI\INCLUDE\C++\9.3.1\BACKWARD
  Includes: C:\PROGRAM FILES (X86)\GNU ARM EMBEDDED TOOLCHAIN\9 2020-Q2-UPDATE\LIB\GCC\ARM-NONE-EABI\9.3.1\INCLUDE
  Includes: C:\PROGRAM FILES (X86)\GNU ARM EMBEDDED TOOLCHAIN\9 2020-Q2-UPDATE\LIB\GCC\ARM-NONE-EABI\9.3.1\INCLUDE-FIXED
  Includes: C:\PROGRAM FILES (X86)\GNU ARM EMBEDDED TOOLCHAIN\9 2020-Q2-UPDATE\ARM-NONE-EABI\INCLUDE
  Define-Anweisung: __STDC__=1
  Define-Anweisung: __cplusplus=201703L
  Define-Anweisung: __STDC_UTF_16__=1
  Define-Anweisung: __STDC_UTF_32__=1
    (...)
  Sonstige: --g++
  Sonstige: --gnu_version=90301
  stdver: c++17
  intelliSenseMode: windows-gcc-arm
Nach Syntaxfehlern wird gesucht: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c
IntelliSense-Update für Dateien in dieser Übersetzungseinheit wird in die Warteschlange eingereiht: C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\DRIVERS\SAM\ADC.C
Der Compiler für den Standard-C++-Sprachstandard wird über die Befehlszeile abgefragt: "c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-gcc.exe" -x c++ -E -dM /dev/null
Der Compiler für den Standard-C-Sprachstandard wird über die Befehlszeile abgefragt: "c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-gcc.exe" -x c -E -dM nul
Erkannte Sprachstandardversion: gnu17
Das Standardziel des Compilers wird über die Befehlszeile abgefragt: "c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-gcc.exe" -dumpmachine
Der Compiler hat den Standardzielwert zurückgegeben: arm-none-eabi

Befehlszeile der Compilerabfrage: "c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-gcc.exe" -g -mthumb -mcpu=cortex-m4 -mlong-calls -fno-strict-aliasing -ffunction-sections -fdata-sections --param max-inline-insns-single=500 -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror-implicit-function-declaration -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int -Wmain -Wparentheses -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef -Wshadow -Wbad-function-cast -Wwrite-strings -Wsign-compare -Wmissing-declarations -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations -Wpacked -Wredundant-decls -Wnested-externs -Wlong-long -Wunreachable-code -Wcast-align -g3 -Og -std=gnu99 --sysroot=C:/Program Files (x86)/GNU Arm Embedded Toolchain/9 2020-q2-update/bin/../arm-none-eabi  -Wp,-v -E -dD -x c   nul
Befehlszeile der Compilerabfrage: "c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-gcc.exe" -g -mthumb -mcpu=cortex-m4 -mlong-calls -fno-strict-aliasing -ffunction-sections -fdata-sections --param max-inline-insns-single=500 -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror-implicit-function-declaration -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int -Wmain -Wparentheses -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef -Wshadow -Wbad-function-cast -Wwrite-strings -Wsign-compare -Wmissing-declarations -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations -Wpacked -Wredundant-decls -Wnested-externs -Wlong-long -Wunreachable-code -Wcast-align -g3 -Og -std=gnu99 --sysroot=C:/Program Files (x86)/GNU Arm Embedded Toolchain/9 2020-q2-update/bin/../arm-none-eabi  -Wp,-v -E -dD -x c   /dev/null
arm-none-eabi-gcc.exe: error: Files: No such file or directory
arm-none-eabi-gcc.exe: error: (x86)/GNU: No such file or directory
arm-none-eabi-gcc.exe: error: Arm: No such file or directory
arm-none-eabi-gcc.exe: error: Embedded: No such file or directory
arm-none-eabi-gcc.exe: error: Toolchain/9: No such file or directory
arm-none-eabi-gcc.exe: error: 2020-q2-update/bin/../arm-none-eabi: No such file or directory
arm-none-eabi-gcc.exe: error: /dev/null: No such file or directory
arm-none-eabi-gcc.exe: warning: '-x c' after last input file has no effect
arm-none-eabi-gcc.exe: fatal error: no input files
compilation terminated.

Es wurde kein geeigneter Compiler gefunden. Legen Sie "compilerPath" in "c_cpp_properties.json" fest.
Nach Syntaxfehlern wird gesucht: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c
cpptools/finishUpdateSquiggles
Anzahl von Fehlerwellenlinien: 80
Fehlerwellenlinien werden deaktiviert in: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c
IntelliSense-Server wird heruntergefahren: C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\DRIVERS\SAM\ADC.C
cpptools/resumeParsing
cpptools/clearCustomConfigurations
cpptools/queryTranslationUnitSource: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c (id: 13)
Benutzerdefinierte Konfigurationen empfangen:
  uri: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c
  config: {
  "defines": [
    "APPLICATION_START=0x00010000",
    "ARM_MATH_CM4=true",
    "BOARD=USER_BOARD",
    "IANA_MANUFACTURER_ID=0x053f",
    "IANA_PRODUCT_ID=0xc0de",
    "__ATSAM4LS8C__",
    "__SAM4LS8C__",
    "DEBUG"
  ],
  "standard": "gnu99",
  "includePath": [
    "c:/users/patrick/src/damc-ds812zup/libdmmc/src/processors/atmel_sam/asf",
    "c:/users/patrick/src/damc-ds812zup/libdmmc/src/processors/atmel_sam/asf/common/boards",
    "c:/users/patrick/src/damc-ds812zup/libdmmc/src/processors/atmel_sam/asf/common/boards/user_board",
    "c:/users/patrick/src/damc-ds812zup/libdmmc/src/processors/atmel_sam/asf/common/services/clock",
    (...)
  ],
  "intelliSenseMode": "gcc-arm",
  "compilerPath": "c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-gcc.exe",
  "compilerArgs": [
    "-g",
    "-mthumb",
    "-mcpu=cortex-m4",
    "-mlong-calls",
    "-fno-strict-aliasing",
    "-ffunction-sections",
    "-fdata-sections",
    "--param",
    "max-inline-insns-single=500",
    "-Wall",
    "-Wstrict-prototypes",
    "-Wmissing-prototypes",
    "-Werror-implicit-function-declaration",
    "-Wpointer-arith",
    "-Wchar-subscripts",
    "-Wcomment",
    "-Wformat=2",
    "-Wimplicit-int",
    "-Wmain",
    "-Wparentheses",
    "-Wsequence-point",
    "-Wreturn-type",
    "-Wswitch",
    "-Wtrigraphs",
    "-Wunused",
    "-Wuninitialized",
    "-Wunknown-pragmas",
    "-Wfloat-equal",
    "-Wundef",
    "-Wshadow",
    "-Wbad-function-cast",
    "-Wwrite-strings",
    "-Wsign-compare",
    "-Wmissing-declarations",
    "-Wformat",
    "-Wmissing-format-attribute",
    "-Wno-deprecated-declarations",
    "-Wpacked",
    "-Wredundant-decls",
    "-Wnested-externs",
    "-Wlong-long",
    "-Wunreachable-code",
    "-Wcast-align",
    "-g3",
    "-Og",
    "-DDEBUG",
    "-std=gnu99",
    "--sysroot=C:/Program Files (x86)/GNU Arm Embedded Toolchain/9 2020-q2-update/bin/../arm-none-eabi"
  ]
}
cpptools/didChangeCustomConfiguration
Es wird versucht, Standardwerte vom C-Compiler in der Eigenschaft "compilerPath" abzurufen: c:/program files (x86)/gnu arm embedded toolchain/9 2020-q2-update/bin/arm-none-eabi-gcc.exe
Es wurde kein geeigneter Compiler gefunden. Legen Sie "compilerPath" in "c_cpp_properties.json" fest.
cpptools/getCodeActions: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c (id: 14)
cpptools/getSemanticTokens: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c (id: 15)
Kompilierungsargumente für "C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\DRIVERS\SAM\ADC.C" werden gesendet.
  Includes: C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\PROCESSORS\ATMEL_SAM\ASF
  Includes: C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\PROCESSORS\ATMEL_SAM\ASF\COMMON\BOARDS
  Includes: C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\PROCESSORS\ATMEL_SAM\ASF\COMMON\BOARDS\USER_BOARD
  Includes: C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\PROCESSORS\ATMEL_SAM\ASF\COMMON\SERVICES\CLOCK
  Includes: C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\PROCESSORS\ATMEL_SAM\ASF\COMMON\SERVICES\CPU
    (...)
  Define-Anweisung: APPLICATION_START=0x00010000
  Define-Anweisung: ARM_MATH_CM4=true
  Define-Anweisung: BOARD=USER_BOARD
  Define-Anweisung: IANA_MANUFACTURER_ID=0x053f
  Define-Anweisung: IANA_PRODUCT_ID=0xc0de
  Define-Anweisung: __ATSAM4LS8C__
  Define-Anweisung: __SAM4LS8C__
  Define-Anweisung: DEBUG
  Define-Anweisung: DEBUG
  Sonstige: --gcc
  Sonstige: --gnu_version=103000
  stdver: c99
  intelliSenseMode: windows-gcc-arm
Nach Syntaxfehlern wird gesucht: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c
IntelliSense-Server wird heruntergefahren: C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\DRIVERS\SAM\ADC.C
Kompilierungsargumente für "C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\DRIVERS\SAM\ADC.C" werden gesendet.
  Includes: C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\PROCESSORS\ATMEL_SAM\ASF
  Includes: C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\PROCESSORS\ATMEL_SAM\ASF\COMMON\BOARDS
  Includes: C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\PROCESSORS\ATMEL_SAM\ASF\COMMON\BOARDS\USER_BOARD
  Includes: C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\PROCESSORS\ATMEL_SAM\ASF\COMMON\SERVICES\CLOCK
  Includes: C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\PROCESSORS\ATMEL_SAM\ASF\COMMON\SERVICES\CPU
    (...)
  Define-Anweisung: APPLICATION_START=0x00010000
  Define-Anweisung: ARM_MATH_CM4=true
  Define-Anweisung: BOARD=USER_BOARD
  Define-Anweisung: IANA_MANUFACTURER_ID=0x053f
  Define-Anweisung: IANA_PRODUCT_ID=0xc0de
  Define-Anweisung: __ATSAM4LS8C__
  Define-Anweisung: __SAM4LS8C__
  Define-Anweisung: DEBUG
  Define-Anweisung: DEBUG
  Sonstige: --gcc
  Sonstige: --gnu_version=103000
  stdver: c99
  intelliSenseMode: windows-gcc-arm
IntelliSense-Server wird heruntergefahren: C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\DRIVERS\SAM\ADC.C
Kompilierungsargumente für "C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\DRIVERS\SAM\ADC.C" werden gesendet.
  Includes: C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\PROCESSORS\ATMEL_SAM\ASF
  Includes: C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\PROCESSORS\ATMEL_SAM\ASF\COMMON\BOARDS
  Includes: C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\PROCESSORS\ATMEL_SAM\ASF\COMMON\BOARDS\USER_BOARD
  Includes: C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\PROCESSORS\ATMEL_SAM\ASF\COMMON\SERVICES\CLOCK
    (...)
  Define-Anweisung: APPLICATION_START=0x00010000
  Define-Anweisung: ARM_MATH_CM4=true
  Define-Anweisung: BOARD=USER_BOARD
  Define-Anweisung: IANA_MANUFACTURER_ID=0x053f
  Define-Anweisung: IANA_PRODUCT_ID=0xc0de
  Define-Anweisung: __ATSAM4LS8C__
  Define-Anweisung: __SAM4LS8C__
  Define-Anweisung: DEBUG
  Define-Anweisung: DEBUG
  Sonstige: --gcc
  Sonstige: --gnu_version=103000
  stdver: c99
  intelliSenseMode: windows-gcc-arm
IntelliSense-Update für Dateien in dieser Übersetzungseinheit wird in die Warteschlange eingereiht: C:\USERS\PATRICK\SRC\DAMC-DS812ZUP\LIBDMMC\SRC\DRIVERS\SAM\ADC.C
Database safe to open
cpptools/getFoldingRanges: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c (id: 16)
cpptools/getCodeActions: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c (id: 17)
cpptools/finishUpdateSquiggles
Anzahl von Fehlerwellenlinien: 34
Fehlerwellenlinien werden deaktiviert in: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c
IntelliSense-Zeit aktualisieren (Sek.): 11.784
cpptools/getSemanticTokens: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c (id: 18)
cpptools/getFoldingRanges: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c (id: 19)
cpptools/getCodeActions: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c (id: 20)
cpptools/getCodeActions: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c (id: 21)
cpptools/activeDocumentChange: file:///c%3A/Users/patrick/src/damc-ds812zup/libdmmc/src/drivers/sam/adc.c
cpptools/textEditorSelectionChange

@elahehrashedi
Copy link
Contributor

@patrislav1 please take a look at this PR and let us know if it solved your issue.
I can't repro your issue myself. We previously made a change to make sure the compiler flags , include paths , defines are passed correctly to the intellisense.

for example an include path that has space in the path,
or a define string that includes space or double quote.

However, the sysroot flag was treated differently in the code. This PR should fix that.

@elahehrashedi
Copy link
Contributor

We will provide a VSIX soon with this fix so that you can test it with your scenario. I will update you.

@elahehrashedi
Copy link
Contributor

@patrislav1 here is the link to the VSIX, please try it and let us know if it resolves your issue:
https://github.com/microsoft/vscode-cmake-tools/suites/3334537608/artifacts/78204657

@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug a bug in the product embedded Feature: cpptools integration fixed (release pending) fixed in pre-release and is pending official release
Projects
No open projects
1.6.0
Done
Development

No branches or pull requests

6 participants