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?

Parents
  • 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

  • Thanks Sigurd, I've done as you suggested and restarted VS Code, an I still get 10 out of 11 errors as it does at least find remote.h header file in the project folder

    How do I set the compiler to arm-none-eabi-gcc instead please? It's located here:

  • Hi

    After doing some research, I found that the error

    boards/arm/nrf5340dk_nrf5340/Kconfig.defconfig:62: error: couldn't parse 'default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))': macro expanded to blank string

    have been spotted on MacOS VS Code before. I have reported this to our developers as a bug.

    Thank you for the report. If I find a workaround, I will let you know.
    And hopefully this will be fixed in a later update of our extension.


    EDIT, added the following:

    alwalker said:
    Bad CMake executable "". Is it installed or settings contain the correct path (cmake.cmakePath)?

    I think out extension does some configuration that is dependent of the build folders. Therefore, some error messages might appear before the build, but should disappear after your project has a build folder. My guess is that the cmake path error is of this type.

    Regards,
    Sigurd Hellesvik

  • Hi Sigurd, any thoughts on the JSON file apparently being absent when using a sample project such as blinky please?

  • Hi Alan

    I guess this JSON file is a configuration overlay file local for your project.
    When I create an application from sample using using VS Code, I am not able to see this file.
    The file is generated if you try to configure intellisense manually using VS Code .

    Regards,
    Sigurd Hellesvik

  • Hi Sigurd, 

    Thanks for the confirmation, if you repeat the example I give at the start of this thread using the bluetooth_remote_template example per the Nordic video, do you see the JSON file being created please?

  • Hi Sigurd,

    Any progress on resolving this issue please?

Reply Children