nRF5 SDK is not maintained anymore
More Info: Consider nRF Connect SDK for new designs

Implementing 'Developing Bluetooth Low Energy products using nRF Connect' video on nRF5340-DK

I am working from this video:

https://webinars.nordicsemi.com/developing-bluetooth-low-energy-6

Which nRF5340-DK build configuration should I use please?

  • nrff5340dk_nrf5340_cpuapp
  • nrff5340dk_nrf5340_cpuapp_ns
  • nrff5340dk_nrf5340_cpunet

I've downloaded the source files and manually put the folders named 'bluetooth_remote' and 'bluetooth_remote_template' in my macOS workspace folder.

I add the 'bluetooth_remote_template' folder as a new application into VS Code, immediately I'm asked if I want to change from the current v1.9.0 version of the nRF Connect SDK. I assume that I should be working with the latest version, so confirm that I don't want to change. When I then open the project in Explorer and look at main.c I see the following Includes underlined with red squiggles.

main.c

#include <zephyr.h>
#include <logging/log.h>
#include <dk_buttons_and_leds.h>
#include "remote.h"

The same is true for the Includes in remote.c and remote.h:

remote.c
  
#include "remote.h"
    
remote.h
   
#include <zephyr.h>
#include <logging/log.h>
 
What do I need to do to provide the paths to these header files please?

  • Hi

    For the difference between the board types, see my explanation in this case.

    Currently, the newest version of the nRF Connect SDK is v1.9.0.
    I suggest that you use the newest version when starting new projects.
    I recommend that you use the Toolchain Manager to install the newest version.

    The red lines under the includes, it is that VS Code IntelliSense can not find these includes.
    However, the build configuration of the project might still be able to work, as these are two different systems.

    I suggest that you try to build, and if it builds fine you can ignore the red lines under includes.
    See this devzone case for some discussion on the include error. There should also be some other cases about the same type of issue  if you look around.

    Did this answer your questions?

    Regards,
    Sigurd Hellesvik

  • Hi Sigurd,

    I selected the nrf5340dk_nrf5340_cpuapp for the Build Configuration based on the information you provided in the other post.

    This is what I get when I do the Build:

      

    Looking at the other post about JSON files, this is what I found:

    Is this correct please, or does it need modifying?

    Kind regards,

    Al

  • Hi Al,

    First, what does the "Terminal" beside the "Output"  tab show after you build?

    Regards,
    Sigurd Hellesvik

  • Hi Sigurd,

    I deleted the application and then relaunched VS Code via nRF Connect for Desktop.

    I used 'Add Application' to point to the bluetooth_remote_template folder in my workspace folder and then created a build configuration for the nrf5340dk_nrf5340_cpuapp using the nRF Connect SDK 1.9.0. I then did two successive Pristine Builds resulting in the same 11 problems shown in my previous post. I've attached the Terminal output from these two builds.


  • Hi

    From the Terminal log you sent, the projetct actually builds sucessfully, and you should be able to flash it to the device if you want.

    After you do the pristine build and get these errors, try to restart VS Code and see if the errors still persists in the existing project?

    In your settings, I see you use clang as the compiler used for intellij. Try to set the ncs gnuarmemb as this instead.
    It should be located something like. ""/opt/ncs/v1.9.0/toolchain/opt/bin/arm-none-eabi-gcc"

    Does any of these suggestings fix your issue?

    Regards,
    Sigurd Hellesvik

Related