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

nRF connect-VS code error for nRF5340DK

Executing task: nRF Connect: Generate config bl5340_dvk_cpuapp for d:\VSCodePrograms\broadcaster <

Building broadcaster
west build --build-dir d:\VSCodePrograms\broadcaster\build d:\VSCodePrograms\broadcaster --pristine --board bl5340_dvk_cpuapp -- -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DBOARD_ROOT:STRING="d:/VSCodePrograms/broadcaster" -DBOARD_ROOT:STRING="d:/VSCodePrograms/broadcaster"

-- west build: generating a build system
Including boilerplate (Zephyr base): C:/ncs/v1.9.1/zephyr/cmake/app/boilerplate.cmake
-- Application: D:/VSCodePrograms/broadcaster
-- Zephyr version: 2.7.99 (C:/ncs/v1.9.1/zephyr), build: v2.7.99-ncs1-1
-- Found Python3: C:/ncs/v1.9.1/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
-- Board: bl5340_dvk_cpuapp
-- Cache files will be written to: C:/ncs/v1.9.1/zephyr/.cache
-- Found dtc: C:/ncs/v1.9.1/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (c:/ncs/v1.9.1/toolchain/opt)
-- Found BOARD.dts: C:/ncs/v1.9.1/zephyr/boards/arm/bl5340_dvk/bl5340_dvk_cpuapp.dts
-- Generated zephyr.dts: D:/VSCodePrograms/broadcaster/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: D:/VSCodePrograms/broadcaster/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: D:/VSCodePrograms/broadcaster/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: D:/VSCodePrograms/broadcaster/build/zephyr/dts.cmake
Parsing C:/ncs/v1.9.1/zephyr/Kconfig
Loaded configuration 'C:/ncs/v1.9.1/zephyr/boards/arm/bl5340_dvk/bl5340_dvk_cpuapp_defconfig'
Merged configuration 'D:/VSCodePrograms/broadcaster/prj.conf'
Configuration saved to 'D:/VSCodePrograms/broadcaster/build/zephyr/.config'
Kconfig header saved to 'D:/VSCodePrograms/broadcaster/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: C:/ncs/v1.9.1/toolchain/opt/bin/arm-none-eabi-gcc.exe

=== child image hci_rpmsg - CPUNET begin ===
loading initial cache file D:/VSCodePrograms/broadcaster/build/hci_rpmsg/child_image_preload.cmake
Including boilerplate (Zephyr base): C:/ncs/v1.9.1/zephyr/cmake/app/boilerplate.cmake
-- Application: C:/ncs/v1.9.1/zephyr/samples/bluetooth/hci_rpmsg
-- Zephyr version: 2.7.99 (C:/ncs/v1.9.1/zephyr), build: v2.7.99-ncs1-1
-- Found Python3: C:/ncs/v1.9.1/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
-- Board: bl5340_dvk_cpunet
-- Cache files will be written to: C:/ncs/v1.9.1/zephyr/.cache
-- Found dtc: C:/ncs/v1.9.1/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (c:/ncs/v1.9.1/toolchain/opt)
-- Found BOARD.dts: C:/ncs/v1.9.1/zephyr/boards/arm/bl5340_dvk/bl5340_dvk_cpunet.dts
-- Generated zephyr.dts: D:/VSCodePrograms/broadcaster/build/hci_rpmsg/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: D:/VSCodePrograms/broadcaster/build/hci_rpmsg/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: D:/VSCodePrograms/broadcaster/build/hci_rpmsg/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: D:/VSCodePrograms/broadcaster/build/hci_rpmsg/zephyr/dts.cmake
Parsing C:/ncs/v1.9.1/zephyr/Kconfig
Loaded configuration 'C:/ncs/v1.9.1/zephyr/boards/arm/bl5340_dvk/bl5340_dvk_cpunet_defconfig'
Merged configuration 'C:/ncs/v1.9.1/zephyr/samples/bluetooth/hci_rpmsg/prj.conf'
Merged configuration 'C:/ncs/v1.9.1/nrf/subsys/partition_manager/partition_manager_enabled.conf'
Configuration saved to 'D:/VSCodePrograms/broadcaster/build/hci_rpmsg/zephyr/.config'
Kconfig header saved to 'D:/VSCodePrograms/broadcaster/build/hci_rpmsg/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: C:/ncs/v1.9.1/toolchain/opt/bin/arm-none-eabi-gcc.exe
-- Build type:
-- Host: Windows/AMD64
-- Target: Generic/arm
-- Machine: arm
-- libmetal version: 1.1.0 (C:/ncs/v1.9.1/zephyr/samples/bluetooth/hci_rpmsg)
-- Looking for include file stdatomic.h
-- Looking for include file stdatomic.h - found
-- open-amp version: 1.1.0 (C:/ncs/v1.9.1/modules/lib/open-amp/open-amp)
-- Host: Windows/AMD64
-- Target: Generic/arm
-- Machine: arm
-- C_FLAGS : -Wall -Wextra
-- Looking for include file fcntl.h
-- Looking for include file fcntl.h - found
CMake Warning at C:\ncs\v1.9.1\nrfxlib\softdevice_controller\CMakeLists.txt:29 (message):
No SoftDevice Controller variant selected


