<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Partition Manager for External Memory doesn&amp;#39;t create correctly the partitions.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97694/partition-manager-for-external-memory-doesn-t-create-correctly-the-partitions</link><description>Hello, 
 I created the regions.yml and pm_static.yml. If I enable this flag the compiler works well 
 but doesn&amp;#39;t create the correct partitions I wrote on pm_static. 
 
 ##CONFIG_PM_PARTITION_REGION_SETTINGS_STORAGE_EXTERNAL=y 
 
 If I uncomment, these</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 28 Mar 2023 13:27:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97694/partition-manager-for-external-memory-doesn-t-create-correctly-the-partitions" /><item><title>RE: Partition Manager for External Memory doesn't create correctly the partitions.</title><link>https://devzone.nordicsemi.com/thread/417909?ContentTypeID=1</link><pubDate>Tue, 28 Mar 2023 13:27:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:edaf6283-f5a2-447e-93d0-957992f11deb</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="FlavioPiracicaba"]I decided move to NVS. There is an example. I tested and worked well with external_flash.[/quote]
&lt;p&gt;It is great to hear that you found the way forward and that the NVS sample works for you.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Partition Manager for External Memory doesn't create correctly the partitions.</title><link>https://devzone.nordicsemi.com/thread/417770?ContentTypeID=1</link><pubDate>Mon, 27 Mar 2023 23:45:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd1e5734-95e5-49cc-9557-97a3331f3f31</guid><dc:creator>FlavioPiracicaba</dc:creator><description>&lt;p&gt;&lt;span style="font-family:arial, helvetica, sans-serif;font-size:inherit;"&gt;I decided move to NVS. There is an example. I tested and worked well with external_flash. I changed&lt;/span&gt;&lt;/p&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:Consolas, &amp;#39;Courier New&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="font-family:arial, helvetica, sans-serif;font-size:inherit;"&gt;&lt;span style="color:#0000ff;"&gt;CONFIG_PM_PARTITION_SIZE_NVS_STORAGE&lt;/span&gt;&lt;span style="color:#000000;"&gt;=0x800000&lt;/span&gt;. Now I can store my data structures.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:arial, helvetica, sans-serif;font-size:inherit;"&gt;and will be easier.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Partition Manager for External Memory doesn't create correctly the partitions.</title><link>https://devzone.nordicsemi.com/thread/417757?ContentTypeID=1</link><pubDate>Mon, 27 Mar 2023 19:53:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b2074e0-de9f-401f-b05f-168dbeebc6f8</guid><dc:creator>FlavioPiracicaba</dc:creator><description>&lt;p&gt;Hi Dejan, &lt;/p&gt;
&lt;p&gt;&amp;nbsp;I tried several suggestions but I didn&amp;#39;t have any satisfatory results. Nothing worked well. I would like to use FCB and I was trying first create partitions on external memory and use the command flash_area_open(DT_FIXED_PARTITION_ID(DT_NODELABEL(partition1)), &amp;amp;my_area);&lt;br /&gt;&amp;nbsp; But this command returns the wrong partition size and area.&lt;br /&gt;&amp;nbsp; I need and example to try to reproduce, if you know where could I find one I will be greatefully.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Partition Manager for External Memory doesn't create correctly the partitions.</title><link>https://devzone.nordicsemi.com/thread/417756?ContentTypeID=1</link><pubDate>Mon, 27 Mar 2023 19:46:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03c58ec2-8fea-4d30-b543-33815914640f</guid><dc:creator>FlavioPiracicaba</dc:creator><description>&lt;p&gt;I used the partition I created, but the problem is I am having problem to use the command flash_area_open(DT_FIXED_PARTITION_ID(DT_NODELABEL(partition1)), &amp;amp;my_area);&lt;br /&gt;As you said, there is other options to use the external flash memory and I will try but my idea it was use FCB.&lt;br /&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Partition Manager for External Memory doesn't create correctly the partitions.</title><link>https://devzone.nordicsemi.com/thread/417626?ContentTypeID=1</link><pubDate>Mon, 27 Mar 2023 10:15:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25152b2f-0d28-4c60-a7b0-36524ba52936</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Flavio,&lt;br /&gt;&lt;br /&gt;Have you achieved progress on your initial issue? Could you provide an update on the current status?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Partition Manager for External Memory doesn't create correctly the partitions.</title><link>https://devzone.nordicsemi.com/thread/417274?ContentTypeID=1</link><pubDate>Fri, 24 Mar 2023 04:12:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:053d89bb-e680-418c-916b-281cc2633a9a</guid><dc:creator>3Nigma</dc:creator><description>&lt;p&gt;Hey Flavio,&lt;/p&gt;
&lt;p&gt;Why do you want to keep the external_flash region around if you don&amp;#39;t want to put any partition in it?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;By the way, I would not edit the partition_manager.cmake directly since, unlike the previous discussion (eg. with the pm.yml.settings file), the partition_manager.cmake code behaves correctly (it is not a bug).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Depending on what you are trying to achieve, I think there are other solutions that would help instead of forcing a region to be defined.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best wishes,&lt;/p&gt;
&lt;p&gt;V&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Partition Manager for External Memory doesn't create correctly the partitions.</title><link>https://devzone.nordicsemi.com/thread/417252?ContentTypeID=1</link><pubDate>Thu, 23 Mar 2023 23:55:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2df3494e-bb97-4526-beb2-7d2d65e49007</guid><dc:creator>FlavioPiracicaba</dc:creator><description>&lt;p&gt;Hello 3Nigma,&lt;/p&gt;
&lt;p&gt;I edited the partition_manager.cmake and added manualy the region. Removed nordic,pm-ext-flash from chosen.&lt;/p&gt;
&lt;p&gt;Now it&amp;#39;s creating the partitions.yml correctly and the regions.yml too.&lt;/p&gt;
&lt;p&gt;And don&amp;#39;t have the size negative on partition external_flash.&lt;/p&gt;
&lt;p&gt;Do you know if there is another way to create this region without edit the partition_manager.cmake?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Flavio.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
dt_chosen(ext_flash_dev PROPERTY nordic,pm-ext-flash)
if (DEFINED ext_flash_dev)
  dt_prop(num_bits PATH ${ext_flash_dev} PROPERTY size)
  math(EXPR num_bytes &amp;quot;${num_bits} / 8&amp;quot;)

  set(external_flash_driver_kconfig CONFIG_PM_EXTERNAL_FLASH_HAS_DRIVER)

  add_region(
    NAME external_flash
    SIZE ${num_bytes}
    BASE ${CONFIG_PM_EXTERNAL_FLASH_BASE}
    PLACEMENT start_to_end
    DEVICE &amp;quot;DT_CHOSEN(nordic_pm_ext_flash)&amp;quot;
    DEFAULT_DRIVER_KCONFIG ${external_flash_driver_kconfig}
    )
