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?

Parents Reply Children
  • Hi Al

    I am sorry about this, but I thought you managed to fix your problem in your last answer.

    alwalker said:
    I Relaunched VS Code from nRF Connect, and this issue is no longer reported at launch. Neither do I get the 'Bad CMake' error at launch either.

    After looking through the post below, I think I am missing the bigger picture.
    To avoid further misunderstandings, could you recap your issue?

    Regards,
    Sigurd Hellesvik

  • Hi Sigurd,

    Some definite progress, however when I launch VS Code with the nRF Connect SDK v1.9.1 in Toolchain Manager I still need to manually change the toolchain etc. to v1.9.1 as it is not set automatically. It would be good if this was set as specified by the selection made in Toolchain Manager.

    I can build the bluetooth_remote_template project ok as reported in Terminal:

    One the Build is completed, there are no red squiggles under the #include statements in main.c

    However a few problems are still reported:

    Is there any news on a fix or workaround for this error please?

    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

    Are the other two C syntax errors something that would be fixed by code from the snippets.c file please?

    too few arguments in invocation of macro "Z_FOR_LOOP_1"

  • Hi

    alwalker said:
    however when I launch VS Code with the nRF Connect SDK v1.9.1 in Toolchain Manager I still need to manually change the toolchain etc. to v1.9.1 as it is not set automatically. It would be good if this was set as specified by the selection made in Toolchain Manager.

    The Toolchain Manager does not set the version in VS Code, that is correct.
    But is it the same as the previous time you used VS Code?

    alwalker said:

    Is there any news on a fix or workaround for this error please?

    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

    No, there is not yet any fix for this as far as I know.

    For a workaround, you could have a look at the file mentioned and see if you can change something here I guess.

    alwalker said:

    Are the other two C syntax errors something that would be fixed by code from the snippets.c file please?

    too few arguments in invocation of macro "Z_FOR_LOOP_1"

    Are you logging as explained in the Logging documentation?

    Is the logging error still apparent after you build the project?

    Regards,
    Sigurd Hellesvik

Related