Partition Manager: where to define partitions for external flash`?

(Using nRF Connect SDK 1.5)

I have the setup so far that partition manager is aware of the external flash and creates a single partition for it. The documentation section on external flash explains how external flash is defined as a region and

"
Now partitions can be placed in the external flash:

# Name of partition
external_plz:
  region: external_flash
  size: CONFIG_EXTERNAL_PLZ_SIZE

"

But also: "pm.yml is only used for child images. The root application does not need to define a pm.yml file, because its partition size and placement is implied by the size and placement of the child image partitions. If a root application defines a pm.yml file, it is silently ignored."

How am I supposed to define flash partitions in the external flash from the application without having to modify stuff in the nrf repo?

  • You can modify the partition for the external flash from the application by using a pm_static.yml file in the main application. Add a pm_static.yml to your application with the following content only:

    external_flash:
      address: <set address here>
      region: external_flash
      size: <set size here>

    Run ninja rom_report from the build folder to see the final generated partition map.

    Best regards,

    Simon

Related