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?
    Fullscreen
    1
    2
    3
    4
    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.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


  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.
    Fullscreen
    1
    Changed board to secure nrf5340dk_nrf5340_cpuapp (NOT NS)
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
> Executing task: nRF Connect: Build TestApp1/build (active) <
Building TestApp1
west build --build-dir c:\nordicApps\TestApp1\build c:\nordicApps\TestApp1 --pristine --board nrf5340dk_nrf5340_cpuappns -- -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DCONFIG_DEBUG_OPTIMIZATIONS:STRING="y" -DCONFIG_OPENOCD_SUPPORT:STRING="y" -DCONF_FILE:STRING="c:/nordicApps/TestApp1/prj.conf"
-- west build: generating a build system
Including boilerplate (Zephyr base): C:/Nordic/v1.6.1/zephyr/cmake/app/boilerplate.cmake
-- Application: C:/nordicApps/TestApp1
-- Zephyr version: 2.6.0-rc1 (C:/Nordic/v1.6.1/zephyr), build: v2.6.0-rc1-ncs1
-- Found Python3: C:/Nordic/v1.6.1/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Found west (found suitable version "0.11.0", minimum required is "0.7.1")
-- Board: nrf5340dk_nrf5340_cpuappns
-- Cache files will be written to: C:/Nordic/v1.6.1/zephyr/.cache
-- Found dtc: C:/Nordic/v1.6.1/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (c:/Nordic/v1.6.1/toolchain/opt)
-- Found BOARD.dts: C:/Nordic/v1.6.1/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuappns.dts
-- Generated zephyr.dts: C:/nordicApps/TestApp1/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: C:/nordicApps/TestApp1/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: C:/nordicApps/TestApp1/build/zephyr/include/generated/device_extern.h
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
3201.TestApp1.zip