<?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>9160 MCUBoot external flash second slot</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/87633/9160-mcuboot-external-flash-second-slot</link><description>I&amp;#39;ve been referencing these two tickets pretty closely How to specify signing the key with MCUBoot - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone (nordicsemi.com) and MCUBoot’s secondary image on external flash on nrf9160 - Nordic Q&amp;amp;A - Nordic DevZone</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 11 May 2022 11:14:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/87633/9160-mcuboot-external-flash-second-slot" /><item><title>RE: 9160 MCUBoot external flash second slot</title><link>https://devzone.nordicsemi.com/thread/367373?ContentTypeID=1</link><pubDate>Wed, 11 May 2022 11:14:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24ab59e1-33a9-48ed-a91d-6cb15a31c1ab</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="esisk"]I figured that it was failing because the spi_nor driver was not being enabled in my non-secure application. Once I copied the same configuration variables from my {board_name}.conf file used for MCUBoot into a {board_name_ns}.conf file, the library initialized successfully and I could remotely update the application. I&amp;#39;ll continue to test but my understanding of setting this all has improved and the cryptic root issue I was having has been found.[/quote]
&lt;p&gt;I&amp;#39;m glad to hear that you were able to successfully update your application with this configuration!&lt;/p&gt;
[quote user="esisk"]I&amp;#39;d appreciate it&amp;nbsp;&lt;span&gt;Håkon if you could explain to me the difference between a {board_name}.conf file and the normal prj.conf file?&lt;/span&gt;[/quote]
&lt;p&gt;I&amp;#39;d love to!&lt;/p&gt;
&lt;p&gt;Let&amp;#39;s say that you have a generic &amp;quot;external flash&amp;quot; project that you&amp;#39;re using as a part of your testing, which you want to run on several devices, like the nRF52840 and nRF9160.&lt;/p&gt;
&lt;p&gt;nRF52840 you&amp;#39;d want to configure to use QSPI, and nRF9160 you&amp;#39;d want to configure to use SPI.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the prj.conf, you setup the common CONFIG_ entries, while in the boards/$my_board.conf (and $my_board.overlay), you setup each individual configuration and hardware setup, ie. QSPI for 52840 and SPI for 9160.&lt;/p&gt;
&lt;p&gt;The source code looks similar and the firmware shall&amp;nbsp;run similar on both devices, but the transport layer (and pin configuration) will be different.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 9160 MCUBoot external flash second slot</title><link>https://devzone.nordicsemi.com/thread/367245?ContentTypeID=1</link><pubDate>Tue, 10 May 2022 17:09:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b877bd1a-e0d8-43b2-9c86-a8a376896a56</guid><dc:creator>esisk</dc:creator><description>&lt;p&gt;For some reason I can&amp;#39;t edit my previous response so I&amp;#39;m replying here. Anyway, I actually got the application to boot. Once I set&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_REGULATOR=y
CONFIG_REGULATOR_FIXED=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;in my {board_name}.conf file, the application booted fine. After that, I encountered another error where the fota_download initialization failed due to&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;err&amp;gt; dfu_target_mcuboot: Failed to get device &amp;#39;MX25L3&amp;#39;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I figured that it was failing because the spi_nor driver was not being enabled in my non-secure application. Once I copied the same configuration variables from my {board_name}.conf file used for MCUBoot into a {board_name_ns}.conf file, the library initialized successfully and I could remotely update the application. I&amp;#39;ll continue to test but my understanding of setting this all has improved and the cryptic root issue I was having has been found. I&amp;#39;d appreciate it&amp;nbsp;&lt;span&gt;H&amp;aring;kon if you could explain to me the difference between a {board_name}.conf file and the normal prj.conf file?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 9160 MCUBoot external flash second slot</title><link>https://devzone.nordicsemi.com/thread/367212?ContentTypeID=1</link><pubDate>Tue, 10 May 2022 13:53:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7dc2c6ec-a6b0-45f8-ac4c-596b4d37ad6f</guid><dc:creator>esisk</dc:creator><description>&lt;p&gt;Hey&amp;nbsp;&lt;span&gt;H&amp;aring;kon,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;m still receiving the same error. I iterated on your feedback so here&amp;#39;s the update on my project.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="2115" url="~/f/nordic-q-a/87633/9160-mcuboot-external-flash-second-slot/366849#366849"]In your mcuboot configuration (ie. child_image/mcuboot.conf or child_image/mcuboot/boards/my_board.conf), you should also define the page size of your external flash:[/quote]
&lt;p&gt;Got it. This is my {board_name}.conf file in child_image/mcuboot/boards:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_SPI=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_SPI_NOR=y
# using 4MB ext flash
CONFIG_BOOT_MAX_IMG_SECTORS=1024
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="2115" url="~/f/nordic-q-a/87633/9160-mcuboot-external-flash-second-slot/366849#366849"]The flash must be enabled and turned on prior to the spi_nor subsys is being enabled.[/quote]
&lt;p&gt;That makes sense. I followed the template on GitHub that you shared and updated both of my board file overlays (non-secure and secure) to include a voltage regulator node. Both overlays are the same:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;/ {
	chosen {
		zephyr,bt-uart=&amp;amp;uart0;
        nordic,pm-ext-flash=&amp;amp;mx25l3;
	};

	vdd_pwr: vdd-pwr-ctrl {
		compatible = &amp;quot;regulator-fixed-sync&amp;quot;;
		label = &amp;quot;vdd-pwr-ctrl&amp;quot;;
		regulator-name = &amp;quot;vdd-pwr-ctrl&amp;quot;;
		enable-gpios = &amp;lt;&amp;amp;gpio0 4 GPIO_ACTIVE_HIGH&amp;gt;;
		regulator-boot-on;
	};
};

