No SOURCES given to Zephyr library

We have a custom nRF9160 board in a dedicated directory (out-of-tree board). It is a near copy of the nrf9160dk_nrf9160 folder with hardware changes and additions.We are now trying to implement Serial LTE Modem with the custom board in the build configuration but is not compiling giving the error:

No SOURCES given to Zephyr library: drivers__console

Excluding target from build.

When building for the nrf9160dk_nrf9160_ns there are no errors.

I went over the files several times and do not see the difference but there must be something.

My compilin log:

nrf_custom_log.zip

My board folder:

nrf9160_sica_b1.zip

My project:

3618.serial_lte_modem.zip

Sorry but I have spent hours and cannot see the difference.

Thanks for your help!

Alex

Parents
  • Hi Alex,

    I did copy and rename to your files in the following way.

    nrf9160dk_nrf9160->custom_board_nrf9160

    NRF9160DK_NRF9160->CUSTOM_BOARD_NRF9160

    I got the following custom board configuration.

    5488.custom_board_nrf9160.zip

    In the SLM board folder, do same and get the following files.

    custom_board_nrf9160_ns.overlay

    custom_board_nrf9160_ns.conf

    I have no problem to build the project.

    Building ncs261_serial_lte_modem
    west build --build-dir /opt/nordic/ncs/myapps/ncs261_serial_lte_modem/build /opt/nordic/ncs/myapps/ncs261_serial_lte_modem --pristine --board custom_board_nrf9160_ns -- -DNCS_TOOLCHAIN_VERSION=NONE -DBOARD_ROOT=/opt/nordic/ncs/myapps;/opt/nordic/ncs/myapps/ncs261_serial_lte_modem
    
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: /opt/nordic/ncs/myapps/ncs261_serial_lte_modem
    -- CMake version: 3.21.0
    -- Found Python3: /opt/nordic/ncs/toolchains/580e4ef81c/opt/[email protected]/bin/python3.9 (found suitable version "3.9.6", minimum required is "3.8") found components: Interpreter 
    -- Cache files will be written to: /Users/cs/Library/Caches/zephyr
    -- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: custom_board_nrf9160_ns, Revision: 0.14.0
    -- Found host-tools: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk)
    -- Found Dtc: /opt/nordic/ncs/toolchains/580e4ef81c/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6") 
    -- Found BOARD.dts: /opt/nordic/ncs/myapps/boards/arm/custom_board_nrf9160/custom_board_nrf9160_ns.dts
    -- Found devicetree overlay: /opt/nordic/ncs/myapps/boards/arm/custom_board_nrf9160/custom_board_nrf9160_ns_0_14_0.overlay
    -- Found devicetree overlay: /opt/nordic/ncs/myapps/ncs261_serial_lte_modem/boards/custom_board_nrf9160_ns.overlay
    -- Generated zephyr.dts: /opt/nordic/ncs/myapps/ncs261_serial_lte_modem/build/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /opt/nordic/ncs/myapps/ncs261_serial_lte_modem/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /opt/nordic/ncs/myapps/ncs261_serial_lte_modem/build/zephyr/dts.cmake
    
    warning: Experimental symbol TFTP_LIB is enabled.
    
    
    warning: Experimental symbol HTTP_CLIENT is enabled.
    
    Parsing /opt/nordic/ncs/myapps/ncs261_serial_lte_modem/Kconfig
    Loaded configuration '/opt/nordic/ncs/myapps/boards/arm/custom_board_nrf9160/custom_board_nrf9160_ns_defconfig'
    Merged configuration '/opt/nordic/ncs/myapps/ncs261_serial_lte_modem/prj.conf'
    Merged configuration '/opt/nordic/ncs/myapps/ncs261_serial_lte_modem/boards/custom_board_nrf9160_ns.conf'
    Configuration saved to '/opt/nordic/ncs/myapps/ncs261_serial_lte_modem/build/zephyr/.config'
    Kconfig header saved to '/opt/nordic/ncs/myapps/ncs261_serial_lte_modem/build/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: /opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (found version "2.38") 
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- Found Python3: /opt/nordic/ncs/toolchains/580e4ef81c/opt/[email protected]/bin/python3.9 (found version "3.9.6") found components: Interpreter 
    Changed board to secure custom_board_nrf9160 (NOT NS)
    
    === child image mcuboot -  begin ===
    loading initial cache file /opt/nordic/ncs/myapps/ncs261_serial_lte_modem/build/mcuboot/child_image_preload.cmake
    Loading Zephyr default modules (Zephyr base).
    -- Application: /opt/nordic/ncs/v2.6.1/bootloader/mcuboot/boot/zephyr
    -- CMake version: 3.21.0
    -- Found Python3: /opt/nordic/ncs/toolchains/580e4ef81c/opt/[email protected]/bin/python3.9 (found suitable version "3.9.6", minimum required is "3.8") found components: Interpreter 
    -- Cache files will be written to: /Users/cs/Library/Caches/zephyr
    -- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: custom_board_nrf9160, Revision: 0.14.0
    -- Found host-tools: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk)
    -- Found Dtc: /opt/nordic/ncs/toolchains/580e4ef81c/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6") 
    -- Found BOARD.dts: /opt/nordic/ncs/myapps/boards/arm/custom_board_nrf9160/custom_board_nrf9160.dts
    -- Found devicetree overlay: /opt/nordic/ncs/myapps/boards/arm/custom_board_nrf9160/custom_board_nrf9160_0_14_0.overlay
    -- Found devicetree overlay: /opt/nordic/ncs/v2.6.1/bootloader/mcuboot/boot/zephyr/app.overlay
    -- Generated zephyr.dts: /opt/nordic/ncs/myapps/ncs261_serial_lte_modem/build/mcuboot/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /opt/nordic/ncs/myapps/ncs261_serial_lte_modem/build/mcuboot/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /opt/nordic/ncs/myapps/ncs261_serial_lte_modem/build/mcuboot/zephyr/dts.cmake
    Parsing /opt/nordic/ncs/v2.6.1/bootloader/mcuboot/boot/zephyr/Kconfig
    Loaded configuration '/opt/nordic/ncs/myapps/boards/arm/custom_board_nrf9160/custom_board_nrf9160_defconfig'
    Merged configuration '/opt/nordic/ncs/v2.6.1/bootloader/mcuboot/boot/zephyr/prj.conf'
    Merged configuration '/opt/nordic/ncs/v2.6.1/nrf/modules/mcuboot/tfm.conf'
    Merged configuration '/opt/nordic/ncs/v2.6.1/nrf/modules/mcuboot/fih_low_enable.conf'
    Merged configuration '/opt/nordic/ncs/v2.6.1/nrf/subsys/partition_manager/partition_manager_enabled.conf'
    Merged configuration '/opt/nordic/ncs/myapps/ncs261_serial_lte_modem/child_image/mcuboot.conf'
    Merged configuration '/opt/nordic/ncs/myapps/ncs261_serial_lte_modem/build/mcuboot/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to '/opt/nordic/ncs/myapps/ncs261_serial_lte_modem/build/mcuboot/zephyr/.config'
    Kconfig header saved to '/opt/nordic/ncs/myapps/ncs261_serial_lte_modem/build/mcuboot/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: /opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (found version "2.38") 
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- Using ccache: /opt/nordic/ncs/toolchains/580e4ef81c/bin/ccache
    CMake Warning at /opt/nordic/ncs/v2.6.1/zephyr/CMakeLists.txt:862 (message):
      No SOURCES given to Zephyr library: drivers__console
    
      Excluding target from build.
    
    
    MCUBoot bootloader key file: /opt/nordic/ncs/v2.6.1/bootloader/mcuboot/root-ec-p256.pem
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /opt/nordic/ncs/myapps/ncs261_serial_lte_modem/build/mcuboot
    === child image mcuboot -  end ===
    
    CMake Warning at /opt/nordic/ncs/v2.6.1/nrf/modules/mcuboot/CMakeLists.txt:382 (message):
      
    
              ---------------------------------------------------------
              --- WARNING: Using default MCUBoot key, it should not ---
              --- be used for production.                           ---
              ---------------------------------------------------------
              
    
    
    
    -- Using ccache: /opt/nordic/ncs/toolchains/580e4ef81c/bin/ccache
    CMake Warning at /opt/nordic/ncs/v2.6.1/nrf/cmake/partition_manager.cmake:79 (message):
      
    
              ---------------------------------------------------------------------
              --- WARNING: Using a bootloader without pm_static.yml.            ---
              --- There are cases where a deployed product can consist of       ---
              --- multiple images, and only a subset of these images can be     ---
              --- upgraded through a firmware update mechanism. In such cases,  ---
              --- the upgradable images must have partitions that are static    ---
              --- and are matching the partition map used by the bootloader     ---
              --- programmed onto the device.                                   ---
              ---------------------------------------------------------------------
              
    
    Call Stack (most recent call first):
      /opt/nordic/ncs/v2.6.1/zephyr/cmake/modules/kernel.cmake:248 (include)
      /opt/nordic/ncs/v2.6.1/zephyr/cmake/modules/zephyr_default.cmake:138 (include)
      /opt/nordic/ncs/v2.6.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      /opt/nordic/ncs/v2.6.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      CMakeLists.txt:9 (find_package)
    
    
    Dropping partition 'nrf_modem_lib_trace' since its size is 0.
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /opt/nordic/ncs/myapps/ncs261_serial_lte_modem/build
    -- west build: building application
    [1/400] Preparing syscall dependency handling
    
    [1/180] Preparing syscall dependency handling
    
    [4/180] Generating include/generated/version.h
    -- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr), build: v3.5.99-ncs1-1
    [180/180] Linking C executable zephyr/zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       30924 B        48 KB     62.92%
                 RAM:       16336 B        32 KB     49.85%
            IDT_LIST:          0 GB        32 KB      0.00%
    [9/400] Generating include/generated/version.h
    -- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr), build: v3.5.99-ncs1-1
    [14/400] Generating ../../tfm/CMakeCache.txt
    CMake Warning at cmake/version.cmake:22 (message):
      Actual TF-M version is not available from Git repository.  Settled to
      v2.0.0
    Call Stack (most recent call first):
      CMakeLists.txt:22 (include)
    
    
    -- Found Git: /opt/nordic/ncs/toolchains/580e4ef81c/bin/git (found version "2.37.3") 
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- Found Python3: /opt/nordic/ncs/toolchains/580e4ef81c/opt/[email protected]/bin/python3.9 (found version "3.9.6") found components: Interpreter 
    CMake Deprecation Warning at /opt/nordic/ncs/v2.6.1/zephyr/cmake/modules/FindDeprecated.cmake:121 (message):
      'PYTHON_PREFER' variable is deprecated.  Please use Python3_EXECUTABLE
      instead.
    Call Stack (most recent call first):
      /opt/nordic/ncs/v2.6.1/zephyr/cmake/modules/python.cmake:16 (find_package)
      /opt/nordic/ncs/v2.6.1/zephyr/cmake/modules/user_cache.cmake:30 (include)
      /opt/nordic/ncs/v2.6.1/zephyr/cmake/modules/extensions.cmake:5 (include)
      /opt/nordic/ncs/v2.6.1/nrf/subsys/nrf_security/tfm/CMakeLists.txt:38 (include)
    
    
    -- Found Python3: /opt/nordic/ncs/toolchains/580e4ef81c/opt/[email protected]/bin/python3.9 (found suitable version "3.9.6", minimum required is "3.8") found components: Interpreter 
    -- Cache files will be written to: /Users/cs/Library/Caches/zephyr
    -- Configuring done
    -- Generating done
    CMake Warning:
      Manually-specified variables were not used by the project:
    
        CRYPTO_RNG_MODULE_ENABLED
        MBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE
        PYTHON_PREFER
    
    
    -- Build files have been written to: /opt/nordic/ncs/myapps/ncs261_serial_lte_modem/build/tfm
    [168/172] Linking C executable bin/tfm_s.axf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       31592 B      32256 B     97.94%
                 RAM:       14392 B        32 KB     43.92%
    [25/400] Performing install step for 'tfm'
    -- Install configuration: "MinSizeRel"
    ----- Installing platform NS -----
    [391/400] Linking C executable zephyr/zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:      228916 B       416 KB     53.74%
                 RAM:      101288 B     211608 B     47.87%
            IDT_LIST:          0 GB        32 KB      0.00%
    [395/400] Generating ../../zephyr/app_update.bin
    image.py: sign the payload
    [397/400] Generating ../../zephyr/app_signed.hex
    image.py: sign the payload
    [398/400] Generating ../../zephyr/app_test_update.hex
    image.py: sign the payload
    [400/400] Generating zephyr/merged.hex
     *  Terminal will be reused by tasks, press any key to close it. 
    

    Best regards,

    Charlie

  • Hi Charlie,

    I followed your steps and I'm able to compile but I got some weird warnings that I don't understand, here is the compiling log:

    custom_log_3.zip

    Other problem is when I flashed my custom board I can't communicate my stm32 micro with the nrf9160 module via uart.. but when I flashed my nrf9160DK with this build I can communicate using terminal through FTDI wire put in the same uart pins..

    Here is the schematic of my custom board:

    schematic_custom_board.zip

    is something wrong in the design?

    thanks for your help!

    Regards, Alex

  • Hi Alex, 
    Charlie is out of office for a few days. I will take over in the mean time. 
    Could you please upload a higher resolution of the schematic ? Preferably as pdf file instead of png. 

    Please give more info about the code Charlie provided. Besides the warnings do you have any issue , does it work as it should ? 

  • Hi Hung, 

    thanks for your response. Here si the full schematic:

    DFR8RAILOG_WNODE_v0.pdf

    The solution that Charlie provided working with the nrf9160DK but not with my Custom board. I'm trying to communicate the nrf9160 SIP with STM32 MCU via uart2 but is not working and I think there something that I'm missing..

    Here are my custom board files:

    2273.nrf9160_sica_b1.zip

    0844.custom_board_nrf9160_ns.conf

    6283.custom_board_nrf9160_ns.overlay

    I need to do a field test using nrf9160 LTE communications next week, so I appreciate any help.

    Regards, 

    Alex

  • Hi Alex, 

    Have you verified that there is no problem with the hardware ? 

    Have you tried to toggle the uart2 pins as GPIO pins ? Just do a quick test if you can change the level of the pins. 

    If it work, please try to test with a simple UART sample and use a logic analyzer to check if you have correct UART output on the pins. 
    After that you can start to try testing with the serial lte modem sample. 

Reply
  • Hi Alex, 

    Have you verified that there is no problem with the hardware ? 

    Have you tried to toggle the uart2 pins as GPIO pins ? Just do a quick test if you can change the level of the pins. 

    If it work, please try to test with a simple UART sample and use a logic analyzer to check if you have correct UART output on the pins. 
    After that you can start to try testing with the serial lte modem sample. 

Children
No Data
Related