-- Configuring done
-- Generating done
-- Build files have been written to: D:/VSCodePrograms/broadcaster/build/hci_rpmsg
=== child image hci_rpmsg - CPUNET end ===

-- libmetal version: 1.1.0 (D:/VSCodePrograms/broadcaster)
-- Build type:
-- Host: Windows/AMD64
-- Target: Generic/arm
-- Machine: arm
-- Looking for include file stdatomic.h
-- Looking for include file stdatomic.h - found
-- open-amp version: 1.1.0 (C:/ncs/v1.9.1/modules/lib/open-amp/open-amp)
-- Host: Windows/AMD64
-- Target: Generic/arm
-- Machine: arm
-- C_FLAGS : -Wall -Wextra
-- Looking for include file fcntl.h
-- Looking for include file fcntl.h - found
-- Configuring done
-- Generating done
-- Build files have been written to: D:/VSCodePrograms/broadcaster/build
-- west build: building application
[1/244] Creating directories for 'hci_rpmsg_subimage'
[2/244] No download step for 'hci_rpmsg_subimage'
[3/244] No update step for 'hci_rpmsg_subimage'
[4/244] No patch step for 'hci_rpmsg_subimage'
[5/244] No configure step for 'hci_rpmsg_subimage'
[5/244] Performing build step for 'hci_rpmsg_subimage'
[6/244] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json
FAILED: modules/nrf/samples/hci_rpmsg_subimage-prefix/src/hci_rpmsg_subimage-stamp/hci_rpmsg_subimage-build hci_rpmsg/zephyr/zephyr.hex hci_rpmsg/zephyr/zephyr.elf hci_rpmsg/zephyr/merged_CPUNET.hex
cmd.exe /C "cd /D D:\VSCodePrograms\broadcaster\build\hci_rpmsg && C:\ncs\v1.9.1\toolchain\opt\bin\cmake.exe --build . --"
[8/244] Generating include/generated/driver-validation.h
[9/244] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h, include/generated/otype-to-size.h
ninja: error: 'C:/ncs/v1.9.1/nrfxlib/softdevice_controller/lib/cortex-m33+nodsp/soft-float/libsoftdevice_controller_.a', needed by 'zephyr/zephyr_pre0.elf', missing and no known rule to make it
[10/244] Generating include/generated/syscall_dispatch.c, include/generated/syscall_list.h
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'c:\ncs\v1.9.1\toolchain\opt\bin\cmake.EXE' --build 'd:\VSCodePrograms\broadcaster\build'
The terminal process terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

> Executing task: nRF Connect: Generate config nrf5340dk_nrf5340_cpuapp for d:\VSCodePrograms\beacon <

Building beacon
west build --build-dir d:\VSCodePrograms\beacon\build d:\VSCodePrograms\beacon --pristine --board nrf5340dk_nrf5340_cpuapp -- -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DBOARD_ROOT:STRING="d:/VSCodePrograms/broadcaster;d:/VSCodePrograms/beacon"

-- west build: generating a build system
Including boilerplate (Zephyr base): C:/ncs/v1.9.1/zephyr/cmake/app/boilerplate.cmake
-- Application: D:/VSCodePrograms/beacon
-- Zephyr version: 2.7.99 (C:/ncs/v1.9.1/zephyr), build: v2.7.99-ncs1-1
-- Found Python3: C:/ncs/v1.9.1/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
-- Board: nrf5340dk_nrf5340_cpuapp
-- Cache files will be written to: C:/ncs/v1.9.1/zephyr/.cache
-- Found dtc: C:/ncs/v1.9.1/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (c:/ncs/v1.9.1/toolchain/opt)
-- Found BOARD.dts: C:/ncs/v1.9.1/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp.dts
-- Generated zephyr.dts: D:/VSCodePrograms/beacon/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: D:/VSCodePrograms/beacon/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: D:/VSCodePrograms/beacon/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: D:/VSCodePrograms/beacon/build/zephyr/dts.cmake
Parsing C:/ncs/v1.9.1/zephyr/Kconfig
Loaded configuration 'C:/ncs/v1.9.1/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp_defconfig'
Merged configuration 'D:/VSCodePrograms/beacon/prj.conf'
Configuration saved to 'D:/VSCodePrograms/beacon/build/zephyr/.config'
Kconfig header saved to 'D:/VSCodePrograms/beacon/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: C:/ncs/v1.9.1/toolchain/opt/bin/arm-none-eabi-gcc.exe