endif()


add_region(
  NAME external_flash
  SIZE 0X800000
  BASE 0
  PLACEMENT start_to_end
  DEVICE &amp;quot;DT_ALIAS(external-mx25)&amp;quot;
  DEFAULT_DRIVER_KCONFIG CONFIG_PM_EXTERNAL_FLASH_HAS_DRIVER
  )
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Partition Manager for External Memory doesn't create correctly the partitions.</title><link>https://devzone.nordicsemi.com/thread/417114?ContentTypeID=1</link><pubDate>Thu, 23 Mar 2023 13:56:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f448f8fd-2916-4640-9f60-91ec0dda5db0</guid><dc:creator>3Nigma</dc:creator><description>&lt;p&gt;Hey Flavio,&lt;/p&gt;
&lt;p&gt;I think &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/ee242d386a0e777f03d37ba3683eeb1f82791a98/cmake/partition_manager.cmake#L217"&gt;this code&lt;/a&gt; explains why an &lt;strong&gt;external_flash &lt;/strong&gt;region is being generated: if you have a &lt;strong&gt;chosen&lt;/strong&gt; a&amp;nbsp;&lt;span&gt;&lt;strong&gt;nordic,pm-ext-flash&lt;/strong&gt; value, then an external_region is provided to you.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So if you do a&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;/{
	chosen {
		/delete-property/ nordic,pm-ext-flash;
	}
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;it should, in theory, work. But you will need to change your &lt;strong&gt;main.c&lt;/strong&gt; code a bit (saw that you are using&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;strong&gt;DEVICE_DT_GET(DT_CHOSEN&lt;/strong&gt;&lt;span&gt;&lt;strong&gt;(nordic_pm_ext_flash))&lt;/strong&gt; there).&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;One thing to mention here is that, if you remove the &lt;strong&gt;nordic,pm-ext-flash&lt;/strong&gt; chosen value,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;strong&gt;CONFIG_PM_PARTITION_REGION_SETTINGS_STORAGE_EXTERNAL&lt;/strong&gt; also becomes unavailable due to the way &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/ee242d386a0e777f03d37ba3683eeb1f82791a98/subsys/partition_manager/Kconfig.template.partition_region"&gt;it&amp;#39;s Kconfig is defined&lt;/a&gt;. This leads, in your case, to no &lt;strong&gt;external_flash&lt;/strong&gt; partitions being generated.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;V&lt;/span&gt;&lt;/p&gt;
&lt;div class="bladeContent"&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Partition Manager for External Memory doesn't create correctly the partitions.</title><link>https://devzone.nordicsemi.com/thread/417075?ContentTypeID=1</link><pubDate>Thu, 23 Mar 2023 12:55:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b2c8485-8b42-4a72-a2c8-334d5e990b62</guid><dc:creator>FlavioPiracicaba</dc:creator><description>&lt;p&gt;Hi 3Nigma,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; Worked very well with your suggestion on makefile.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; On the file partitions , it&amp;#39;s ok with two partitions created (&lt;span class="pl-ent"&gt;partition_0&lt;/span&gt; and &lt;span class="pl-ent"&gt;partition_1&lt;/span&gt;). One thing I didn&amp;#39;t understand is why was created automacatily a partition external_partition with negative size. Do you know if it&amp;#39;s possible don&amp;#39;t create this external_partition?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Flavio.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;pre class="ui-code" data-mode="text"&gt;EMPTY_0:
  address: 0xfe000
  end_address: 0x100000
  placement:
    after:
    - littlefs_storage
  region: flash_primary
  size: 0x2000
app:
  address: 0x8000
  end_address: 0xf8000
  region: flash_primary
  size: 0xf0000
external_flash:
  address: 0x802000
  end_address: 0x800000
  region: external_flash
  size: -0x2000
littlefs_storage:
  address: 0xf8000
  end_address: 0xfe000
  inside:
  - nonsecure_storage
  placement:
    align:
      start: 0x4000
    before:
    - end
  region: flash_primary
  size: 0x6000
nonsecure_storage:
  address: 0xf8000
  end_address: 0xfe000
  orig_span: &amp;amp;id001
  - littlefs_storage
  region: flash_primary
  size: 0x6000
  span: *id001
otp:
  address: 0xff8100
  end_address: 0xff83fc
  region: otp
  size: 0x2fc
partition_0:
  address: 0x0
  end_address: 0x400000
  region: external_flash
  size: 0x400000
partition_1:
  address: 0x400000
  end_address: 0x800000
  region: external_flash
  size: 0x400000
rpmsg_nrf53_sram:
  address: 0x20070000
  end_address: 0x20080000
  placement:
    before:
    - end
  region: sram_primary
  size: 0x10000
settings_storage:
  address: 0x800000
  device: DT_CHOSEN(nordic_pm_ext_flash)
  end_address: 0x802000
  inside:
  - nonsecure_storage
  placement:
    align:
      start: 0x4000
    before:
    - tfm_storage
    - end
  region: external_flash
  size: 0x2000
sram_nonsecure:
  address: 0x20008000
  end_address: 0x20080000
  orig_span: &amp;amp;id002
  - sram_primary
  - rpmsg_nrf53_sram
  region: sram_primary
  size: 0x78000
  span: *id002
sram_primary:
  address: 0x20008000
  end_address: 0x20070000
  region: sram_primary
  size: 0x68000
sram_secure:
  address: 0x20000000
  end_address: 0x20008000
  orig_span: &amp;amp;id003
  - tfm_sram
  region: sram_primary
  size: 0x8000
  span: *id003
tfm:
  address: 0x0
  end_address: 0x8000
  placement:
    before:
    - app
  region: flash_primary
  size: 0x8000
tfm_nonsecure:
  address: 0x8000
  end_address: 0xf8000
  orig_span: &amp;amp;id004
  - app
  region: flash_primary
  size: 0xf0000
  span: *id004
