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

Warning/error: "No SOURCES given to Zephyr library:"

Hi,

I am building my Project in an out-of-tree form and up to this point I solely used Segger Embedded Studio to compile our project. I am using a custom board with an nrf9160. 

Since I now want to use a building pipe line I used the command line "west build" command and found some concerning warnings. Unfortunately I found very little information when searching for these warnings.

C:\Custom_TEST_Application_V1>west build -b TEST_module_ns -p
-- west build: generating a build system
Including boilerplate (Zephyr base (cached)): C:/ncs/v1.7.1/zephyr/cmake/app/boilerplate.cmake
CMake Deprecation Warning at C:/ncs/v1.7.1/zephyr/cmake/app/boilerplate.cmake:37 (cmake_policy):
  The OLD behavior for policy CMP0079 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  C:/ncs/v1.7.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  C:/ncs/v1.7.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate)
  CMakeLists.txt:12 (find_package)


-- Application: C:/Custom_TEST_Application_V1
-- Using NCS Toolchain 1.7.1 for building. (C:/ncs/v1.7.1/toolchain/cmake)
-- Zephyr version: 2.6.99 (C:/ncs/v1.7.1/zephyr), build: v2.6.99-ncs1-1
-- Found Python3: C:/ncs/v1.7.1/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Found west (found suitable version "0.11.1", minimum required is "0.7.1")
-- Board: TEST_module_ns
-- Cache files will be written to: C:/ncs/v1.7.1/zephyr/.cache
-- Found dtc: C:/ncs/v1.7.1/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (C:/ncs/v1.7.1/toolchain/opt)
-- Found BOARD.dts: C:/Custom_TEST_Application_V1/boards/arm/TEST_module/TEST_module_ns.dts
-- Generated zephyr.dts: C:/Custom_TEST_Application_V1/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: C:/Custom_TEST_Application_V1/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: C:/Custom_TEST_Application_V1/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: C:/Custom_TEST_Application_V1/build/zephyr/dts.cmake
Parsing C:/Custom_TEST_Application_V1/Kconfig
Loaded configuration 'C:/Custom_TEST_Application_V1/boards/arm/TEST_module/TEST_module_ns_defconfig'
Merged configuration 'C:/Custom_TEST_Application_V1/prj.conf'
Configuration saved to 'C:/Custom_TEST_Application_V1/build/zephyr/.config'
Kconfig header saved to 'C:/Custom_TEST_Application_V1/build/zephyr/include/generated/autoconf.h'

warning: I2C_1 (defined at drivers/i2c/Kconfig.esp32:18) was assigned the value 'y' but got the
value 'n'. Check these unsatisfied dependencies: I2C_ESP32 (=n). See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_I2C_1.html and/or look up I2C_1 in the
menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration Values,
and Kconfig - Tips and Best Practices sections of the manual might be helpful too.

-- 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.7.1/toolchain/opt/bin/arm-none-eabi-gcc.exe
Changed board to secure TEST_module (NOT NS)

=== child image spm -  begin ===
Including boilerplate (Zephyr base): C:/ncs/v1.7.1/zephyr/cmake/app/boilerplate.cmake
CMake Deprecation Warning at C:/ncs/v1.7.1/zephyr/cmake/app/boilerplate.cmake:37 (cmake_policy):
  The OLD behavior for policy CMP0079 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  C:/ncs/v1.7.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  C:/ncs/v1.7.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
  CMakeLists.txt:8 (find_package)

-- Application: C:/ncs/v1.7.1/nrf/samples/spm

-- Using NCS Toolchain 1.7.1 for building. (C:/ncs/v1.7.1/toolchain/cmake)
-- Zephyr version: 2.6.99 (C:/ncs/v1.7.1/zephyr), build: v2.6.99-ncs1-1
-- Found Python3: C:/ncs/v1.7.1/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Found west (found suitable version "0.11.1", minimum required is "0.7.1")
-- Board: TEST_module
-- Cache files will be written to: C:/ncs/v1.7.1/zephyr/.cache
-- Found dtc: C:/ncs/v1.7.1/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (C:/ncs/v1.7.1/toolchain/opt)
-- Found BOARD.dts: C:/Custom_TEST_Application_V1/boards/arm/TEST_module/TEST_module.dts
-- Generated zephyr.dts: C:/Custom_TEST_Application_V1/build/spm/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: C:/Custom_TEST_Application_V1/build/spm/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: C:/Custom_TEST_Application_V1/build/spm/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: C:/Custom_TEST_Application_V1/build/spm/zephyr/dts.cmake
Parsing C:/ncs/v1.7.1/zephyr/Kconfig
Loaded configuration 'C:/Custom_TEST_Application_V1/boards/arm/TEST_module/TEST_module_defconfig'
Merged configuration 'C:/ncs/v1.7.1/nrf/samples/spm/prj.conf'
Merged configuration 'C:/ncs/v1.7.1/nrf/subsys/partition_manager/partition_manager_enabled.conf'
Merged configuration 'C:/Custom_TEST_Application_V1/build/spm/zephyr/misc/generated/extra_kconfig_options.conf'
Configuration saved to 'C:/Custom_TEST_Application_V1/build/spm/zephyr/.config'
Kconfig header saved to 'C:/Custom_TEST_Application_V1/build/spm/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.7.1/toolchain/opt/bin/arm-none-eabi-gcc.exe
CMake Warning (dev) at C:/ncs/v1.7.1/nrfxlib/nrf_security/cmake/extensions.cmake:652:
  Syntax Warning in cmake code at column 32

  Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
  C:/ncs/v1.7.1/nrfxlib/nrf_security/CMakeLists.txt:185 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning at C:/ncs/v1.7.1/zephyr/CMakeLists.txt:718 (message):
  No SOURCES given to Zephyr library:
  ..__..__..__Custom_TEST_Application_V1__boards__arm__TEST_module

  Excluding target from build.