&amp;amp;uart0 {
    current-speed = &amp;lt;115200&amp;gt;;
	/delete-property/ rts-pin;
	/delete-property/ cts-pin;
	/delete-property/ hw-flow-control;
};

&amp;amp;spi3 {
    /* Cannot be used together with i2c0. */
    status = &amp;quot;okay&amp;quot;;
    sck-pin = &amp;lt;10&amp;gt;;
    miso-pin = &amp;lt;11&amp;gt;;
    mosi-pin = &amp;lt;12&amp;gt;;
    cs-gpios = &amp;lt;&amp;amp;gpio0 9 GPIO_ACTIVE_LOW&amp;gt;;
    mx25l3: mx25l3233f@0 {
        compatible = &amp;quot;jedec,spi-nor&amp;quot;;
        reg = &amp;lt;0&amp;gt;;
        spi-max-frequency = &amp;lt;8000000&amp;gt;;
        label = &amp;quot;MX25L3&amp;quot;;
        jedec-id = [c2 20 16];
        sfdp-bfp = [
            e5 20 f1 ff  ff ff ff 03  44 eb 08 6b  08 3b 04 bb
            ee ff ff ff  ff ff 00 ff  ff ff 00 ff  0c 20 0f 52
            10 d8 00 ff  23 72 f5 00  82 ed 04 cc  44 83 68 44
            30 b0 30 b0  f7 c4 d5 5c  00 be 29 ff  f0 d0 ff ff
        ];
        size = &amp;lt;33554432&amp;gt;;
        has-dpd;
        t-enter-dpd = &amp;lt;10000&amp;gt;;
        t-exit-dpd = &amp;lt;100000&amp;gt;;
		vin-supply = &amp;lt;&amp;amp;vdd_pwr&amp;gt;;
    };
};&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;I&amp;#39;m new to using the regulator API so I may have set something up incorrectly. I am almost positive that the flash not being enabled before the the spi_nor subsys is enabled is my root issue. Thought this would have been the fix but I had no luck with setting it up and would appreciate any more guidance you could provide.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="2115" url="~/f/nordic-q-a/87633/9160-mcuboot-external-flash-second-slot/366849#366849"]What you can do is to copy the generated partitions.yml to your pm_static.yml, and then replace the &amp;quot;mcuboot_secondary&amp;quot; label with the correct address layout.[/quote]
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;From what I&amp;#39;ve read, this shouldn&amp;#39;t have an effect on the spi_nor subsys communicating with the external flash, but here&amp;#39;s my pm_static.yml:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;external_flash:
  address: 0xf2000
  end_address: 0x400000
  placement:
    after:
    - mcuboot_secondary
  region: external_flash
  size: 0x30e000