=== child image hci_rpmsg - CPUNET begin ===
loading initial cache file D:/VSCodePrograms/beacon/build/hci_rpmsg/child_image_preload.cmake
Including boilerplate (Zephyr base): C:/ncs/v1.9.1/zephyr/cmake/app/boilerplate.cmake
-- Application: C:/ncs/v1.9.1/zephyr/samples/bluetooth/hci_rpmsg
-- Zephyr version: 2.7.99 (C:/ncs/v1.9.1/zephyr), build: v2.7.99-ncs1-1
-- Found Python3: C:/ncs/v1.9.1/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
-- Board: nrf5340dk_nrf5340_cpunet
-- Cache files will be written to: C:/ncs/v1.9.1/zephyr/.cache
-- Found dtc: C:/ncs/v1.9.1/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (c:/ncs/v1.9.1/toolchain/opt)
-- Found BOARD.dts: C:/ncs/v1.9.1/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpunet.dts
-- Generated zephyr.dts: D:/VSCodePrograms/beacon/build/hci_rpmsg/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: D:/VSCodePrograms/beacon/build/hci_rpmsg/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: D:/VSCodePrograms/beacon/build/hci_rpmsg/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: D:/VSCodePrograms/beacon/build/hci_rpmsg/zephyr/dts.cmake
Parsing C:/ncs/v1.9.1/zephyr/Kconfig
Loaded configuration 'C:/ncs/v1.9.1/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpunet_defconfig'
Merged configuration 'C:/ncs/v1.9.1/zephyr/samples/bluetooth/hci_rpmsg/prj.conf'
Merged configuration 'C:/ncs/v1.9.1/nrf/subsys/partition_manager/partition_manager_enabled.conf'
Configuration saved to 'D:/VSCodePrograms/beacon/build/hci_rpmsg/zephyr/.config'
Kconfig header saved to 'D:/VSCodePrograms/beacon/build/hci_rpmsg/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: C:/ncs/v1.9.1/toolchain/opt/bin/arm-none-eabi-gcc.exe
-- libmetal version: 1.1.0 (C:/ncs/v1.9.1/zephyr/samples/bluetooth/hci_rpmsg)
-- Build type:
-- Host: Windows/AMD64
-- Target: Generic/arm
-- Machine: arm
-- Looking for include file stdatomic.h
-- Looking for include file stdatomic.h - found
-- open-amp version: 1.1.0 (C:/ncs/v1.9.1/modules/lib/open-amp/open-amp)
-- Host: Windows/AMD64
-- Target: Generic/arm
-- Machine: arm
-- C_FLAGS : -Wall -Wextra
-- Looking for include file fcntl.h
-- Looking for include file fcntl.h - found
CMake Warning at C:\ncs\v1.9.1\nrfxlib\softdevice_controller\CMakeLists.txt:29 (message):
No SoftDevice Controller variant selected


-- Configuring done
-- Generating done
-- Build files have been written to: D:/VSCodePrograms/beacon/build/hci_rpmsg
=== child image hci_rpmsg - CPUNET end ===

-- libmetal version: 1.1.0 (D:/VSCodePrograms/beacon)
-- Build type:
-- Host: Windows/AMD64
-- Target: Generic/arm
-- Machine: arm
-- Looking for include file stdatomic.h
-- Looking for include file stdatomic.h - found
-- open-amp version: 1.1.0 (C:/ncs/v1.9.1/modules/lib/open-amp/open-amp)
-- Host: Windows/AMD64
-- Target: Generic/arm
-- Machine: arm
-- C_FLAGS : -Wall -Wextra
-- Looking for include file fcntl.h
-- Looking for include file fcntl.h - found
-- Configuring done
-- Generating done
-- Build files have been written to: D:/VSCodePrograms/beacon/build
-- west build: building application
[1/238] Creating directories for 'hci_rpmsg_subimage'
[2/238] No download step for 'hci_rpmsg_subimage'
[3/238] No update step for 'hci_rpmsg_subimage'
[4/238] No patch step for 'hci_rpmsg_subimage'
[5/238] No configure step for 'hci_rpmsg_subimage'
[5/238] Performing build step for 'hci_rpmsg_subimage'
[6/238] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json
FAILED: modules/nrf/samples/hci_rpmsg_subimage-prefix/src/hci_rpmsg_subimage-stamp/hci_rpmsg_subimage-build hci_rpmsg/zephyr/zephyr.hex hci_rpmsg/zephyr/zephyr.elf hci_rpmsg/zephyr/merged_CPUNET.hex
cmd.exe /C "cd /D D:\VSCodePrograms\beacon\build\hci_rpmsg && C:\ncs\v1.9.1\toolchain\opt\bin\cmake.exe --build . --"
[8/238] Generating include/generated/driver-validation.h
[9/238] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h, include/generated/otype-to-size.h
ninja: error: 'C:/ncs/v1.9.1/nrfxlib/softdevice_controller/lib/cortex-m33+nodsp/soft-float/libsoftdevice_controller_.a', needed by 'zephyr/zephyr_pre0.elf', missing and no known rule to make it
[10/238] Generating include/generated/syscall_dispatch.c, include/generated/syscall_list.h
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'c:\ncs\v1.9.1\toolchain\opt\bin\cmake.EXE' --build 'd:\VSCodePrograms\beacon\build'
The terminal process terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

