This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF5340DK - Building with VSCode

Hello all,

I just found out that the nRF Connect extension for VSCode has been release, which is great news. Good job Nordic Team!
I have followed the steps described in your article as well as in the Youtube tutorial and could successfully install the extension in VSCode. At first glance everything seemed to work properly, as I can create/add a project, build, flash, debug and start the terminal (serial).

However, I have noticed a few things during the build process that I would like to ask.

I have configured the build as follows but it seems that the application (zephyr/samples/basic/blinky example) is built for the secure domain.

I have attached the build process and would like to ask a few questions about it:

  1. How can i get rid of this warning? Or can it be ignored?
    CMake Warning at C:\Nordic\v1.6.1\zephyr\subsys\debug\CMakeLists.txt:4 (message):
      CONFIG_OPENOCD_SUPPORT is deprecated
    
        Please use DEBUG_THREAD_INFO instead.


  2. Related to Question 1, the build command includes a lot of build options that I did not set, being -DCONFIG_OPENOCD_SUPPORT:STRING="y" one of them. How can I manage these build options?

  3. Even though I am trying to build for the application core in non-secure domain, the build process changes the target to nrf5340dk_nrf5340_cpuapp.
    Changed board to secure nrf5340dk_nrf5340_cpuapp (NOT NS)

    I have then tried to build the same application using the old method of command line and west ($ west build -b nrf5340dk_nrf5340_cpuappns), as I assume that the process is the same. By doing so I have realized that the build process also changes the board to secure nrf5340dk_nrf5340_cpuapp (NOT NS).
    This makes me think that the problem is related to the build process itself and not VSCode. Any idea how I could solve this issue and build for the application core in non-secure domain?

  4. I have also noticed that warnings are only shown when the code is built after a modification or after a pristine build. This is not very practical, as warnings may be overseen... Is there any way to observe all warnings all the time?

    Example:
    Build right after modification/pristine build

   Building again without modifying the code:

I attach the both the project and the build output in case it may be of any help.

Many thanks in advance!

Best regards

Parents
  • Hi,

    1 & 2. These are because you set "Enable Debug Options" when creating the build configuration. You can make a new build configuration without that setting to get rid of them.

    3. A non-secure project consists of a non-secure image and a secure image, in this case the secure partition manager. The board is changed when building the secure image. This is intentional, and the application is still non-secure.

    4. I have passed this feedback along to the developers. I will update you when they respond.

Reply
  • Hi,

    1 & 2. These are because you set "Enable Debug Options" when creating the build configuration. You can make a new build configuration without that setting to get rid of them.

    3. A non-secure project consists of a non-secure image and a secure image, in this case the secure partition manager. The board is changed when building the secure image. This is intentional, and the application is still non-secure.

    4. I have passed this feedback along to the developers. I will update you when they respond.

Children
  • Hi Øivind,

    thanks for your answers. Looking forward to the feedback from your colleagues.

    If I may point out something else, I noticed that from time to time, some of the options from the Actions menu are missing after a pristine build. This happens randomly and not with a certain frequence.
    I did find a workaround : select another project from the Applications Menu (TestApp1) and the select again my project (TestApplication2). By doing so, all options are back in the Actions menu.

    Best regards.

  • Update on the warnings disappearing:

    "It happens because the files with the warnings in doesn't get re-compiled because they don't have any changes. Ninja (and Make, and therefore CMake and West) only recompile files with changes, to speed up builds. But if the file doesn't get recompiled, the compiler never sees the problem that generates the warning."

    We appreciate the feedback, and this may be something we can improve the user experience on in a future update.

    The flash and debug options disappearing is a known bug, and is something we are working to fix.

Related