This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

v1.5.0 MCUboot build fail

Hi,


after migrating functional project to latest ncs version v1.5.0 I managed to build and flash it to nrf52840 board without problems. However if I enable MCUboot option with

CONFIG_BOOTLOADER_MCUBOOT=y

the build fails with the following error:

-- west build: generating a build system
Including boilerplate (Zephyr base): C:/Users/Eva/ncs/v1.5.0/zephyr/cmake/app/boilerplate.cmake
-- Application: C:/Users/Eva/Desktop/testf
-- Using NCS Toolchain 1.5.0 for building. (C:/Users/Eva/ncs/v1.5.0/toolchain/cmake)
-- Zephyr version: 2.4.99 (C:/Users/Eva/ncs/v1.5.0/zephyr)
-- Found Python3: C:/Users/Eva/ncs/v1.5.0/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
-- Found west (found suitable version "0.9.0", minimum required is "0.7.1")
-- Board: elephantedge_nrf52840
-- Cache files will be written to: C:/Users/Eva/ncs/v1.5.0/zephyr/.cache
-- Found dtc: C:/Users/Eva/ncs/v1.5.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (C:/Users/Eva/ncs/v1.5.0/toolchain/opt)
-- Found BOARD.dts: C:/Users/Eva/Desktop/testf/boards/arm/elephantedge_nrf52840/elephantedge_nrf52840.dts
warning: 'has-be32k' is marked as deprecated in 'properties:' in C:/Users/Eva/ncs/v1.5.0/zephyr/dts/bindings\mtd\jedec,spi-nor.yaml for node /soc/spi@40023000/is25lq040b@0.
-- Generated zephyr.dts: C:/Users/Eva/Desktop/testf/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: C:/Users/Eva/Desktop/testf/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: C:/Users/Eva/Desktop/testf/build/zephyr/include/generated/device_extern.h

warning: SERIAL (defined at soc/arm/nxp_lpc/lpc55xxx\Kconfig.defconfig.lpc55S69_cpu1:22,
drivers/serial/Kconfig:6) was assigned the value 'n' but got the value 'y'. See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_SERIAL.html and/or look up SERIAL 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.


warning: BT_CTLR_ADVANCED_FEATURES (defined at subsys/bluetooth/controller/Kconfig.ll_sw_split:106)
was assigned the value 'y' but got the value 'n'. Check these unsatisfied dependencies:
BT_LL_SW_SPLIT (=n). See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_BT_CTLR_ADVANCED_FEATURES.html and/or
look up BT_CTLR_ADVANCED_FEATURES 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.


warning: LOG_IParsing C:/Users/Eva/Desktop/testf/Kconfig
Loaded configuration 'C:/Users/Eva/Desktop/testf/boards/arm/elephantedge_nrf52840/elephantedge_nrf52840_defconfig'
Merged configuration 'C:/Users/Eva/Desktop/testf/prj.conf'
Configuration saved to 'C:/Users/Eva/Desktop/testf/build/zephyr/.config'
Kconfig header saved to 'C:/Users/Eva/Desktop/testf/build/zephyr/include/generated/autoconf.h'
MMEDIATE (defined at subsys/logging/Kconfig:120) was assigned the value 'y' but got
the value 'n'. Check these unsatisfied dependencies: (!LOG_MINIMAL) (=n). See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_LOG_IMMEDIATE.html and/or look up
LOG_IMMEDIATE 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:/Users/Eva/ncs/v1.5.0/toolchain/opt/bin/arm-none-eabi-gcc.exe