I'm getting this error when building sample program broadcaster in VS Code for nRF5340 DK. When building, it is not taking as compatible board. Is sample program nRF5340 compatible? Or any thing missed in installation?

Any support will be appreciated. 

Parents
  • Hello Yashwanth,

    When building, it is not taking as compatible board.

    There might be more boards that are compatible but not listed, as that would be a lot of boards to list. The documentation only says that a working BLE Host is required.

    I'm getting this error when building sample program broadcaster

    Are you getting the same error when building for the 5340DK, or the Qemu?

    Regards,

    Elfving

  • Hello Elfving,

    Thanks for your reply.

    The board I set up for nRF5340 DK is nrf5340dk_nrf5340_cpuapp. I got the error for nRF5340DK.

    Below is actual error from above issue.

    ninja: error: 'C:/ncs/v1.9.1/nrfxlib/softdevice_controller/lib/cortex-m33+nodsp/soft-float/libsoftdevice_controller_.a', needed by 'zephyr/zephyr_pre0.elf', missing and no known rule to make it

    I checked the file path of v1.9.1 installed and found that '/libsoftdevice_controller_.a/ file is missing in ncs folder structure. I renamed file 'libsoftdevice_controller_multirole.a'  to 'libsoftdevice_controller_.a'.

    Then build was successful. Maybe the file missed while download or extraction. I don't know does it impacts in further the code if I renamed it. 

Reply
  • Hello Elfving,

    Thanks for your reply.

    The board I set up for nRF5340 DK is nrf5340dk_nrf5340_cpuapp. I got the error for nRF5340DK.

    Below is actual error from above issue.

    ninja: error: 'C:/ncs/v1.9.1/nrfxlib/softdevice_controller/lib/cortex-m33+nodsp/soft-float/libsoftdevice_controller_.a', needed by 'zephyr/zephyr_pre0.elf', missing and no known rule to make it

    I checked the file path of v1.9.1 installed and found that '/libsoftdevice_controller_.a/ file is missing in ncs folder structure. I renamed file 'libsoftdevice_controller_multirole.a'  to 'libsoftdevice_controller_.a'.

    Then build was successful. Maybe the file missed while download or extraction. I don't know does it impacts in further the code if I renamed it. 

Children
  • Are there any samples that you did manage to build successfully besides this?

    All these builds work from my end, and I also only have the multirole soft device controller file. Interesting that the build was successful after simply renaming it, but I would recommend that you rather try reinstalling the SDK. The different SDCs are not interchangeable.

    Regards,

    Elfving

  • No. I tried to re-install to SDK multiple times. The same error it showed. The SDK when I install, the nrf folder is missing in toolchain folder of SDKs. I copied the v1.9.1 from my colleague Laptop and when renamed the file it worked. I don't know the reason that SDKs installed from Tool chain Manager are missing some folders when I installed. 

  • Yashwanth said:

    ninja: error: 'C:/ncs/v1.9.1/nrfxlib/softdevice_controller/lib/cortex-m33+nodsp/soft-float/libsoftdevice_controller_.a', needed by 'zephyr/zephyr_pre0.elf', missing and no known rule to make it

    Another thing: could you give me the prj.conf file of your broadcaster project, as well as you autoconf.h if you have one? (it should be in the folder  build/zephyr/include/generated/).

    Yashwanth said:
    I don't know the reason that SDKs installed from Tool chain Manager are missing some folders when I installed. 

    So the same error is showing, but additionally that folder is missing? That is strange. I have heard others experiencing the same thing, but simply re-installing fixes it all. The issue might be related to downloading through a VPN or a proxy. 

    Regards,

    Elfving

Related