Static partition manager config for CPUNET domain

Hello,

I am working on a project using the nRF5340. I will eventually be supporting OTA DFU for both cores so I need to be able to statically define the partitions for both cores. Following the various suggestions in the documentation, I created pm_static.yml (copied from <build dir>/partitions.yml) and pm_static_CPUNET.yml (copied from <build dir>/hci_rpmsg/partitions.yml).

Given that I had included the domain name (CPUNET) in the name of the static partition manager config file (pm_static_CPUNET.yml) I expected that it would be found/picked up automatically by the build. Unfortunately, that was not happening. Further investigation revealed that, when building the hci_rpmsg child image, the build is looking for static partition manager configurations in zephyr/samples/bluetooth/hci_rpmsg instead of in my project directory.

I am able to work around this by setting hci_rpmsg_PM_STATIC_YML_FILE to point to the static configuration file (hci_rpmsg_PM_STATIC_YML_FILE=<my project path>/pm_static_CPUNET.yml). This again seems to be taken as relative to zephyr/samples/bluetooth/hci_rpmsg and, as such required some path manipulation. This is working, but, unfortunately, this makes it a bit more difficult to build for different boards since we cannot take advantage of the pm_<board>_<domain>.yml naming scheme to support multiple different configurations.

My questions:

  1. Is the behavior described above the expected behavior?
  2. Do you have any other/better suggestions for providing a static partition manager configuration for another domain via an included child image?
Parents
  • Hi,

    1. The partitions are set dynamically/automatically. This is done by the partition manager script that goes through the pm.yml-files which contains all relative addresses for all child images. Based on these files, the pm-script will place all partitions in flash. In the end it will place the main application image wherever there is available room.
      1. For instance, the pm-yml-file o the mcuboot is located in <SDK-location>\v2.0.0\bootloader\mcuboot\boot\zephyr\pm.yml
    2. To set the partitions static. This can be done by creating a pm_static.yml-file in your main application, and to place the partitions by using specific addresses.
      1. It should be possible to use am ix of 1. and 2. but 2 will most likely override 1 if one partition is set two places
      2. I am not sure about putting a static pm file in a child image, but I do not think this is possible

    I hope this answers your question,

    Kind regards,
    Andreas

Reply
  • Hi,

    1. The partitions are set dynamically/automatically. This is done by the partition manager script that goes through the pm.yml-files which contains all relative addresses for all child images. Based on these files, the pm-script will place all partitions in flash. In the end it will place the main application image wherever there is available room.
      1. For instance, the pm-yml-file o the mcuboot is located in <SDK-location>\v2.0.0\bootloader\mcuboot\boot\zephyr\pm.yml
    2. To set the partitions static. This can be done by creating a pm_static.yml-file in your main application, and to place the partitions by using specific addresses.
      1. It should be possible to use am ix of 1. and 2. but 2 will most likely override 1 if one partition is set two places
      2. I am not sure about putting a static pm file in a child image, but I do not think this is possible

    I hope this answers your question,

    Kind regards,
    Andreas

Children
No Data
Related