vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

Intellisense reports errors in a Cortex-M project using the Nordic SDK

Open pthorn opened this issue 5 years ago • 2 comments

I have a C project for a Cortex-M target using the Nordic nRF5 SDK version 15.3.0, the compiler is arm-none-eabi-gcc 9.3. There're no include file errors. All uses of NRF_LOG_INFO, NRF_LOG_WARNING, NRF_LOG_ERROR etc.. macros generate squiggles with the error "expression must have integral typeC/C++(31)". (The code compiles and runs fine.)

Screenshot 2021-02-08 at 10 59 25

  • OS and Version: Mac OS 10.15.7
  • VS Code Version: 1.53.0
  • C/C++ Extension Version: 1.2.0

My c_cpp_properties.json:

{
    "configurations": [
        {
            "name": "arm-gcc-macos",
            "compilerPath": "/(redacted)/arm-none-eabi-gcc/xpack-arm-none-eabi-gcc-9.3.1-1.4/bin/arm-none-eabi-gcc",
            "compilerArgs": [
                    "-mthumb",
                    "-mcpu=cortex-m4",
                    "-mfloat-abi=hard",
                    "-mfpu=fpv4-sp-d16"
	    ],
            "cStandard": "c99",
            "cppStandard": "c++17",
            "intelliSenseMode": "gcc-arm",
            "compileCommands": "${workspaceRoot}/_build/compile_commands.json",
            "browse": {
                "path": ["${workspaceFolder}/src"],
                "limitSymbolsToIncludedHeaders": true,
                "databaseFilename": "${workspaceRoot}/.vscode/browse.vc.db"
            }
        }        
    ],
    "version": 4
}

pthorn avatar Feb 08 '21 08:02 pthorn

@pthorn Could you provide the additional following logs to help us further investigate:

  1. Log output from enabling the language server
  2. Log output from running the command C/C++: Log Diagnostics

michelleangela avatar Feb 08 '21 23:02 michelleangela

This issue has been closed automatically because it needs more information and has not had recent activity.

github-actions[bot] avatar Apr 10 '21 11:04 github-actions[bot]