=== child image mcuboot -  begin ===
Including boilerplate (Zephyr base): C:/Users/Eva/ncs/v1.5.0/zephyr/cmake/app/boilerplate.cmake
-- Application: C:/Users/Eva/ncs/v1.5.0/bootloader/mcuboot/boot/zephyr
-- Using NCS Toolchain 1.5.0 for building. (C:/Users/Eva/ncs/v1.5.0/toolchain/cmake)
-- Zephyr version: 2.4.99 (C:/Users/Eva/ncs/v1.5.0/zephyr)
-- Found Python3: C:/Users/Eva/ncs/v1.5.0/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
-- Found west (found suitable version "0.9.0", minimum required is "0.7.1")
-- Board: elephantedge_nrf52840
-- Cache files will be written to: C:/Users/Eva/ncs/v1.5.0/zephyr/.cache
-- Found dtc: C:/Users/Eva/ncs/v1.5.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (C:/Users/Eva/ncs/v1.5.0/toolchain/opt)
-- Found BOARD.dts: C:/Users/Eva/Desktop/testf/boards/arm/elephantedge_nrf52840/elephantedge_nrf52840.dts
-- Found devicetree overlay: C:/Users/Eva/Desktop/testf/mcuboot.overlay
-- Found devicetree overlay: C:/Users/Eva/ncs/v1.5.0/bootloader/mcuboot/boot/zephyr/dts.overlay
warning: 'has-be32k' is marked as deprecated in 'properties:' in C:/Users/Eva/ncs/v1.5.0/zephyr/dts/bindings\mtd\jedec,spi-nor.yaml for node /soc/spi@40023000/is25lq040b@0.
-- Generated zephyr.dts: C:/Users/Eva/Desktop/testf/build/mcuboot/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: C:/Users/Eva/Desktop/testf/build/mcuboot/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: C:/Users/Eva/Desktop/testf/build/mcuboot/zephyr/include/generated/device_extern.h

warning: FLASH_JESD216_API (defined at drivers/flash/Kconfig:26) was assigned the value 'y' but got
the value 'n'. Check these unsatisfied dependencies: FLASH_JESD216 (=n). See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_FLASH_JESD216_API.html and/or look up
FLASH_JESD216_API 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.


warning: SPI_NOR (defined at drivers/flash/Kconfig.nor:4) was assigned the value 'y' but got the
value 'n'. Check these unsatisfied dependencies: SPI (=n). See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_SPI_NOR.html and/or look up SPI_NOR 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.


warning: SPI_NOR_IDLE_IN_DPD (defined at drivers/flash/Kconfig.nor:64) wasParsing C:/Users/Eva/ncs/v1.5.0/bootloader/mcuboot/boot/zephyr/Kconfig
 assigned the value 'y'
but got the value 'n'. Check these unsatisfied dependencies: SPI_NOR (=n). See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_SPI_NOR_IDLE_IN_DPD.html and/or look
up SPI_NOR_IDLE_IN_DPD 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.


warning: LIS2DH (defined at drivers/sensor/lis2dh/Kconfig:6) was assigned the value 'y' but got the
value 'n'. Check these unsatisfied dependencies: (I2C || SPI) (=n), SENSOR (=n). See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_LIS2DH.html and/or look up LIS2DH 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.


Loaded configuration 'C:/Users/Eva/Desktop/testf/boards/arm/elephantedge_nrf52840/elephantedge_nrf52840_defconfig'
Merged configuration 'C:/Users/Eva/ncs/v1.5.0/bootloader/mcuboot/boot/zephyr/prj.conf'
Merged configuration 'C:/Users/Eva/ncs/v1.5.0/nrf/subsys/partition_manager/partition_manager_enabled.conf'
Configuration saved to 'C:/Users/Eva/Desktop/testf/build/mcuboot/zephyr/.config'
Kconfig header saved to 'C:/Users/Eva/Desktop/testf/build/mcuboot/zephyr/include/generated/autoconf.h'
warning: LIS2DW12 (defined at drivers/sensor/lis2dw12/Kconfig:6) was assigned the value 'y' but got
the value 'n'. Check these unsatisfied dependencies: (I2C || SPI) (=n), SENSOR (=n). See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_LIS2DW12.html and/or look up LIS2DW12
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.


warning: LIS2DW12_POWER_MODE (defined at drivers/sensor/lis2dw12/Kconfig:215) was assigned the value
'3' but got the value ''. Check these unsatisfied dependencies: LIS2DW12 (=n), SENSOR (=n). See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_LIS2DW12_POWER_MODE.html and/or look
up LIS2DW12_POWER_MODE 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.


