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

Parents Reply Children
  • Hello Charlie, my project starts from a Nordik sample.

    It is located in C:\ncs, where by default the create new application suggests to put.

    I am working in C++. When edit the program I had a lot of squiggles and AI suggested

    to modify the c_cpp_properties.json. And indeed it works. I add the direct path.

    Now I have moved to 2.9.0, and direct path of compiler and sdk is obviously changed,

    so I decided to put a relative path.

    I modify the settings.json and add

    "nrf-connect.topdir": "c:/ncs"

    "nrf-connect.toolchain": "c:/ncs/toolchains/b620d30767"

    "nrf-connect.sdk": "c:/ncs/v2.9.0"

    and then I modified the c_cpp_properties.json for example

    "compilerPath": "${config:nrf-connect.toolchain}/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe",

    or 

    "includePath": [


    "${workspaceFolder}/**",


    "${config:nrf-connect.sdk}/zephyr/include",


    "${config:nrf-connect.sdk}/zephyr/include/zephyr",


    "${config:nrf-connect.sdk}/nrfxlib"

    }

    Does not work. No reload window, no clear build, no delete build directory

    On one PC seems to work but squiggles the instruction strlen or strcmp.

    On another it does not work at all. Intellisense got crazy. And if i point on uint32_t it jumps me 

    to strange declaration!

    I could jump back to absolute path. But this behaviour strongly confuse me.

    Best Regards

  • 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

    There everything OK.

  • It looks like that including this

    #include <tfm/tfm_ioctl_api.h> in a file causes intellisense not to recognize uint32_t anymore.
    I am programming in C++
  • 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

Related