How to Make Zephyr Coredump Module Recognize a Partition Manager Partition with Sysbuild in NCS 2.9.0?

I'm working with nRF5340 and nRF Connect SDK 2.9.0, using sysbuild and Partition Manager for my project. I want to enable Zephyr's coredump feature and store dumps in internal flash.
I understand that with sysbuild and Partition Manager enabled, flash partitions must be defined in pm_static.yml, as devicetree partition definitions are ignored for memory layout and partitioning purposes (Configuring static partitions). However, Zephyr's coredump module (and zephyr/debug/coredump.h) expects a partition to be defined in the devicetree with a specific label (e.g., coredump-partition) in order to find the flash device and offset (Zephyr coredump documentation).
This creates a problem:

  • If I define the coredump partition only in pm_static.yml, the coredump module cannot find it, since it looks for a devicetree node.
  • If I define it in both pm_static.yml and the devicetree, the devicetree definition is ignored for partitioning, and this can lead to confusion or build errors (DevZone discussion).

Is there a supported way to make Zephyr's coredump module recognize a coredump partition defined via Partition Manager when using sysbuild in NCS 2.9.0?
Or is there a recommended workaround for this integration gap, so that coredump data can be stored in a flash partition managed by Partition Manager, and the coredump module can find and use it?
Any guidance or examples would be greatly appreciated!

Related