warning: LIS2MDL (defined at drivers/sensor/lis2mdl/Kconfig:4) was assigned the value 'y' but got
the value 'n'. Check these unsatisfied dependencies: (I2C || SPI) (=n), SENSOR (=n). See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_LIS2MDL.html and/or look up LIS2MDL 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.


warning: LSM6DSL (defined at drivers/sensor/lsm6dsl/Kconfig:7) was assigned the value 'y' but got
the value 'n'. Check these unsatisfied dependencies: (I2C || SPI) (=n), SENSOR (=n). See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_LSM6DSL.html and/or look up LSM6DSL 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.


warning: The choice symbol LIS2DW12_ACCEL_RANGE_8G (defined at drivers/sensor/lis2dw12/Kconfig:172)
was selected (set =y), but no symbol ended up as the choice selection. See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_LIS2DW12_ACCEL_RANGE_8G.html and/or
look up LIS2DW12_ACCEL_RANGE_8G 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.


warning: The choice symbol LIS2MDL_TRIGGER_NONE (defined at drivers/sensor/lis2mdl/Kconfig:20) was
selected (set =y), but no symbol ended up as the choice selection. See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_LIS2MDL_TRIGGER_NONE.html and/or look
up LIS2MDL_TRIGGER_NONE 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:/Users/Eva/ncs/v1.5.0/toolchain/opt/bin/arm-none-eabi-gcc.exe
CMake Warning at C:/Users/Eva/ncs/v1.5.0/nrf/lib/flash_patch/CMakeLists.txt:9 (message):
  

        ----------------------------------------------------------
        --- WARNING: To maintain the integrity of secure boot, ---
        --- enable CONFIG_DISABLE_FLASH_PATCH in production.   ---
        ----------------------------------------------------------


CMake Warning at C:/Users/Eva/ncs/v1.5.0/zephyr/kernel/CMakeLists.txt:59 (message):
  Single threaded mode (CONFIG_MULTITHREADING=n) is deprecated


MCUBoot bootloader key file: C:/Users/Eva/ncs/v1.5.0/bootloader/mcuboot/root-ec-p256.pem
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Eva/Desktop/testf/build/mcuboot
=== child image mcuboot -  end ===

CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/ExternalProject.cmake:3012 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.17/Modules/ExternalProject.cmake:3270 (_ep_add_configure_command)
  C:/Users/Eva/ncs/v1.5.0/nrf/cmake/multi_image.cmake:308 (ExternalProject_Add)
  C:/Users/Eva/ncs/v1.5.0/nrf/cmake/multi_image.cmake:84 (add_child_image_from_source)
  C:/Users/Eva/ncs/v1.5.0/nrf/modules/mcuboot/CMakeLists.txt:112 (add_child_image)


CMake Warning at C:/Users/Eva/ncs/v1.5.0/nrf/modules/mcuboot/CMakeLists.txt:151 (message):


        ---------------------------------------------------------
        --- WARNING: Using default MCUBoot key, it should not ---
        --- be used for production.                           ---
        ---------------------------------------------------------




CMake Warning at C:/Users/Eva/ncs/v1.5.0/zephyr/CMakeLists.txt:1357 (message):
  __ASSERT() statements are globally ENABLED


-- Configuring incomplete, errors occurred!
See also "C:/Users/Eva/Desktop/testf/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Eva/Desktop/testf/build/CMakeFiles/CMakeError.log".
FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' '-DWEST_PYTHON=c:\python38\python.exe' '-BC:\Users\Eva\Desktop\testf\build' '-SC:\Users\Eva\Desktop\testf' -GNinja -DBOARD=elephantedge_nrf52840

Let me know if you have an idea what could cause that behaviour.

Best, Eva

