This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Intellisense and nordic SDK errors?

Hi, I'm setting up Visual Studio Code to work with nrf51 and I can't figure why Intellisense would mark some of the lines from the SDK as errors. I'm currently working with the beacon example from the SDK and everything compiles fine once I call the Makefile, but Visual won' stop throwing errors such as:

"expression must be a modifiable lvalue" for calls to the ble functions and

"function returning function is not allowed" for definitions inside files like bsp.c and softdevice headers

  • Hi,

    I am not surprised that implementations of intelligent code completion gets thrown off at the code and macros related to SoftDevice API calls, even though the underlying pragmas, attributes, inline assembly etc. are valid. That code is responsible for the supervisor-call based API of the SoftDevice.

    As Intellisense is not part of our supported toolchains we do not have a solution to the issue. If accepting that SoftDevice headers and/or files from the SDK show as erroneous in the IDE is not an option, then I am sure there are both forums and documentation for Intellisense that might help you towards finding a solution.

    Maybe even other DevZone users might have found a solution that they are willing to share. We will leave this up to the community to find a solution. Please update this thread with a solution if you find one.

    Regards,
    Terje

Related