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

nRF Connect SDK 1.3.0 multi-image build stuck

I am switching from standard Zephyr and I am trying out nRF connect SDK v1.3.0. When I am building my app for mcuboot, it hangs after configuring the child image (mcuboot).  If I build mcuboot or the app by itself it works just fine.  It seems like something is hanging in the partition_manager script.  I see a python process spinning in Activity Monitor forever, when I kill it, then the build process fails out.  See my output here:


Any ideas on how to solve this?

  • Strange, it should work out-of-the-box. 

    Could you try the following:

    • Install NCS v1.3.0 using the Toolchain Manager
    • Add CONFIG_BOOTLOADER_MCUBOOT=y to <..>\ncs\v1.3.0\zephyr\samples\hello_world\prj.conf

    Open the bash window from the Toolchain Manager, cd into /ncs/v1.3.0/zephyr/samples/hello_world and build the project:

    west build -b nrf52840dk_nrf52840

    If that works, you've successfully built and compiled a project with mcuboot as a child image

    Best regards,

    Simon

  • That does work, but I am interested in solving the issue with my project.  I have attached my input files that were used for the output above.

     pm_hang.zip

  • Okay, I was too quick to answer. Thanks for the files, I will try to reproduce the problem.

    Could you provide the exact steps to reproduce it, where in NCS v1.3.0 should he files be placed, and what commands to run?

    Best regards,

    Simon

  • I have found an easy way to reproduce the issue with the nrf52840dk.  A simple project is attached.  Build it against the nrf52840dk_nrf52840 board.  The issue happens when both 

    CONFIG_FILE_SYSTEM_LITTLEFS=y and CONFIG_NVS=y are used at the same time.  If you comment out one of them then the build works just fine.

    console.zip

  • Hi.

    Simon is on vacation, so I have taken over this ticket.

    Using your sample project, I am able to reproduce the problem.

    After adding some debug-prints to the partition manager, it seems like it gets stuck in this loop, not being able to resolve the nvs_storage_partition.

    I have not yet been able to find the reason why it gets stuck in the loop, and our partition manager expert is on vacation.

    I will continue investigating so that we can find a proper fix.

    In the meantime, I have been able to create a static configuration file for the partition manager that places both the nvs_storage and the littlefs_storage partitions:

    app:
      address: 0xc200
      region: flash_primary
      size: 0x76e00
    external_flash:
      address: 0x0
      region: external_flash
      size: 0x800000
    mcuboot:
      address: 0x0
      placement:
        before:
        - mcuboot_primary
      region: flash_primary
      size: 0xc000
    mcuboot_pad:
      address: 0xc000
      placement:
        align:
          start: 0x1000
        before:
        - mcuboot_primary_app
      region: flash_primary
      size: 0x200
    mcuboot_primary:
      address: 0xc000
      orig_span: &id001
      - app
      - mcuboot_pad
      region: flash_primary
      sharers: 0x1
      size: 0x74000
      span: *id001
    mcuboot_primary_app:
      address: 0xc200
      orig_span: &id002
      - app
      region: flash_primary
      size: 0x73e00
      span: *id002
    mcuboot_secondary:
      address: 0x80000
      placement:
        after:
        - mcuboot_primary
        align:
          start: 0x1000
      region: flash_primary
      share_size:
      - mcuboot_primary
      size: 0x74000
    nvs_storage:
      address: 0xf4000
      placement:
        before:
        - end
      region: flash_primary
      size: 0x6000
    littlefs_storage:
      address: 0xfa000
      placement:
        before:
        - end
      region: flash_primary
      size: 0x6000
    
    (you must change the file ending to .yml, and place it in your project folder)

    Note that if you want to re-size any of the partitions, you must calculate new start addresses and sizes for the other partitions.

    Best regards,

    Didrik

Related