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

Using NCS 1.2 SMP_SVR example compiled with custom board DT

Hi,

I am using NCS 1.2 with Zephyr SMP_SVR example compiling with my own board DTS and using MCUBOOT

I have my own partitions configured in my DTS (attached down at the bottom of this message)

I understood that NCS is using PM (Partition manager and overrides this DTS configuration

In such case as read here:

http://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.2.0/nrf/scripts/partition_manager/partition_manager.html#partition-manager

I should config the desired partitions under the PM.yml of the child (which is the bootloader MCUboot)

I don't that this is the right way to do it - I might be missing something.

Another thing I tried is entering menuconfig of the application (smp_svr) and search PM there, I only got:

Which I don't really understand how to use/configure

Bottom line, I want to understand what is the correct way and how should I configure the flash partitions for bootloader, slot-0 slot-1 scratch and storage to match the muli-build of smp_svr example build with mcuboot

Parents
  • File "/home/eshaul/workspace/ncs/nrf/scripts/partition_manager.py", line 490, in get_dynamic_area_start_and_size
    assert len(gaps) == 1, "Incorrect amount of gaps found"

    So this error comes if your partitions are not address aligned directly after each other. Try to create an empty partition between the sections which are not aligned. So that you fill the gaps which are between your partitions.

  • According to my understanding, they are perfectly aligned, which means there are no gaps that I know of, I am not sure if the syntax of the pm_static.yml is correct

    It was copied from the partitions.yml and changed addresses and sizes only.

    I am not aware of this keywoards:

    orig_span:
    sharers:
Reply
  • According to my understanding, they are perfectly aligned, which means there are no gaps that I know of, I am not sure if the syntax of the pm_static.yml is correct

    It was copied from the partitions.yml and changed addresses and sizes only.

    I am not aware of this keywoards:

    orig_span:
    sharers:
Children


  • I guess that would be the simplest way of representing what you are trying to write. I don't think you can have 0x80000 in your storage partition it seems as you hit 0x100000. Maybe there is a bug in the partition manager that doesn't do a proper check.

    So I guess that's what is failing for you since partition manager is thinking you are going out of bounds of the flash. I would agree that the error message is not telling you what's failing.

    Just an FYI you don't need a scratch partition anymore: https://github.com/JuulLabs-OSS/mcuboot/pull/645

    E
    dit: Tested it and it seems that it doesn't work as expected :/ Seems truncates the space of MCUBoot

  • Dear 

    The below pm_static.yml is compiling ok (I have removed the scratch partition and added that space to the storage), but I have a few follow-up questions

    1.

    In the mcuboot_primary section, I must add the "orig_span", "sharers" & "span" sections (or else I get the same error as above), I got them from the partition.yml on my build folder but I don't know their meaning & why are they needed, can you share your thoughts?

    2.

    The storage partition seems ok to me as it is exactly filling up space till 0x100000. Anyway, it is not preventing the compilation (i will check the storage partition later on)

    3.

    During the build both memory maps are confirming that the partitions for mcuboot and the application are on the right size:

    4.

    I managed to get a cycle of mcumgr commands and DFU the board using the 2nd partition