Example of CONFIG_MCUBOOT_BUILD_STRATEGY_USE_HEX_FILE usage

Hi,

I have read the thread here:  specify MCUBOOT project or build out of ncs repo which implies that this config option might not work?

Does it work? I would like to build mcuboot and then always use the same binary for future releases - this way, all our devices will be using the same copy of mcuboot.

I first built using the default strategy, then I copied build/mcuboot/zephyr/zephyr.hex to eg my home directory.

Then I set

CONFIG_MCUBOOT_BUILD_STRATEGY_USE_HEX_FILE=y
CONFIG_MCUBOOT_HEX_FILE="/home/wayne/mcuboot.hex"

Then I deleted build directory and rebuilt it as before - it "builds", but the resulting build is broken.

Does this work? How should it be setup? I am using NCS v1.8.0 due to AT&T compliance.

Parents
  • Hi Devzone,

    I would love a working answer to this as well!

    When I try to configure my project to use a prebuilt hex file, I get the following errors at build time.

    Thanks!

    === child image hci_rpmsg - CPUNET end ===
    
    Using /Users/blake/co/firmware-nrf-zephyr/workspace/widget/apps/tracker/nrf5340/mcuboot-6115.hex instead of building mcuboot
    
    === child image s1_image -  begin ===
    CMake Error at /Users/blake/co/firmware-nrf-zephyr/workspace/nrf/cmake/multi_image.cmake:229 (get_property):
      get_property could not find TARGET mcuboot_subimage.  Perhaps it has not
      yet been created.
    Call Stack (most recent call first):
      /Users/blake/co/firmware-nrf-zephyr/workspace/nrf/cmake/multi_image.cmake:150 (add_child_image_from_source)
      /Users/blake/co/firmware-nrf-zephyr/workspace/nrf/modules/mcuboot/CMakeLists.txt:222 (add_child_image)
    
    
    CMake Error at /Users/blake/co/firmware-nrf-zephyr/workspace/nrf/cmake/multi_image.cmake:235 (get_property):
      get_property could not find TARGET mcuboot_subimage.  Perhaps it has not
      yet been created.
    Call Stack (most recent call first):
      /Users/blake/co/firmware-nrf-zephyr/workspace/nrf/cmake/multi_image.cmake:150 (add_child_image_from_source)
      /Users/blake/co/firmware-nrf-zephyr/workspace/nrf/modules/mcuboot/CMakeLists.txt:222 (add_child_image)
    
    
    CMake Error: -C must be followed by a file name.
    CMake Error: Run 'cmake --help' for all supported options.
    CMake Error at /Users/blake/co/firmware-nrf-zephyr/workspace/nrf/cmake/multi_image.cmake:409 (message):
      CMake generation for s1_image failed, aborting.  Command: 1
    Call Stack (most recent call first):
      /Users/blake/co/firmware-nrf-zephyr/workspace/nrf/cmake/multi_image.cmake:150 (add_child_image_from_source)
      /Users/blake/co/firmware-nrf-zephyr/workspace/nrf/modules/mcuboot/CMakeLists.txt:222 (add_child_image)
    
    
    -- Configuring incomplete, errors occurred!

Reply
  • Hi Devzone,

    I would love a working answer to this as well!

    When I try to configure my project to use a prebuilt hex file, I get the following errors at build time.

    Thanks!

    === child image hci_rpmsg - CPUNET end ===
    
    Using /Users/blake/co/firmware-nrf-zephyr/workspace/widget/apps/tracker/nrf5340/mcuboot-6115.hex instead of building mcuboot
    
    === child image s1_image -  begin ===
    CMake Error at /Users/blake/co/firmware-nrf-zephyr/workspace/nrf/cmake/multi_image.cmake:229 (get_property):
      get_property could not find TARGET mcuboot_subimage.  Perhaps it has not
      yet been created.
    Call Stack (most recent call first):
      /Users/blake/co/firmware-nrf-zephyr/workspace/nrf/cmake/multi_image.cmake:150 (add_child_image_from_source)
      /Users/blake/co/firmware-nrf-zephyr/workspace/nrf/modules/mcuboot/CMakeLists.txt:222 (add_child_image)
    
    
    CMake Error at /Users/blake/co/firmware-nrf-zephyr/workspace/nrf/cmake/multi_image.cmake:235 (get_property):
      get_property could not find TARGET mcuboot_subimage.  Perhaps it has not
      yet been created.
    Call Stack (most recent call first):
      /Users/blake/co/firmware-nrf-zephyr/workspace/nrf/cmake/multi_image.cmake:150 (add_child_image_from_source)
      /Users/blake/co/firmware-nrf-zephyr/workspace/nrf/modules/mcuboot/CMakeLists.txt:222 (add_child_image)
    
    
    CMake Error: -C must be followed by a file name.
    CMake Error: Run 'cmake --help' for all supported options.
    CMake Error at /Users/blake/co/firmware-nrf-zephyr/workspace/nrf/cmake/multi_image.cmake:409 (message):
      CMake generation for s1_image failed, aborting.  Command: 1
    Call Stack (most recent call first):
      /Users/blake/co/firmware-nrf-zephyr/workspace/nrf/cmake/multi_image.cmake:150 (add_child_image_from_source)
      /Users/blake/co/firmware-nrf-zephyr/workspace/nrf/modules/mcuboot/CMakeLists.txt:222 (add_child_image)
    
    
    -- Configuring incomplete, errors occurred!

Children
Related