CMake Warning at C:/ncs/v1.7.1/zephyr/CMakeLists.txt:1612 (message):
  __ASSERT() statements are globally ENABLED


-- Configuring done
-- Generating done
-- Build files have been written to: C:/Custom_TEST_Application_V1/build/spm
=== child image spm -  end ===

Changed board to secure TEST_module (NOT NS)

=== child image mcuboot -  begin ===
Including boilerplate (Zephyr base): C:/ncs/v1.7.1/zephyr/cmake/app/boilerplate.cmake
CMake Deprecation Warning at C:/ncs/v1.7.1/zephyr/cmake/app/boilerplate.cmake:37 (cmake_policy):
  The OLD behavior for policy CMP0079 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  C:/ncs/v1.7.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  C:/ncs/v1.7.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
-- Application: C:/ncs/v1.7.1/bootloader/mcuboot/boot/zephyr
  CMakeLists.txt:44 (find_package)


-- Using NCS Toolchain 1.7.1 for building. (C:/ncs/v1.7.1/toolchain/cmake)
-- Zephyr version: 2.6.99 (C:/ncs/v1.7.1/zephyr), build: v2.6.99-ncs1-1
-- Found Python3: C:/ncs/v1.7.1/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Found west (found suitable version "0.11.1", minimum required is "0.7.1")
-- Board: TEST_module
-- Cache files will be written to: C:/ncs/v1.7.1/zephyr/.cache
-- Found dtc: C:/ncs/v1.7.1/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (C:/ncs/v1.7.1/toolchain/opt)
-- Found BOARD.dts: C:/Custom_TEST_Application_V1/boards/arm/TEST_module/TEST_module.dts
-- Found devicetree overlay: C:/ncs/v1.7.1/bootloader/mcuboot/boot/zephyr/dts.overlay
-- Generated zephyr.dts: C:/Custom_TEST_Application_V1/build/mcuboot/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: C:/Custom_TEST_Application_V1/build/mcuboot/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: C:/Custom_TEST_Application_V1/build/mcuboot/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: C:/Custom_TEST_Application_V1/build/mcuboot/zephyr/dts.cmake

warning: CONSOLE_HANDLER (defined at drivers/console/Kconfig:39) was assigned the value 'y' but got
the value 'n'. Check these unsatisfied dependencies: UART_CONSOLE (=n). See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_CONSOLE_HANDLER.html and/or look up
CONSOLE_HANDLER in the menuconfig/guiconfig interface. The Application Development Primer, Setting
Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
too.

Parsing C:/ncs/v1.7.1/bootloader/mcuboot/boot/zephyr/Kconfig
Loaded configuration 'C:/Custom_TEST_Application_V1/boards/arm/TEST_module/TEST_module_defconfig'
Merged configuration 'C:/ncs/v1.7.1/bootloader/mcuboot/boot/zephyr/prj.conf'
Merged configuration 'C:/Custom_TEST_Application_V1/mcuboot.conf'
Configuration saved to 'C:/Custom_TEST_Application_V1/build/mcuboot/zephyr/.config'
Kconfig header saved to 'C:/Custom_TEST_Application_V1/build/mcuboot/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.7.1/toolchain/opt/bin/arm-none-eabi-gcc.exe
CMake Warning at C:/ncs/v1.7.1/zephyr/CMakeLists.txt:718 (message):
  No SOURCES given to Zephyr library:
  ..__..__..__Custom_TEST_Application_V1__boards__arm__TEST_module

  Excluding target from build.


MCUBoot bootloader key file: C:/Custom-TEST-module/src/Custom_TEST_Application_V1/KeyFiles/TEST_private_key.pem
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Custom_TEST_Application_V1/build/mcuboot
=== child image mcuboot -  end ===

CMake Warning at C:/ncs/v1.7.1/zephyr/CMakeLists.txt:718 (message):
  No SOURCES given to Zephyr library:
  ..__..__..__Custom_TEST_Application_V1__boards__arm__TEST_module

  Excluding target from build.


Dropping partition 'nrf_modem_lib_trace' since its size is 0.
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Custom_TEST_Application_V1/build
-- west build: building application

The concerning building warnings are:

CMake Warning at C:/ncs/v1.7.1/zephyr/CMakeLists.txt:718 (message):
No SOURCES given to Zephyr library:
..__..__..__Custom_TEST_Application_V1__boards__arm__TEST_module

Excluding target from build.

It seams that some of the supplied files are not recognized and the tool chain just ignores them.
To test if these warnings are the result of an out-of-tree build the hello_world sample was also build in an out-of-tree fashion with the nrf9160dk board files and the warnings did not appear.

I hope that someone can help me to solve these warnings or had similar problems.

Please let me know if additional files are needed for the problem analysis and I will try to provide them.

Best regards,

Andreas

Parents Reply Children
Related