Moving to 2.9.0 from 2.7.0

In 2.7.0 in file c_cpp_properties.json I had direct path to compiler. Now moving I need to change the path.

AI suggested to use ${nrf-connect.toolchain} for compiler and ${nrf-connect.sdk} for sdk.

Unlike launch.json where it works, in c_cpp_properties.json there is no way to let accect and resolve this

path.

Please do you have any suggestion?

Best Regards

  • Hi Fortunato,

    Sorry about the arbitrary changes regarding who is helping you here on this case. 

    I remember there being a lot of cases about intellisense placing red squiggles everywhere in the past, but it has been a while since I've seen this problem.

    Could you show me the c_cpp_properties.json file?

    Marbro1965 said:
    I am programming in C++

    Are you not seeing this problem when using C?

    Marbro1965 said:
    but not for all the instruction. It compiles but intellisense does not work well.

    Could you show me this difference in what it reacts on?

    Regards,

    Elfving

  • Hi,

    there are some images of the error and the c_cpp_properties.json.

    In the last image there are highlighted the libraries which drive intellisense crazy))).

    Thanks very much

    {
        "configurations": [
            {
                "name": "Win32",
                "includePath": [
                    "${workspaceFolder}/**",
                    "${config:nrf-connect.toolchain}/opt/zephyr-sdk/arm-zephyr-eabi/bin",
                    "${config:nrf-connect.toolchain}/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi/include",
                    "${config:nrf-connect.toolchain}/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi/include/c++/12.2.0",
                    "${config:nrf-connect.toolchain}/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi/include/c++/12.2.0/arm-zephyr-eabi",
                    "${config:nrf-connect.toolchain}/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi/include/c++/12.2.0/backward",
                    "${config:nrf-connect.toolchain}/opt/zephyr-sdk/arm-zephyr-eabi/lib/gcc/arm-zephyr-eabi/12.2.0/include",
                    "${config:nrf-connect.toolchain}/opt/zephyr-sdk/arm-zephyr-eabi/lib/gcc/arm-zephyr-eabi/12.2.0/include-fixed",
                    "c:/ncs/v2.7.0/zephyr/include",
                    "c:/ncs/v2.7.0/zephyr/include/zephyr",
                    "c:/ncs/v2.7.0/nrfxlib",
                    "c:/ncs/v2.7.0/zephyr/include/zephyr/drivers",
                    "c:/ncs/v2.7.0/zephyr/include/zephyr/kernel",
                    "c:/ncs/v2.7.0/zephyr/include/zephyr/usb",
                    "c:/ncs/v2.7.0/zephyr/arch",
                    "c:/ncs/v2.7.0/nrfxlib/nrf_modem/include",
                    "c:/ncs/v2.7.0/nrf/include",
                    "c:/ncs/v2.7.0/nrf/include/modem",
                    "c:/ncs/v2.7.0/zephyr/drivers",
                    "c:/ncs/v2.7.0/zephyr/kernel",
                    "c:/ncs/v2.7.0/modules/lib/cjson",
                    "c:/ncs/v2.7.0/modules/fs/fatfs/include",
                    "c:/ncs/v2.7.0/modules/hal/nordic/nrfx",
                    "c:/ncs/v2.7.0/modules/hal/nordic/nrfx/mdk"
                ],
                "defines": [
                    "_DEBUG",
                    "UNICODE",
                    "_UNICODE",
                    "CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000",
                    "ARCH_STACK_PTR_ALIGN=4"
                ],
                "configurationProvider": "nordic-semiconductor.nrf-connect",
                "compilerPath": "${config:nrf-connect.toolchain}/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe",
                "cppStandard": "gnu++11",
                "cStandard": "gnu11"
            }
        ],
        "version": 4
    }

  • Could you try adding "intelliSenseMode": "windows-gcc-arm"? And if that doesn't help, could you try setting the configurationProvider to "nrf-connect"? I see there is conflicting advice regarding that last one.

    Marbro1965 said:

    It works only with absolute path (2.0.9 ), but not for all the instruction. It compiles but intellisense does not work well.

    I go back to 2.7.0

    So it doesn't work perfectly with direct path either then. I guess it could be that AI was mistaken about eg. "nrf-connect.toolchain" working in c_cpp_properties.json. Though that a direct path doesn't work either makes this more interesting. What sort of instructions does it not work on?

    Regards,

    Elfving

Related