tfm_secure:
  address: 0x0
  end_address: 0x8000
  orig_span: &amp;amp;id005
  - tfm
  region: flash_primary
  size: 0x8000
  span: *id005
tfm_sram:
  address: 0x20000000
  end_address: 0x20008000
  inside:
  - sram_secure
  placement:
    after:
    - start
  region: sram_primary
  size: 0x8000&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Partition Manager for External Memory doesn't create correctly the partitions.</title><link>https://devzone.nordicsemi.com/thread/416964?ContentTypeID=1</link><pubDate>Thu, 23 Mar 2023 06:39:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5b70fbe-dfe8-46fc-9586-f354dcd1d3ce</guid><dc:creator>3Nigma</dc:creator><description>&lt;p&gt;Flavio,&lt;/p&gt;
&lt;p&gt;I think I understand better what&amp;#39;s happening. The short version is that, if you rename your &lt;strong&gt;pm-static.yml&lt;/strong&gt; file to &lt;strong&gt;pm_static.yml&lt;/strong&gt;&amp;nbsp;and remove the line &amp;quot;&lt;em&gt;ncs_add_partition_manager_config(pm-static.yml)&lt;/em&gt;&amp;quot; from your CMakeLists.txt, your static definitions will be picked up by the partition-manager&amp;nbsp; The partition-manager will then complain that the partitions aren&amp;#39;t properly defined -- I&amp;#39;ll let you investigate the cause of this.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The longer answer to this is that&amp;nbsp;&lt;em&gt;ncs_add_partition_manager_config&amp;nbsp;&lt;/em&gt;doesn&amp;#39;t have effect after calling &amp;quot;&lt;em&gt;find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}&lt;/em&gt;&lt;span&gt;&lt;em&gt;)&lt;/em&gt;&amp;quot;. That&amp;#39;s because, by the time cmake executes your &amp;quot;&lt;em&gt;ncs_add_partition_manager_config&amp;nbsp;&lt;/em&gt;&amp;quot; function call, it has already executed the partition-manager script with whatever it had at its disposal.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Just as a FYI: in order to investigate this, I added a couple of &lt;a href="https://cmake.org/cmake/help/latest/command/message.html"&gt;cmake message&lt;/a&gt; statements:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span&gt;&amp;quot;&lt;/span&gt;message&lt;span&gt;(STATUS &lt;/span&gt;&lt;span&gt;&amp;quot;Found zephyr!!!&amp;quot;&lt;/span&gt;&lt;span&gt;)&amp;quot; after your &amp;quot;project(NONE)&amp;quot; line &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;span&gt;another one in &amp;lt;nrf&amp;gt;/subsys/partition_manager/CMakeLists.txt (line 155) that reads: &amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;message&lt;/span&gt;&lt;span&gt;(STATUS &lt;/span&gt;&lt;span&gt;&amp;quot;PM_SUBSYS_PATHS is ${PM_SUBSYS_PATHS}&amp;quot;&lt;/span&gt;&lt;span&gt;)&amp;quot;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span&gt;And, sure enough, after I ran &amp;quot;west build&amp;quot;, I saw the &amp;quot;PM_SUBSYS_PATHS is...&amp;quot; message &lt;em&gt;BEFORE&lt;/em&gt; the &amp;quot;Found zephyr!!!&amp;quot; one!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If you still want to use the non-standard pm-static.yml file name, you can do a &amp;quot;&lt;/span&gt;&lt;span&gt;set&lt;/span&gt;&lt;span&gt;(PM_STATIC_YML_FILE &lt;/span&gt;&lt;span&gt;&amp;quot;&lt;/span&gt;C:/Nordic/peripheral_uart/pm-static.yml&lt;span&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;&amp;quot; just before the &amp;quot;&lt;em&gt;find_package(Zephyr ...)&lt;/em&gt;&amp;quot; call in your CMakeLists.txt file&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.2.0/nrf/scripts/partition_manager/partition_manager.html#configuring-static-partitions"&gt;as described in the nrf docs&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I hope this helps,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best wishes,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;V&lt;/span&gt;&lt;/p&gt;
&lt;div class="bladeContent"&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Partition Manager for External Memory doesn't create correctly the partitions.</title><link>https://devzone.nordicsemi.com/thread/416955?ContentTypeID=1</link><pubDate>Thu, 23 Mar 2023 05:04:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3165fe17-e8bc-436a-a27f-6e3f3c390725</guid><dc:creator>3Nigma</dc:creator><description>&lt;p&gt;Hey Flavio,&lt;/p&gt;
&lt;p&gt;I will look into your issue more carefully and come back to you, hopefully, with&amp;nbsp;some feedback (if you don&amp;#39;t find the solution in the meantime).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Take care,&lt;/p&gt;
&lt;p&gt;V&lt;/p&gt;
&lt;div class="bladeContent"&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Partition Manager for External Memory doesn't create correctly the partitions.</title><link>https://devzone.nordicsemi.com/thread/416943?ContentTypeID=1</link><pubDate>Thu, 23 Mar 2023 00:22:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c92f042e-a783-44b6-a27e-ee24962cb299</guid><dc:creator>FlavioPiracicaba</dc:creator><description>&lt;p&gt;Hello Eetu,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; It&amp;#39;s not easy to put to work. I couldn&amp;#39;t find examples.Unfortunately the explanation on Nordic web site is not clear.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Partition Manager for External Memory doesn't create correctly the partitions.</title><link>https://devzone.nordicsemi.com/thread/416942?ContentTypeID=1</link><pubDate>Thu, 23 Mar 2023 00:16:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ca720e2-911d-474d-9d79-3a25472e0107</guid><dc:creator>FlavioPiracicaba</dc:creator><description>&lt;p&gt;Hello 3Nigma,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; With this patch you created worked fine.&amp;nbsp; Now is building without any error. I have some difficulties in understand why is creating automaticly the partition &amp;quot;external-flash&amp;quot;. I defined on pm-static.yml other partitions but the builder create only the partition external-flash.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Flavio.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Partition Manager for External Memory doesn't create correctly the partitions.</title><link>https://devzone.nordicsemi.com/thread/416925?ContentTypeID=1</link><pubDate>Wed, 22 Mar 2023 21:09:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67da8f4e-3c35-4681-93e2-ca290ee4c48f</guid><dc:creator>Eetu Nevalainen</dc:creator><description>&lt;p&gt;I&amp;#39;m having the same problem.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Traceback (most recent call last):
  File &amp;quot;/home/eetnev/git/ncs/v2.3.0/nrf/scripts/partition_manager.py&amp;quot;, line 1978, in &amp;lt;module&amp;gt;
    main()
  File &amp;quot;/home/eetnev/git/ncs/v2.3.0/nrf/scripts/partition_manager.py&amp;quot;, line 1028, in main
    solution.update(solve_region(pm_config, region, region_config,
  File &amp;quot;/home/eetnev/git/ncs/v2.3.0/nrf/scripts/partition_manager.py&amp;quot;, line 971, in solve_region
    get_region_config(partitions, region_config, static_partitions, system_reqs=pm_config)
  File &amp;quot;/home/eetnev/git/ncs/v2.3.0/nrf/scripts/partition_manager.py&amp;quot;, line 742, in get_region_config
    solve_simple_region(pm_config, start, size, placement_strategy, region_name, device,
  File &amp;quot;/home/eetnev/git/ncs/v2.3.0/nrf/scripts/partition_manager.py&amp;quot;, line 790, in solve_simple_region
    address += pm_config[partition_name][&amp;#39;size&amp;#39;]
KeyError: &amp;#39;size&amp;#39;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I changed pm.yml.settings as&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/3nigma"&gt;3Nigma&lt;/a&gt;&amp;nbsp;described and now I&amp;#39;m getting:&lt;/p&gt;
&lt;p&gt;v2.3.0/nrf/modules/tfm/tfm/boards/common/assert.c:17:2: error: #error &amp;quot;TF-M non-secure address start is not aligned on SPU region size&amp;quot;&lt;/p&gt;
&lt;p&gt;Which relates to &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/97720/tf-m-partition-alignment-assert-within-spu-might-fail-for-some-partition-manager-computed-configs"&gt;this&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Partition Manager for External Memory doesn't create correctly the partitions.</title><link>https://devzone.nordicsemi.com/thread/416789?ContentTypeID=1</link><pubDate>Wed, 22 Mar 2023 12:27:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6f0cf20-c471-4c80-bb04-a4756529ffe1</guid><dc:creator>3Nigma</dc:creator><description>&lt;p&gt;Hey Flavio,&lt;/p&gt;
&lt;p&gt;I was just about to open a ticket with the same issue that you reported.&lt;/p&gt;
&lt;p&gt;In my opinion, there is an issue with the way&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/subsys/partition_manager/pm.yml.settings"&gt;the pm.yml.settings file&lt;/a&gt;&amp;nbsp;is written.&amp;nbsp;If &lt;span&gt;&lt;strong&gt;CONFIG_PM_PARTITION_REGION_SETTINGS_STORAGE_EXTERNAL&lt;/strong&gt; is enabled, the partition ends up incompletely defined and is fed to the partition-manager script to be resolved (that&amp;#39;s why you&amp;#39;re getting the&amp;nbsp;&lt;strong&gt;KeyError: &amp;#39;size&amp;#39;&lt;/strong&gt; error).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To solve this, you &lt;strong&gt;need to patch the pm.yml.settings&lt;/strong&gt; file so that instead of :&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;lt;autoconf.h&amp;gt;

settings_storage:
  placement:
    before: [tfm_storage, end]
#ifdef CONFIG_PM_PARTITION_REGION_SETTINGS_STORAGE_EXTERNAL
  region: external_flash
#else
    align: {start: CONFIG_PM_PARTITION_ALIGN_SETTINGS_STORAGE}
#endif
  inside: [nonsecure_storage]
  size: CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;you&amp;#39;ll have:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;lt;autoconf.h&amp;gt;

settings_storage:
#ifdef CONFIG_PM_PARTITION_REGION_SETTINGS_STORAGE_EXTERNAL
  region: external_flash
#endif
  placement:
    before: [tfm_storage, end]
    align: {start: CONFIG_PM_PARTITION_ALIGN_SETTINGS_STORAGE}
  inside: [nonsecure_storage]
  size: CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please notice the macro definition scope, now, when&amp;nbsp;&lt;strong&gt;CONFIG_PM_PARTITION_REGION_SETTINGS_STORAGE_EXTERNAL&lt;/strong&gt; is enabled, the resulting partition definition ends up being correctly defined: has the &amp;#39;size&amp;#39; prop (among other things).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Hope this helps,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best wishes,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;V&lt;/span&gt;&lt;/p&gt;
&lt;div class="bladeContent"&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Partition Manager for External Memory doesn't create correctly the partitions.</title><link>https://devzone.nordicsemi.com/thread/416728?ContentTypeID=1</link><pubDate>Wed, 22 Mar 2023 09:40:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:494d07d4-564a-4997-87ac-cbebcd17bf04</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;From your project link I see that you use pm-static.yml, but you should be using pm_static.yml instead. You could have a look at how to&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/scripts/partition_manager/partition_manager.html#configuring-static-partitions"&gt;configure static partitions&lt;/a&gt;&amp;nbsp;in the documentation.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Partition Manager for External Memory doesn't create correctly the partitions.</title><link>https://devzone.nordicsemi.com/thread/416488?ContentTypeID=1</link><pubDate>Tue, 21 Mar 2023 10:15:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63c29f9c-92cd-404f-bddf-e5687540852e</guid><dc:creator>FlavioPiracicaba</dc:creator><description>&lt;p&gt;Hello Dejan,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; I want to create partitions on external memory mx25r64.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; Each partition will store some variables structures as a circular buffer.&lt;/p&gt;
&lt;p&gt;This is the layout I want:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1679393534522v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Could you help me?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Flavio.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Partition Manager for External Memory doesn't create correctly the partitions.</title><link>https://devzone.nordicsemi.com/thread/416424?ContentTypeID=1</link><pubDate>Tue, 21 Mar 2023 06:55:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53dd5aca-7fd8-4890-a5ca-3400e0850ed5</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Could you please specify where you want to place your partitions? What is your intention when using pm-static.yml and regions.yml? What would be your desired partition layout?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Partition Manager for External Memory doesn't create correctly the partitions.</title><link>https://devzone.nordicsemi.com/thread/415776?ContentTypeID=1</link><pubDate>Thu, 16 Mar 2023 15:25:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f1b27455-6887-462f-a9be-bb2a198e1ec4</guid><dc:creator>FlavioPiracicaba</dc:creator><description>&lt;p&gt;Hi Dejan,&lt;/p&gt;
&lt;p&gt;For the case can be compilated it&amp;#39;s possible to generate logs. First of all, I think if you could see the full project instead parts of it in github will be easier.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s all here: &lt;a id="" href="https://github.com/flavioafferreira/peripheral_uart_new"&gt;https://github.com/flavioafferreira/peripheral_uart_new&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I am using a PCA10095 nRF5340-DK&lt;/p&gt;
&lt;p&gt;Basicaly I created some Threads.&amp;nbsp; When I press button 1, send some informations through bluetooth, Button 2 try to save on external memory, The AD device is reading 4 ports.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Flavio.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/WhatsApp-Image-2023_2D00_03_2D00_16-at-16.23.06.jpeg" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Partition Manager for External Memory doesn't create correctly the partitions.</title><link>https://devzone.nordicsemi.com/thread/415767?ContentTypeID=1</link><pubDate>Thu, 16 Mar 2023 14:55:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e09da7d1-757c-4bb6-8e30-6692a6c213f3</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Which board do you use? Could you specify your build target from the&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/peripheral_uart/README.html#requirements"&gt;requirements&lt;/a&gt;&amp;nbsp;page?&lt;br /&gt;&lt;br /&gt;Could you provide the structure of your project? Where did you put your pm-static.yml and regions.yml files?&lt;br /&gt;&lt;br /&gt;Could you specify all changes that you made to nrf&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/peripheral_uart/README.html"&gt;peripheral_uart&lt;/a&gt; sample?&lt;br /&gt;&lt;br /&gt;Could you provide full logs in both working and non-working case?&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user="FlavioPiracicaba"]Here are the codes:[/quote]
&lt;p&gt;Could you specify what is shown in the code snippets?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Partition Manager for External Memory doesn't create correctly the partitions.</title><link>https://devzone.nordicsemi.com/thread/415573?ContentTypeID=1</link><pubDate>Wed, 15 Mar 2023 21:18:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dafbb048-15f4-4cb9-8d40-5abde7487781</guid><dc:creator>FlavioPiracicaba</dc:creator><description>&lt;p&gt;Result with &lt;span style="background-color:#ffffff;color:#000000;font-size:inherit;"&gt;CONFIG_PM_PARTITION_REGION_SETTINGS_STORAGE_EXTERNAL=y&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; get_region_config(partitions, region_config, static_partitions, system_reqs=pm_config)&lt;br /&gt;&amp;nbsp; File &amp;quot;C:/ncs/v2.3.0-rc1/nrf/scripts/partition_manager.py&amp;quot;, line 742, in get_region_config&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; solve_simple_region(pm_config, start, size, placement_strategy, region_name, device,&lt;br /&gt;&amp;nbsp; File &amp;quot;C:/ncs/v2.3.0-rc1/nrf/scripts/partition_manager.py&amp;quot;, line 790, in solve_simple_region&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; address += pm_config[partition_name]['size']&lt;br /&gt;KeyError: &amp;#39;size&amp;#39;&lt;br /&gt;CMake Error at C:/ncs/v2.3.0-rc1/nrf/cmake/partition_manager.cmake:304 (message):&lt;br /&gt;&amp;nbsp; Partition Manager failed, aborting.&amp;nbsp; Command:&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Partition Manager for External Memory doesn't create correctly the partitions.</title><link>https://devzone.nordicsemi.com/thread/415572?ContentTypeID=1</link><pubDate>Wed, 15 Mar 2023 21:15:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27d69a0e-d605-4662-afcc-93d8d633bd56</guid><dc:creator>FlavioPiracicaba</dc:creator><description>&lt;p&gt;Result with &lt;span style="background-color:#ffffff;color:#000000;font-size:inherit;"&gt;CONFIG_PM_PARTITION_REGION_SETTINGS_STORAGE_EXTERNAL=n&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Result Open:0&lt;br /&gt;fa_id 7 device_id 0&lt;br /&gt;Result Erase:0 size=8192 &amp;lt;&amp;lt;&amp;lt;--- ERROR, SHOULD BE 12287 INSTEAD 8192&lt;br /&gt;1&amp;nbsp; Data read: ffffffff&lt;br /&gt;2&amp;nbsp; Status Read:0&lt;br /&gt;3&amp;nbsp; Status Write:0&lt;br /&gt;4&amp;nbsp; Data read: 51525357&lt;br /&gt;5&amp;nbsp; Status Read:0&lt;br /&gt;Result Erase:0&lt;br /&gt;6&amp;nbsp; Status Write:0&lt;br /&gt;7&amp;nbsp; Data read: 51525358&lt;br /&gt;8&amp;nbsp; Status Read:0&lt;br /&gt;LOG Circular Buffer hh:mm:ss at 00:01:00&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Partition Manager for External Memory doesn't create correctly the partitions.</title><link>https://devzone.nordicsemi.com/thread/415568?ContentTypeID=1</link><pubDate>Wed, 15 Mar 2023 20:56:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47321483-1db6-47cd-bcf8-2b65b5402915</guid><dc:creator>FlavioPiracicaba</dc:creator><description>&lt;p&gt;I would like to create custom partitions (partition_1) on external flash memory. I created the pm-static.yml and the regions.yml.&lt;/p&gt;
&lt;div style="background-color:rgba(255, 255, 255, 1);color:rgba(0, 0, 0, 1);font-family:Consolas, &amp;#39;Courier New&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:rgba(128, 0, 0, 1);"&gt;on pm-static.yml&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:rgba(128, 0, 0, 1);"&gt;partition_1&lt;/span&gt;&lt;span style="color:rgba(0, 0, 0, 1);"&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:rgba(0, 0, 0, 1);"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:rgba(128, 0, 0, 1);"&gt;address&lt;/span&gt;&lt;span style="color:rgba(0, 0, 0, 1);"&gt;: &lt;/span&gt;&lt;span style="color:rgba(9, 134, 88, 1);"&gt;0x0&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:rgba(0, 0, 0, 1);"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:rgba(128, 0, 0, 1);"&gt;end_address&lt;/span&gt;&lt;span style="color:rgba(0, 0, 0, 1);"&gt;: &lt;/span&gt;&lt;span style="color:rgba(9, 134, 88, 1);"&gt;0x7FFFFF&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:rgba(0, 0, 0, 1);"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:rgba(128, 0, 0, 1);"&gt;region&lt;/span&gt;&lt;span style="color:rgba(0, 0, 0, 1);"&gt;: &lt;/span&gt;&lt;span style="color:rgba(0, 0, 255, 1);"&gt;external_flash&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:rgba(0, 0, 0, 1);"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:rgba(128, 0, 0, 1);"&gt;size&lt;/span&gt;&lt;span style="color:rgba(0, 0, 0, 1);"&gt;: &lt;/span&gt;&lt;span style="color:rgba(9, 134, 88, 1);"&gt;0x800000&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;After &amp;quot;Build all configurations&amp;quot; it&amp;#39;s not appearing correctly on file /built/partitions.yml. On this file apears only:&lt;/p&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:Consolas, &amp;#39;Courier New&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#800000;"&gt;external_flash&lt;/span&gt;&lt;span style="color:#000000;"&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#800000;"&gt;address&lt;/span&gt;&lt;span style="color:#000000;"&gt;: &lt;/span&gt;&lt;span style="color:#098658;"&gt;0x0&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#800000;"&gt;end_address&lt;/span&gt;&lt;span style="color:#000000;"&gt;: &lt;/span&gt;&lt;span style="color:#098658;"&gt;0x800000&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#800000;"&gt;region&lt;/span&gt;&lt;span style="color:#000000;"&gt;: &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;external_flash&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#800000;"&gt;size&lt;/span&gt;&lt;span style="color:#000000;"&gt;: &lt;/span&gt;&lt;span style="color:#098658;"&gt;0x800000&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#098658;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;color:#000000;font-size:inherit;"&gt;If I setup this command: CONFIG_PM_PARTITION_REGION_SETTINGS_STORAGE_EXTERNAL=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;color:#000000;font-size:inherit;"&gt;on file prj.conf and I press &amp;quot;Build all configurations&amp;quot; return this error I showed.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;color:#000000;font-size:inherit;"&gt;With CONFIG_PM_PARTITION_REGION_SETTINGS_STORAGE_EXTERNAL=n works but don&amp;#39;t create any &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;color:#000000;font-size:inherit;"&gt;partition.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;color:#000000;font-size:inherit;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;color:#000000;font-size:inherit;"&gt;I used as base, peripheral-uart example.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;color:#000000;font-size:inherit;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;color:#000000;font-size:inherit;"&gt;Here are the codes:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;color:#000000;font-size:inherit;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;color:#000000;font-size:inherit;"&gt;&lt;pre class="ui-code" data-mode="text"&gt;#
# Copyright (c) 2018 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# Enable the UART driver
CONFIG_UART_ASYNC_API=y
CONFIG_NRFX_UARTE0=y
CONFIG_SERIAL=y

CONFIG_GPIO=y

# Make sure printk is printing to the UART console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

CONFIG_HEAP_MEM_POOL_SIZE=10000

CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME=&amp;quot;Flavio_Service&amp;quot;
CONFIG_BT_DEVICE_APPEARANCE=833
CONFIG_BT_MAX_CONN=1
CONFIG_BT_MAX_PAIRED=1
CONFIG_BT_L2CAP_TX_MTU=247


CONFIG_BT_L2CAP_TX_BUF_COUNT=2
###CONFIG_BT_CTLR_RX_BUFFERS=1
CONFIG_BT_BUF_ACL_TX_SIZE=247



# Enable the NUS service
CONFIG_BT_NUS=y

# Enable bonding
CONFIG_BT_SETTINGS=y
CONFIG_SETTINGS=y


CONFIG_NORDIC_QSPI_NOR=y
CONFIG_FLASH=y
##CONFIG_MPU_ALLOW_FLASH_WRITE=y

CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
##CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=1024
CONFIG_SETTINGS_NVS=y
CONFIG_NVS=y
CONFIG_PARTITION_MANAGER_ENABLED=y
CONFIG_FILE_SYSTEM=y

CONFIG_PM_PARTITION_REGION_SETTINGS_STORAGE_EXTERNAL=y



# Enable DK LED and Buttons library
CONFIG_DK_LIBRARY=y

# This example requires more workqueue stack
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

# Config logger
CONFIG_LOG=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_UART=n
CONFIG_LOG_PRINTK=n

CONFIG_ASSERT=y



# SPI
CONFIG_SPI=y

## enable timer funcions
##https://docs.zephyrproject.org/latest/kernel/timing_functions/index.html
CONFIG_TIMING_FUNCTIONS=y

##https://docs.zephyrproject.org/1.14.1/reference/kernel/timing/clocks.html
CONFIG_SYS_CLOCK_EXISTS=y


###FLASH CONFIG -- FLAVIO
CONFIG_PRINTK=y


##CONFIG_CBPRINTF_FP_SUPPORT=y

CONFIG_NEWLIB_LIBC=y
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y

CONFIG_ADC=y

CONFIG_ADC_NRFX_ADC=y
CONFIG_ADC_NRFX_ADC_CHANNEL_COUNT=6
&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;color:#000000;font-size:inherit;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;color:#000000;font-size:inherit;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;color:#000000;font-size:inherit;"&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void flash_test_(void) {
  //C:\ncs\v2.3.0-rc1\zephyr\include\zephyr\devicetree\fixed-partitions.h
   //https://elinux.org/Device_Tree_Usage#How_Addressing_Works

   int err = 0;
   uint32_t size;


#define FLASH_DEVICE &amp;quot;mx25r6435f@0&amp;quot; 

const struct device *flash_dev = device_get_binding(FLASH_DEVICE);
struct flash_area *my_area_partition;
my_area_partition = (struct flash_area*)k_malloc(sizeof(struct flash_area));
my_area_partition-&amp;gt;fa_dev=&amp;amp;flash_dev;
//err=flash_area_open(FIXED_PARITION_ID(external_partition), &amp;amp;my_area_partition);
//err=flash_area_open(external_partition, &amp;amp;my_area_partition);
err=flash_area_open(DT_FIXED_PARTITION_ID(DT_NODE_BY_FIXED_PARTITION_LABEL(partition_0)), &amp;amp;my_area_partition);

   printf(&amp;quot;Result Open:%d \n&amp;quot;, err);

   printf(&amp;quot;fa_id %d device_id %d\n&amp;quot;, my_area_partition-&amp;gt;fa_id,my_area_partition-&amp;gt;fa_device_id);
  
   err = flash_area_erase(my_area_partition, 0, my_area_partition-&amp;gt;fa_size);
   printf(&amp;quot;Result Erase:%d size=%lu \n&amp;quot;, err,my_area_partition-&amp;gt;fa_size);
 
   uint32_t position_info = 20;
   uint32_t quantity_of_bytes = sizeof(uint32_t);
   uint32_t buf_word = 0U;

   err = flash_area_read(my_area_partition, position_info, &amp;amp;buf_word, quantity_of_bytes);
   printf(&amp;quot;1  Data read: %x\n&amp;quot;, buf_word);
   printf(&amp;quot;2  Status Read:%d \n&amp;quot;, err);

   buf_word = 0x51525357;
   err = flash_area_write(my_area_partition, position_info, &amp;amp;buf_word, quantity_of_bytes);
   printf(&amp;quot;3  Status Write:%d \n&amp;quot;, err);

   buf_word = 0x0;
   err = flash_area_read(my_area_partition, position_info, &amp;amp;buf_word, quantity_of_bytes);
   printf(&amp;quot;4  Data read: %x\n&amp;quot;, buf_word);
   printf(&amp;quot;5  Status Read:%d \n&amp;quot;, err);

   err = flash_area_erase(my_area_partition, 0, my_area_partition-&amp;gt;fa_size);
   printf(&amp;quot;Result Erase:%d \n&amp;quot;, err);

   buf_word = 0x51525358;
   err = flash_area_write(my_area_partition, position_info, &amp;amp;buf_word, quantity_of_bytes);
   printf(&amp;quot;6  Status Write:%d \n&amp;quot;, err);

   buf_word = 0x0;

   err = flash_area_read(my_area_partition, position_info, &amp;amp;buf_word, quantity_of_bytes);
   printf(&amp;quot;7  Data read: %x\n&amp;quot;, buf_word);
   printf(&amp;quot;8  Status Read:%d \n&amp;quot;, err);


}&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;color:#000000;font-size:inherit;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;color:#000000;font-size:inherit;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;color:#000000;font-size:inherit;"&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/*
 * Copyright (c) 2022 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
 */

/{
	
	chosen {
		nordic,nus-uart = &amp;amp;uart0;
		nordic,pm-ext-flash = &amp;amp;mx25r64;
		nordic,nrf-adc  = &amp;amp;adc; 
	};

	aliases {
		adc = &amp;amp;adc;
		dg0 = &amp;amp;dig0;
		dg1 = &amp;amp;dig1;
		dg2 = &amp;amp;dig2;
		dg3 = &amp;amp;dig3;
		dg4 = &amp;amp;dig4;
	};

	digital {
		compatible = &amp;quot;gpio-keys&amp;quot;;
		dig0: dig_0 {
			gpios = &amp;lt; &amp;amp;gpio1 0x04 (GPIO_PULL_UP | GPIO_ACTIVE_HIGH) &amp;gt;;
			label = &amp;quot;Digital Input 0&amp;quot;;
			
		};
		dig1: dig_1 {
			gpios = &amp;lt; &amp;amp;gpio1 0x05 (GPIO_PULL_UP | GPIO_ACTIVE_HIGH) &amp;gt;;
			label = &amp;quot;Digital Input 1&amp;quot;;
		};
		dig2: dig_2 {
			gpios = &amp;lt; &amp;amp;gpio1 0x06 (GPIO_PULL_UP | GPIO_ACTIVE_HIGH) &amp;gt;;
			label = &amp;quot;Digital Input 2&amp;quot;;
		};
		dig3: dig_3 {
			gpios = &amp;lt; &amp;amp;gpio1 0x07 (GPIO_PULL_UP | GPIO_ACTIVE_HIGH) &amp;gt;;
			label = &amp;quot;Digital Input 3&amp;quot;;
		};
		dig4: dig_4 {
			gpios = &amp;lt; &amp;amp;gpio1 0x08 (GPIO_PULL_UP | GPIO_ACTIVE_HIGH) &amp;gt;;
			label = &amp;quot;Digital Input 4&amp;quot;;
		};

	};

 };

//https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/api/bindings/adc/nordic%2Cnrf-adc.html#dtbinding-nordic-nrf-adc
//https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/api/bindings.html#nordic-semiconductor-nordic


&amp;amp;adc {
	#address-cells = &amp;lt;1&amp;gt;;
	#size-cells = &amp;lt;0&amp;gt;;
	
   /* verify c:\ncs\v2.3.0-rc1\zephyr\boards\arm\nrf5340dk_nrf5340\nrf5340_cpuapp_common.dts
   &amp;lt;0 &amp;amp;adc 0&amp;gt;,	/* A0 = P0.4 = AIN0 
   &amp;lt;1 &amp;amp;adc 1&amp;gt;,	/* A1 = P0.5 = AIN1 
   &amp;lt;2 &amp;amp;adc 2&amp;gt;,	/* A2 = P0.6 = AIN2 
   &amp;lt;3 &amp;amp;adc 3&amp;gt;,	/* A3 = P0.7 = AIN3 
   &amp;lt;4 &amp;amp;adc 4&amp;gt;,	/* A4 = P0.25 = AIN4 */


	channel@0 {
		reg = &amp;lt;0&amp;gt;;
		zephyr,gain = &amp;quot;ADC_GAIN_1_6&amp;quot;;
		zephyr,reference = &amp;quot;ADC_REF_INTERNAL&amp;quot;;
		zephyr,acquisition-time = &amp;lt;ADC_ACQ_TIME_DEFAULT&amp;gt;;
		zephyr,input-positive = &amp;lt;NRF_SAADC_AIN1&amp;gt;; /* P0.05 */
		zephyr,resolution = &amp;lt;14&amp;gt;;
	};

	channel@1 {
		reg = &amp;lt;1&amp;gt;;
		zephyr,gain = &amp;quot;ADC_GAIN_1_6&amp;quot;;
		zephyr,reference = &amp;quot;ADC_REF_INTERNAL&amp;quot;;
		zephyr,acquisition-time = &amp;lt;ADC_ACQ_TIME_DEFAULT&amp;gt;;
		zephyr,input-positive = &amp;lt;NRF_SAADC_AIN2&amp;gt;; /* P0.06 */
		zephyr,resolution = &amp;lt;14&amp;gt;;
		zephyr,oversampling = &amp;lt;8&amp;gt;;
	};

	channel@2 {
		reg = &amp;lt;2&amp;gt;;
		zephyr,gain = &amp;quot;ADC_GAIN_1_6&amp;quot;;
		zephyr,reference = &amp;quot;ADC_REF_INTERNAL&amp;quot;;
		zephyr,acquisition-time = &amp;lt;ADC_ACQ_TIME_DEFAULT&amp;gt;;
		zephyr,input-positive = &amp;lt;NRF_SAADC_AIN3&amp;gt;; /* P0.07 */
		zephyr,resolution = &amp;lt;14&amp;gt;;
		zephyr,oversampling = &amp;lt;8&amp;gt;;
	};

	channel@3 {
		reg = &amp;lt;3&amp;gt;;
		zephyr,gain = &amp;quot;ADC_GAIN_1_6&amp;quot;;
		zephyr,reference = &amp;quot;ADC_REF_INTERNAL&amp;quot;;
		zephyr,acquisition-time = &amp;lt;ADC_ACQ_TIME_DEFAULT&amp;gt;;
		zephyr,input-positive = &amp;lt;NRF_SAADC_AIN4&amp;gt;;/* P0.25 */ 
		zephyr,resolution = &amp;lt;14&amp;gt;;
		zephyr,oversampling = &amp;lt;8&amp;gt;;
	};

	channel@4 {
		reg = &amp;lt;4&amp;gt;;
		zephyr,gain = &amp;quot;ADC_GAIN_1_6&amp;quot;;
		zephyr,reference = &amp;quot;ADC_REF_INTERNAL&amp;quot;;
		zephyr,acquisition-time = &amp;lt;ADC_ACQ_TIME_DEFAULT&amp;gt;;
		zephyr,input-positive = &amp;lt;NRF_SAADC_VDD&amp;gt;; //VDD
		zephyr,resolution = &amp;lt;14&amp;gt;;
		zephyr,oversampling = &amp;lt;8&amp;gt;;
	};

	channel@7 {
		reg = &amp;lt;7&amp;gt;;
		zephyr,gain = &amp;quot;ADC_GAIN_1_5&amp;quot;;
		zephyr,reference = &amp;quot;ADC_REF_VDD_1_4&amp;quot;;
		zephyr,vref-mv = &amp;lt;750&amp;gt;;
		zephyr,acquisition-time = &amp;lt;ADC_ACQ_TIME_DEFAULT&amp;gt;;
		zephyr,input-positive = &amp;lt;NRF_SAADC_AIN6&amp;gt;; /* P0.30 */
		zephyr,input-negative = &amp;lt;NRF_SAADC_AIN7&amp;gt;; /* P0.31 */
		zephyr,resolution = &amp;lt;12&amp;gt;;
	};
	io-channels = &amp;lt;&amp;amp;adc 0&amp;gt;, &amp;lt;&amp;amp;adc 1&amp;gt;,&amp;lt;&amp;amp;adc 2&amp;gt;,&amp;lt;&amp;amp;adc 3&amp;gt;,&amp;lt;&amp;amp;adc 4&amp;gt;,&amp;lt;&amp;amp;adc 7&amp;gt;;
};





&amp;amp;mx25r64 {
	label =&amp;quot;memoria&amp;quot;;
	
	partitions {
	 compatible = &amp;quot;fixed-partitions&amp;quot;;
	 #address-cells = &amp;lt;1&amp;gt;;
	 #size-cells = &amp;lt;1&amp;gt;;
	 
	 partition1_label: partition@0 {
		label = &amp;quot;partition_0&amp;quot;;  //32 pages of 4kbytes = 128k
		reg = &amp;lt;0x00000000 0x000002FFF&amp;gt;;
	
	 };
     
	 partition2_label: partition@3000 {
		label = &amp;quot;partition_1&amp;quot;; //32 pages of 4kbytes = 128k
		reg = &amp;lt;0x00003000 0x000003FFF&amp;gt;;
	
	 };

	 partition3_label: partition@40000 {
		label = &amp;quot;partition_2&amp;quot;;      //48 pages of 4bytes = 192k
		reg = &amp;lt;0x00040000 0x00002FFFF&amp;gt;;
	
	 };

	 partition4_label: partition@70000 {
		label = &amp;quot;partition_3&amp;quot;;   //48 pages of 4kbytes = 192k
		reg = &amp;lt;0x00070000 0x00002FFFF&amp;gt;;
	
	 };

	 partition5_label: partition@110000 {
		label = &amp;quot;partition_4&amp;quot;; //1797 pages of 4kbytes = 7Mb
		reg = &amp;lt;0x00110000 0x0007FFFFF&amp;gt;;
	
	 };
        //TOTAL USED 768K

	};

};



&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;color:#000000;font-size:inherit;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;color:#000000;font-size:inherit;"&gt;&lt;pre class="ui-code" data-mode="text"&gt;partition_0:
  address: 0x0
  end_address: 0x1FFF
  region: external_flash
  size: 0x2000

partition_1:
  address: 0x2000
  end_address: 0x3FFF
  region: external_flash
  size: 0x2000
&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;color:#000000;font-size:inherit;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;color:#000000;font-size:inherit;"&gt;&lt;pre class="ui-code" data-mode="text"&gt;external_flash:
  base_address: 0x0
  default_driver_kconfig: CONFIG_PM_EXTERNAL_FLASH_HAS_DRIVER
  device: DT_CHOSEN(nordic_pm_ext_flash)
  dynamic_partition: null
  name: external_flash
  placement_strategy: start_to_end
  size: 0x800000&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;color:#000000;font-size:inherit;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Partition Manager for External Memory doesn't create correctly the partitions.</title><link>https://devzone.nordicsemi.com/thread/415567?ContentTypeID=1</link><pubDate>Wed, 15 Mar 2023 20:26:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23c13949-ee06-44ce-8e96-758246ab6eae</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]If I enable this flag the compiler works well[/quote][quote user=""] If I uncomment, these errors appears:[/quote]
&lt;p&gt;Could you please clarify what works well and what not, and in which cases - enabled or disabled configuration option?&lt;br /&gt;&lt;br /&gt;Could you elaborate on what you try to achieve?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>