mcuboot_secondary:
  address: 0x0
  device: MX25L3
  end_address: 0xf2000
  placement:
    align:
      start: 0x0
  region: external_flash
  size: 0xf2000&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 9160 MCUBoot external flash second slot</title><link>https://devzone.nordicsemi.com/thread/366849?ContentTypeID=1</link><pubDate>Mon, 09 May 2022 08:00:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a12a7a2-25e0-479b-b933-0d1ce6e49d27</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In your mcuboot configuration (ie. child_image/mcuboot.conf or child_image/mcuboot/boards/my_board.conf), you should also define the page size of your external flash:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096&lt;/pre&gt;&lt;/p&gt;
[quote user="esisk"]Something of note: the external flash is powered by a voltage regulator which is controlled by the 9160. In my main application, I turn this voltage regulator on in our initialization process in order to communicate with the external flash. I knew that this could pose an issue with this process, so I had to modify MCUBoot&amp;#39;s main function to set the pin high and turn on the regulator so that the external flash is powered and MCUBoot can communicate with it. Is there an earlier point that I should do this at or is this sufficient?[/quote]
&lt;p&gt;The flash must be enabled and turned on prior to the spi_nor subsys is being enabled.&lt;/p&gt;
&lt;p&gt;One way to do this is to use the regulators feature of zephyr:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/reference/peripherals/regulators.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/reference/peripherals/regulators.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s an example of the setup and usage of this feature:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v2.6.99-ncs1/boards/arm/thingy52_nrf52832/thingy52_nrf52832.dts#L69-L75"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v2.6.99-ncs1/boards/arm/thingy52_nrf52832/thingy52_nrf52832.dts#L69-L75&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="esisk"]&lt;strong&gt;Edit:&amp;nbsp;&lt;/strong&gt;After some more experimenting, my application boots fine if I don&amp;#39;t include a pm_static YAML file and just use the one generated by the build system. It is interesting though how that works and I&amp;#39;d appreciate some insight into the difference between these files. I still don&amp;#39;t think saving the second copy of the application to the external flash will work however since there is no partitioned size for it in the generated partitions file.[/quote]
&lt;p&gt;Yes, your generated partitions.yml does not set a proper size for the secondary partition.&lt;/p&gt;
&lt;p&gt;What you can do is to copy the generated partitions.yml to your pm_static.yml, and then replace the &amp;quot;mcuboot_secondary&amp;quot; label with the correct address layout.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 9160 MCUBoot external flash second slot</title><link>https://devzone.nordicsemi.com/thread/366763?ContentTypeID=1</link><pubDate>Fri, 06 May 2022 14:48:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50f2205a-61b1-4a0f-baa5-0d7713fb6ff5</guid><dc:creator>esisk</dc:creator><description>[quote userid="2115" url="~/f/nordic-q-a/87633/9160-mcuboot-external-flash-second-slot/366624#366624"]Since you&amp;#39;re referencing a thread for using external flash + mcuboot, I assume that you want to place the secondary slot on ext-flash.[/quote]
&lt;p&gt;Yes, sorry if that was unclear. I just realized I only described that in the title of my ticket.&amp;nbsp;&lt;/p&gt;
[quote userid="2115" url="~/f/nordic-q-a/87633/9160-mcuboot-external-flash-second-slot/366624#366624"]&lt;p&gt;You want to copy the child_image catalog to your own project (link:&amp;nbsp;&lt;a href="https://github.com/simon-iversen/sdk-nrf/tree/d1a11f2c39e3b8fb0af7652e7e720626f0e1298e/samples/nrf9160/http_update/application_update"&gt;https://github.com/simon-iversen/sdk-nrf/tree/d1a11f2c39e3b8fb0af7652e7e720626f0e1298e/samples/nrf9160/http_update/application_update&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;In addition, you&amp;#39;d want to create a child_image/mcuboot/boards/$BOARD.overlay file that includes the population of the external flash, for example this section taken from the nrf9160dk_nrf9160 board:&lt;/p&gt;[/quote]
&lt;p&gt;I&amp;#39;ve accomplished this task using a 52820 hooked up to an external flash doing what you described. I&amp;#39;m following the same process of including the child_image directory in my main 9160 application directory and including the secure board overlay file in mcuboot&amp;#39;s board directory.&amp;nbsp;&lt;/p&gt;
[quote userid="2115" url="~/f/nordic-q-a/87633/9160-mcuboot-external-flash-second-slot/366624#366624"]Could you try the above and see if this works for you? Remember that you should delete and reconfigure your build after making such changes.[/quote]
&lt;p&gt;I will verify that I&amp;#39;m doing everything as you described.&lt;/p&gt;
&lt;p&gt;While I have you, this is my set up:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;/ {
	chosen {
		zephyr,bt-uart=&amp;amp;uart0;
                nordic,pm-ext-flash=&amp;amp;mx25l3;
	};
};

&amp;amp;uart0 {
    current-speed = &amp;lt;115200&amp;gt;;
	/delete-property/ rts-pin;
	/delete-property/ cts-pin;
	/delete-property/ hw-flow-control;
};

&amp;amp;spi3 {
    /* Cannot be used together with i2c0. */
    status = &amp;quot;okay&amp;quot;;
    sck-pin = &amp;lt;10&amp;gt;;
    miso-pin = &amp;lt;11&amp;gt;;
    mosi-pin = &amp;lt;12&amp;gt;;
    cs-gpios = &amp;lt;&amp;amp;gpio0 9 GPIO_ACTIVE_LOW&amp;gt;;
    mx25l3: mx25l3233f@0 {
        compatible = &amp;quot;jedec,spi-nor&amp;quot;;
        reg = &amp;lt;0&amp;gt;;
        spi-max-frequency = &amp;lt;8000000&amp;gt;;
        label = &amp;quot;MX25L3&amp;quot;;
        jedec-id = [c2 20 16];
        sfdp-bfp = [
            e5 20 f1 ff  ff ff ff 03  44 eb 08 6b  08 3b 04 bb
            ee ff ff ff  ff ff 00 ff  ff ff 00 ff  0c 20 0f 52
            10 d8 00 ff  23 72 f5 00  82 ed 04 cc  44 83 68 44
            30 b0 30 b0  f7 c4 d5 5c  00 be 29 ff  f0 d0 ff ff
        ];
        size = &amp;lt;33554432&amp;gt;;
        has-dpd;
        t-enter-dpd = &amp;lt;10000&amp;gt;;
        t-exit-dpd = &amp;lt;100000&amp;gt;;
    };
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Custom board overlay _ns in main app boards directory and not _ns in mcuboot boards directory&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_SPI=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_SPI_NOR=y
# using 4MB ext flash
CONFIG_BOOT_MAX_IMG_SECTORS=1024&lt;/pre&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Settings in both applications prj.conf files&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Something of note: the external flash is powered by a voltage regulator which is controlled by the 9160. In my main application, I turn this voltage regulator on in our initialization process in order to communicate with the external flash. I knew that this could pose an issue with this process, so I had to modify MCUBoot&amp;#39;s main function to set the pin high and turn on the regulator so that the external flash is powered and MCUBoot can communicate with it. Is there an earlier point that I should do this at or is this sufficient?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edit:&amp;nbsp;&lt;/strong&gt;After some more experimenting, my application boots fine if I don&amp;#39;t include a pm_static YAML file and just use the one generated by the build system. It is interesting though how that works and I&amp;#39;d appreciate some insight into the difference between these files. I still don&amp;#39;t think saving the second copy of the application to the external flash will work however since there is no partitioned size for it in the generated partitions file.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;external_flash:
  address: 0xf2000
  end_address: 0x400000
  placement:
    after:
    - mcuboot_secondary
  region: external_flash
  size: 0x30e000
mcuboot_secondary:
  address: 0x0
  device: MX25L3
  end_address: 0xf2000
  placement:
    align:
      start: 0x0
  region: external_flash
  size: 0xf2000&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;pm_static.yaml&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;pre class="ui-code" data-mode="text"&gt;app:
  address: 0x1c200
  end_address: 0xfe000
  region: flash_primary
  size: 0xe1e00
external_flash:
  address: 0x0
  end_address: 0x400000
  region: external_flash
  size: 0x400000
mcuboot:
  address: 0x0
  end_address: 0xc000
  placement:
    before:
    - mcuboot_primary
  region: flash_primary
  size: 0xc000
mcuboot_pad:
  address: 0xc000
  end_address: 0xc200
  placement:
    before:
    - mcuboot_primary_app
  region: flash_primary
  size: 0x200
mcuboot_primary:
  address: 0xc000
  end_address: 0xfe000
  orig_span: &amp;amp;id001
  - spm
  - mcuboot_pad
  - app
  region: flash_primary
  size: 0xf2000
  span: *id001
mcuboot_primary_app:
  address: 0xc200
  end_address: 0xfe000
  orig_span: &amp;amp;id002
  - app
  - spm
  region: flash_primary
  size: 0xf1e00
  span: *id002
mcuboot_secondary:
  address: 0x0
  device: MX25L3
  end_address: 0x0
  placement:
    align:
      start: 0x4
  region: external_flash
  size: 0x0
nrf_modem_lib_ctrl:
  address: 0x20010000
  end_address: 0x200104e8
  inside:
  - sram_nonsecure
  placement:
    after:
    - spm_sram
    - start
  region: sram_primary
  size: 0x4e8
nrf_modem_lib_rx:
  address: 0x200124e8
  end_address: 0x200144e8
  inside:
  - sram_nonsecure
  placement:
    after:
    - nrf_modem_lib_tx
  region: sram_primary
  size: 0x2000
nrf_modem_lib_sram:
  address: 0x20010000
  end_address: 0x200144e8
  orig_span: &amp;amp;id003
  - nrf_modem_lib_ctrl
  - nrf_modem_lib_tx
  - nrf_modem_lib_rx
  region: sram_primary
  size: 0x44e8
  span: *id003
nrf_modem_lib_tx:
  address: 0x200104e8
  end_address: 0x200124e8
  inside:
  - sram_nonsecure
  placement:
    after:
    - nrf_modem_lib_ctrl
  region: sram_primary
  size: 0x2000
otp:
  address: 0xff8108
  end_address: 0xff83fc
  region: otp
  size: 0x2f4
settings_storage:
  address: 0xfe000
  end_address: 0x100000
  placement:
    before:
    - end
  region: flash_primary
  size: 0x2000
spm:
  address: 0xc200
  end_address: 0x1c200
  inside:
  - mcuboot_primary_app
  placement:
    before:
    - app
  region: flash_primary
  size: 0x10000
spm_sram:
  address: 0x20000000
  end_address: 0x20010000
  inside:
  - sram_secure
  placement:
    after:
    - start
  region: sram_primary
  size: 0x10000
sram_nonsecure:
  address: 0x20010000
  end_address: 0x20040000
  orig_span: &amp;amp;id004
  - sram_primary
  - nrf_modem_lib_ctrl
  - nrf_modem_lib_tx
  - nrf_modem_lib_rx
  region: sram_primary
  size: 0x30000
  span: *id004
sram_primary:
  address: 0x200144e8
  end_address: 0x20040000
  region: sram_primary
  size: 0x2bb18
sram_secure:
  address: 0x20000000
  end_address: 0x20010000
  orig_span: &amp;amp;id005
  - spm_sram
  region: sram_primary
  size: 0x10000
  span: *id005
&lt;/pre&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;generated partitions.yaml&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 9160 MCUBoot external flash second slot</title><link>https://devzone.nordicsemi.com/thread/366624?ContentTypeID=1</link><pubDate>Fri, 06 May 2022 08:21:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5a43d5d-4718-41f4-a6cc-8241f6370fa5</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Since you&amp;#39;re referencing a thread for using external flash + mcuboot, I assume that you want to place the secondary slot on ext-flash.&lt;/p&gt;
&lt;p&gt;These two lines indicate that mcuboot has issues accessing the correct flash device:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;00&amp;gt; NRF_FLASH_DRV_NAME flash dev 0xa0cc
00&amp;gt; [00:00:00.257,781] &amp;lt;wrn&amp;gt; mcuboot: Failed reading sectors; BOOT_MAX_IMG_SECTORS=1024 - too small?&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you look at the project that is linked to in this thread:&lt;/p&gt;
[quote user=""]&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/83590/mcuboot-s-secondary-image-on-external-flash-on-nrf9160/360175#360175"&gt;MCUBoot’s secondary image on external flash on nrf9160 - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone (nordicsemi.com)&lt;/a&gt;&amp;nbsp;[/quote]
&lt;p&gt;You want to copy the child_image catalog to your own project (link:&amp;nbsp;&lt;a href="https://github.com/simon-iversen/sdk-nrf/tree/d1a11f2c39e3b8fb0af7652e7e720626f0e1298e/samples/nrf9160/http_update/application_update"&gt;https://github.com/simon-iversen/sdk-nrf/tree/d1a11f2c39e3b8fb0af7652e7e720626f0e1298e/samples/nrf9160/http_update/application_update&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;In addition, you&amp;#39;d want to create a child_image/mcuboot/boards/$BOARD.overlay file that includes the population of the external flash, for example this section taken from the nrf9160dk_nrf9160 board:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;spi3 {
	status = &amp;quot;okay&amp;quot;;
	sck-pin = &amp;lt;13&amp;gt;;
	mosi-pin = &amp;lt;11&amp;gt;;
	miso-pin = &amp;lt;12&amp;gt;;
	cs-gpios = &amp;lt;&amp;amp;gpio0 25 GPIO_ACTIVE_LOW&amp;gt;;
	mx25r64: mx25r6435f@0 {
		compatible = &amp;quot;jedec,spi-nor&amp;quot;;
		reg = &amp;lt;0&amp;gt;;
		spi-max-frequency = &amp;lt;8000000&amp;gt;;
		label = &amp;quot;MX25R64&amp;quot;;
		jedec-id = [c2 28 17];
		sfdp-bfp = [
			e5 20 f1 ff  ff ff ff 03  44 eb 08 6b  08 3b 04 bb
			ee ff ff ff  ff ff 00 ff  ff ff 00 ff  0c 20 0f 52
			10 d8 00 ff  23 72 f5 00  82 ed 04 cc  44 83 68 44
			30 b0 30 b0  f7 c4 d5 5c  00 be 29 ff  f0 d0 ff ff
		];
		size = &amp;lt;67108864&amp;gt;;
		has-dpd;
		t-enter-dpd = &amp;lt;10000&amp;gt;;
		t-exit-dpd = &amp;lt;35000&amp;gt;;
	};
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note that mcuboot runs in the secure region, so if you&amp;#39;re using nrf9160dk as a basis, it would be child_image/mcuboot/boards/nrf9160dk_nrf9160.overlay (note the lack of _&lt;strong&gt;ns&lt;/strong&gt;&amp;nbsp;in the naming!)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you try the above and see if this works for you? Remember that you should delete and reconfigure your build after making such changes.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>