Parents
  • I did manage to get the build working by moving project folder closer to C and manually updating Cmake to the latest version.

    However I still run into problems when trying to perform build command in my standard folder:

    CMake Warning in C:/Users/Eva/ncs/v1.5.0/bootloader/mcuboot/boot/bootutil/zephyr/CMakeLists.txt:
      The object file directory
    
        C:/Users/XXX/build/modules/mcuboot/boot/bootutil/zephyr/CMakeFiles/..__bootloader__mcuboot__boot__bootutil__zephyr.dir/./  
      has 211 characters.  The maximum full path to an object file is 250
      characters (see CMAKE_OBJECT_PATH_MAX).  Object file
    
        C_/Users/Eva/ncs/v1.5.0/bootloader/mcuboot/boot/bootutil/src/bootutil_public.c.obj
    
      cannot be safely placed under this directory.  The build may not work
      correctly.

    As far as I understand this is a Windows problem, but I did not have it with ncs 1.4.1 version. I did enable long paths on Windows with no success.  Is there anything else I can try besides moving project folders closer to C:/ ?

  • I'm handling another case at the moment where a customer tried to run a copied version of the Asset tracker application (same application with different name) through SES, and he encountered some issues when building the file ..\ncs\v1.5.0\bootloader\mcuboot\boot\bootutil\src\bootutil_public.c.obj.d, so something is going on here. Will see if I can get to the bottom of this.

Reply
  • I'm handling another case at the moment where a customer tried to run a copied version of the Asset tracker application (same application with different name) through SES, and he encountered some issues when building the file ..\ncs\v1.5.0\bootloader\mcuboot\boot\bootutil\src\bootutil_public.c.obj.d, so something is going on here. Will see if I can get to the bottom of this.

Children
  • Thank you for looking into that.

    I did already enable longer paths on Windows, as described in above instructions. The exact Cmake warning I get when building the project in folder with longer path is:

    CMake Warning in C:/Users/Eva/ncs/v1.5.0/bootloader/mcuboot/boot/bootutil/zephyr/CMakeLists.txt:
      The object file directory
    
        C:/Users/Eva/XXX/build/modules/mcuboot/boot/bootutil/zephyr/CMakeFiles/..__bootloader__mcuboot__boot__bootutil__zephyr.dir/./
    
      has 211 characters.  The maximum full path to an object file is 250
      characters (see CMAKE_OBJECT_PATH_MAX).  Object file
    
        C_/Users/Eva/ncs/v1.5.0/bootloader/mcuboot/boot/bootutil/src/bootutil_public.c.obj
    
      cannot be safely placed under this directory.  The build may not work
      correctly.

    which then results in an error:

    -- Generating done
    -- Build files have been written to: C:/Users/Eva/XXX/build
    -- west build: building application
    [5/329] Performing build step for 'mcuboot_subimage'
    ninja: error: mkdir(modules/mcuboot/boot/bootutil/zephyr/CMakeFiles/..__bootloader__mcuboot__boot__bootutil__zephyr.dir/C_/Users/Eva/ncs/v1.5.0/bootloader/mcuboot/boot/bootutil): No such file or directory
    ninja: error: mkdir(modules/mcuboot/boot/bootutil/zephyr/CMakeFiles/..__bootloader__mcuboot__boot__bootutil__zephyr.dir/C_/Users/Eva/ncs/v1.5.0/bootloader/mcuboot/boot): No such file or directoryil_public.c.obj
    
    ninja: build stopped: .

    I did try to get around this by increasing CMAKE_OBJECT_PATH_MAX value, which successfully removes the warning, however the error stays. Non of this is a problem when building in folder closer to C:/, as mentioned.

  • Ah, okay, so you are able to get it to work if you move it close to C:/. Would it be possible to go with that as a temporary workaround? I've forwarded this issue to the developers internally. I'll keep you updated.

  • I got in contact with some of the developer internally and got informed this is a known issue hard to do much about. See the following: http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/known_issues.html#build-system

    The workaround is the following:

    "Shorten the build folder name, e.g. from “build_nrf5340dk_nrf5340_cpuappns” to “build”, or shorten the path to the build folder in some other way."

    We are looking into how we may minimize the issue, such as using differently named build folders, not using user's home as default path, etc.
    But all those will just be work arounds to the fundemetal problem of Windows path length limitation.
  • Ok, thank you for checking that out. I will stick with shorter folder paths for now.

Related