<?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>Using MCUBoot with nRF5340</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/115570/using-mcuboot-with-nrf5340</link><description>Hello, 
 I try to figure out, how to correctly setup MCUboot for an nrf5340, so that: 
 
 Application is updatable 
 BT Stack is updatable 
 Firmware Updates are encrypted and signed 
 Updates are stored in external flash memory 
 No need to update the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 11 Sep 2025 10:41:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/115570/using-mcuboot-with-nrf5340" /><item><title>RE: Using MCUBoot with nRF5340</title><link>https://devzone.nordicsemi.com/thread/548475?ContentTypeID=1</link><pubDate>Thu, 11 Sep 2025 10:41:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c75f0e21-e38a-436c-81ce-54a8e9bbe007</guid><dc:creator>a.tv</dc:creator><description>&lt;p&gt;Hej!&lt;br /&gt;I wanted to thank you for this example! It&amp;#39;s the only example that I found that actually worked for&amp;nbsp;my 5340 board and it gave me a lot of inspiration on how I need to configure my project.&lt;/p&gt;
&lt;p&gt;Thanks a lot!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using MCUBoot with nRF5340</title><link>https://devzone.nordicsemi.com/thread/507345?ContentTypeID=1</link><pubDate>Tue, 22 Oct 2024 12:03:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42eed144-a45f-45fd-ad48-aa426bb680c5</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Torsten,&lt;/p&gt;
[quote user="Torsten Robitzki"]&lt;span&gt;Thanks for the example, but it doesn&amp;#39;t build correctly&amp;nbsp;(board is unknown). When I change the board&amp;nbsp;to&amp;nbsp;&amp;nbsp;`&lt;/span&gt;&lt;span&gt;nrf5340dk/nrf5340/cpuapp` I get some configuration warnings:&lt;/span&gt;[/quote]
&lt;p&gt;Sorry, I see now that it is only compatible with the SPI NOR driver, not the QSPI NOR driver. This means that if you want to test it, you would have to place the external flash device on a SPI bus and use the&amp;nbsp;`jedec,spi-nor` binding instead of&amp;nbsp;&amp;quot;nordic,qspi-nor&amp;quot;. The SPI flash sample works with QSPI, but it does not read the JDEC information.&lt;/p&gt;
[quote user="Torsten Robitzki"]That&amp;#39;s the major problem with examples. You never know, which bit is really important. Is the name of the key file important? Sure, I could have copied your entire example, but then I would also end up with an application, that does exactly what your example does. Unfortunately, that&amp;#39;s not what my customer needs ;-)[/quote]
&lt;p&gt;I understand the challenges, and I hope this is something we can improve on. This is particularly a problem with the 53 series, as there are quite a few additional configuration options to handle multi-image DFU.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using MCUBoot with nRF5340</title><link>https://devzone.nordicsemi.com/thread/507316?ContentTypeID=1</link><pubDate>Tue, 22 Oct 2024 11:11:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e162d226-8eef-45e4-a089-30ca3223d0ca</guid><dc:creator>Torsten Robitzki</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;the linker error above happens, when I use a different name for the external flash memory. Only, when I name that chip&amp;nbsp;&lt;span&gt;mx25r64, I do not get that linker error.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks for the example, but it doesn&amp;#39;t build correctly&amp;nbsp;(board is unknown). When I change the board&amp;nbsp;to&amp;nbsp;&amp;nbsp;`&lt;/span&gt;&lt;span&gt;nrf5340dk/nrf5340/cpuapp` I get some configuration warnings:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;warning: SPI_NOR (defined at soc/gaisler/gr716a/Kconfig.defconfig:18, drivers/flash/Kconfig.nor:4)
was assigned the value &amp;#39;y&amp;#39; but got the value &amp;#39;n&amp;#39;. Check these unsatisfied dependencies: ((FLASH &amp;amp;&amp;amp;
SOC_GR716A) || (DT_HAS_JEDEC_SPI_NOR_ENABLED &amp;amp;&amp;amp; FLASH))&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The `CONFIG_NORDIC_QSPI_NOR` configuration was explicitly set to `y`. Then I change the device name to `flash_ext: MT25QU01GBBB@0 `:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;qspi {
    /*
     * Name of the device has to be mx25r64; Otherwise,
     * the driver is not found during linking
     */
/*    mx25r64: mx25r6435f@0 {*/
    flash_ext: MT25QU01GBBB@0 {
        compatible = &amp;quot;nordic,qspi-nor&amp;quot;;
        reg = &amp;lt; 0x0 &amp;gt;;
        writeoc = &amp;quot;pp4io&amp;quot;;
        readoc = &amp;quot;read4io&amp;quot;;
        sck-frequency = &amp;lt; 90000000 &amp;gt;;
        jedec-id = [ 20 BB 21 ];
        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; 0x8000000 &amp;gt;;
        has-dpd;
        t-enter-dpd = &amp;lt; 0x2710 &amp;gt;;
        t-exit-dpd = &amp;lt; 0x88b8 &amp;gt;;
    };
};

/ {
    chosen {
/*        nordic,pm-ext-flash = &amp;amp;mx25r64;*/
        nordic,pm-ext-flash = &amp;amp;flash_ext;
    };
};
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I get an undefined symbol to `&lt;/span&gt;&lt;span&gt;__device_dts_ord_142`.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, your example used `SB_CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y` and I even tried that setting and your keys on my course to find some configuration that builds. And as soon as it build, I changed it back to my&amp;nbsp;&lt;/span&gt;keys and thus to the algorithm, I&amp;#39;ve picked.&lt;/p&gt;
&lt;p&gt;That&amp;#39;s the major problem with examples. You never know, which bit is really important. Is the name of the key file important? Sure, I could have copied your entire example, but then I would also end up with an application, that does exactly what your example does. Unfortunately, that&amp;#39;s not what my customer needs ;-)&lt;/p&gt;
&lt;p&gt;Anyway: Thanks a lot! This was extremely helpful. Thanks for your patience! I think, we can close this.&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Torsten&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using MCUBoot with nRF5340</title><link>https://devzone.nordicsemi.com/thread/507305?ContentTypeID=1</link><pubDate>Tue, 22 Oct 2024 10:16:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70956a83-9130-41a3-abd6-b48a504bdbd7</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Torsten,&lt;/p&gt;
[quote user="Torsten Robitzki"]my idea, was to define some device, similar to the&amp;nbsp;mx25r64 (with a changed&amp;nbsp;jedec-id, frequency, etc.) and then to pick that device with the `nordic,pm-ext-flash` in the&amp;nbsp;chosen section:[/quote]
&lt;p&gt;Thanks for the clarification. The name should not matter as long as the actual configuration parameters match your flash ic. The&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/drivers/jesd216/README.html"&gt;JESD216 flash&lt;/a&gt;&amp;nbsp;sample can be used to verify the configuration.&lt;/p&gt;
[quote user="Torsten Robitzki"]&lt;p&gt;but this results in a linker error: &amp;quot;&lt;span&gt;undefined reference to `__device_dts_ord_142`&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;When I rename the device above to `mx25r64: mx25r6435f@0`, everything works fine (including the jedec test in the driver). So anyway, I have a solution. I will add some comment to the configuration.&lt;/p&gt;[/quote]
&lt;p&gt;The error suggests that the Kconfig symbol for this driver is not enabled (&lt;a href="https://docs.zephyrproject.org/latest/build/dts/troubleshooting.html#undefined-reference-to-device-dts-ord-n"&gt;https://docs.zephyrproject.org/latest/build/dts/troubleshooting.html#undefined-reference-to-device-dts-ord-n&lt;/a&gt;). I assume &amp;#39;142&amp;#39; is referring to the&amp;nbsp;flash_ext node in your build. So maybe CONFIG_NORDIC_QSPI_NOR did not get selected?&lt;/p&gt;
[quote user="Torsten Robitzki"]&lt;p&gt;For the bootloader itself: I found out, after some lengthy debugging, that the primary image was flashed with a&amp;nbsp;&lt;span&gt;RSA3072 hash, while MCUBoot was looking for a&amp;nbsp;&lt;/span&gt;&lt;span&gt;RSA2048 hash. The MCUBoot error message was: &amp;quot;Image in the primary slot is not valid!&amp;quot;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;After changing algorithm and key to&amp;nbsp;ECDSA_P256, the bootloader is starting the application.&lt;/span&gt;&lt;/p&gt;[/quote]
&lt;p&gt;I would have assumed that this would&amp;nbsp;lead to a build error, but it seems like that is not the case. I had&amp;nbsp;SB_CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y in my sample.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using MCUBoot with nRF5340</title><link>https://devzone.nordicsemi.com/thread/507185?ContentTypeID=1</link><pubDate>Mon, 21 Oct 2024 14:59:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9336ece-f2d5-44bb-9f74-4b104e0dcf59</guid><dc:creator>Torsten Robitzki</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;my idea, was to define some device, similar to the&amp;nbsp;mx25r64 (with a changed&amp;nbsp;jedec-id, frequency, etc.) and then to pick that device with the `nordic,pm-ext-flash` in the&amp;nbsp;chosen section:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;qspi {
    flash_ext: MT25QU01GBBB@0 {
        compatible = &amp;quot;nordic,qspi-nor&amp;quot;;
        reg = &amp;lt; 0x0 &amp;gt;;
        writeoc = &amp;quot;pp4io&amp;quot;;
        readoc = &amp;quot;read4io&amp;quot;;
        sck-frequency = &amp;lt; 90000000 &amp;gt;;
        jedec-id = [ 20 BB 21 ];
        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; 0x4000000 &amp;gt;;
        has-dpd;
        t-enter-dpd = &amp;lt; 0x2710 &amp;gt;;
        t-exit-dpd = &amp;lt; 0x88b8 &amp;gt;;
    };
};

/ {
    chosen {
        nordic,pm-ext-flash = &amp;amp;flash_ext;
    };
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;but this results in a linker error: &amp;quot;&lt;span&gt;undefined reference to `__device_dts_ord_142`&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;When I rename the device above to `mx25r64: mx25r6435f@0`, everything works fine (including the jedec test in the driver). So anyway, I have a solution. I will add some comment to the configuration.&lt;/p&gt;
&lt;p&gt;For the bootloader itself: I found out, after some lengthy debugging, that the primary image was flashed with a&amp;nbsp;&lt;span class="cm"&gt;RSA3072 hash, while MCUBoot was looking for a&amp;nbsp;&lt;/span&gt;&lt;span class="cp"&gt;RSA2048 hash. The MCUBoot error message was: &amp;quot;Image in the primary slot is not valid!&amp;quot;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="cp"&gt;After changing algorithm and key to&amp;nbsp;ECDSA_P256, the bootloader is starting the application.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="cp"&gt;Thanks a lot for your help,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="cp"&gt;Torsten&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using MCUBoot with nRF5340</title><link>https://devzone.nordicsemi.com/thread/507102?ContentTypeID=1</link><pubDate>Mon, 21 Oct 2024 10:09:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d77a373b-429b-4170-b2cf-a47241d0d34d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Torsten,&lt;/p&gt;
[quote user="Torsten Robitzki"]I managed to add the used external NOR flash chip to the configuration (I had to name it&amp;nbsp;mx25r64, even thought, it is a totally different chip.[/quote]
&lt;p&gt;The chosen must point to the flash device you have in your QSPI devictree node if it is not the same as the one on the DK.&lt;/p&gt;
[quote user="Torsten Robitzki"]Now, all binaries (Application, Network, MCUBoot and&amp;nbsp;&lt;span&gt;b0n) are building. The bootloader starts, but refuses to start the binary in the primary slot:&lt;/span&gt;[/quote]
&lt;p&gt;Please create a new file named mcuboot.conf in your sysbuild folder that contain the following lines:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# Configure MCUboot features
CONFIG_BOOT_MAX_IMG_SECTORS=256
CONFIG_MCUBOOT_DOWNGRADE_PREVENTION=y
CONFIG_BOOT_ECDSA_TINYCRYPT=y

# Enable flash simulator
CONFIG_PCD_APP=y
CONFIG_FLASH_SIMULATOR=y
CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y
CONFIG_FLASH_SIMULATOR_STATS=n

CONFIG_NORDIC_QSPI_NOR=y
CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096

CONFIG_BOOT_IMAGE_ACCESS_HOOKS=y
CONFIG_BOOT_IMAGE_ACCESS_HOOK_NRF5340=y

CONFIG_MULTITHREADING=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The do a pristine build.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using MCUBoot with nRF5340</title><link>https://devzone.nordicsemi.com/thread/507086?ContentTypeID=1</link><pubDate>Mon, 21 Oct 2024 09:07:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61b8b9f4-dd0d-4755-8bf0-168647ab5fa8</guid><dc:creator>Torsten Robitzki</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;I managed to add the used external NOR flash chip to the configuration (I had to name it&amp;nbsp;mx25r64, even thought, it is a totally different chip. Otherwise, I got linker errors: `&lt;span&gt;undefined reference to `__device_dts_ord_142&amp;#39;`&lt;/span&gt;).&lt;/p&gt;
&lt;p&gt;Now, all binaries (Application, Network, MCUBoot and&amp;nbsp;&lt;span&gt;b0n) are building. The bootloader starts, but refuses to start the binary in the primary slot:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;00&amp;gt; *** Booting MCUboot v2.1.0-dev-f30dce197f34 ***
00&amp;gt; *** Using nRF Connect SDK v2.7.99-cs2-d73b286ff6d9 ***
00&amp;gt; *** Using Zephyr OS v3.6.99-1b696c108812 ***
00&amp;gt; [00:00:00.324,035] &amp;lt;inf&amp;gt; mcuboot: Starting bootloader
00&amp;gt; [00:00:00.324,432] &amp;lt;wrn&amp;gt; mcuboot: Failed reading sectors; BOOT_MAX_IMG_SECTORS=128 - too small?
00&amp;gt; [00:00:00.325,195] &amp;lt;inf&amp;gt; mcuboot: Image index: 1, Swap type: none
00&amp;gt; [00:00:00.325,500] &amp;lt;err&amp;gt; mcuboot: Image in the primary slot is not valid!
00&amp;gt; [00:00:00.325,531] &amp;lt;err&amp;gt; mcuboot: Unable to find bootable image&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;At the primaries start address, there is an application (at least it looks like a vector table). So I guess, that MCUBoot is not able to correctly verify the image.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;During the build of MCUboot, there are log messages, that indicate, that the bootloader is build with the correct keys embedded:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;MCUBoot bootloader key file: &amp;lt;absoulte path to pem file&amp;gt;
MCUBoot bootloader encryption key file: &amp;lt;absoulte path to pem file&amp;gt;&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;While during the build of the application, I see this warning, that let me suspect, that maybe for the build of the application an other key is used.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;      --------------------------------------------------------------
      --- WARNING: Using generated NSIB public/private key-pair. ---
      --- It should not be used for production.                  ---
      --- See SB_CONFIG_SECURE_BOOT_SIGNING_KEY_FILE             ---
      --------------------------------------------------------------&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Interesting enough, I saw the same discrepancy with your example. So, I toke an nRF5340 eval board and installed your example. But in that case, the application is running (I see a blinking LED and a connectable BLE service).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;As the primary is stored in internal flash memory, I suspect, that it could not be a problem of the configuration of the external flash memory.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Any idea, as to what could be the problem here?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;best regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Torsten&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using MCUBoot with nRF5340</title><link>https://devzone.nordicsemi.com/thread/506940?ContentTypeID=1</link><pubDate>Fri, 18 Oct 2024 13:20:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:290b0f63-7daa-43b0-9d3d-84811f7a06e0</guid><dc:creator>Vidar Berg</dc:creator><description>[quote userid="4223" url="~/f/nordic-q-a/115570/using-mcuboot-with-nrf5340/506935"]Ok, got it now, I missed, that I have to add the same overlay snipped to the configuration of the bootloader (which totally makes sense). As we are not going to support different hardwares, this probably does not need to be as complicated as in your example.[/quote]
&lt;p&gt;In that case, you can just add a file named &amp;#39;mcuboot.overlay&amp;#39; in the sybuild directory which contains the lines below. Just remember to do a pristine/clean build after adding it to allow the build system to detect it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/ {
	chosen {
		nordic,pm-ext-flash = &amp;amp;mx25r64;
	};
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You too! thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using MCUBoot with nRF5340</title><link>https://devzone.nordicsemi.com/thread/506935?ContentTypeID=1</link><pubDate>Fri, 18 Oct 2024 13:11:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6c12896-e660-4a6b-89a7-10563b252a44</guid><dc:creator>Torsten Robitzki</dc:creator><description>&lt;p&gt;Yes, there is a QSPI nor flash on the device and it works. No, haven&amp;#39;t managed, to get that into the final dts file. It is in the final dts file of your example.&lt;/p&gt;
&lt;p&gt;Ok, got it now, I missed, that I have to add the same overlay snipped to the configuration of the bootloader (which totally makes sense). As we are not going to support different hardwares, this probably does not need to be as complicated as in your example. Will figure out, how to do that and will report progress.&lt;/p&gt;
&lt;p&gt;Thanks a lot for your help!!! :-) I wish you a nice and relaxing weekend!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using MCUBoot with nRF5340</title><link>https://devzone.nordicsemi.com/thread/506932?ContentTypeID=1</link><pubDate>Fri, 18 Oct 2024 13:05:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cdafb19-3139-44af-8776-24dce2f124ec</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The settings you listed are not relevant to the problem. Does you have a QSPI flash device on your device?&amp;nbsp;&lt;/p&gt;
[quote userid="4223" url="~/f/nordic-q-a/115570/using-mcuboot-with-nrf5340/506929"]Does&amp;nbsp;this&amp;nbsp;nordic_pm_ext_flash maps to `nordic,pm-ext-flash = &amp;amp;mx25r64;` in the chosen section?[/quote]
&lt;p&gt;Yes. Did you manage to add this chosen for your bootloader?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using MCUBoot with nRF5340</title><link>https://devzone.nordicsemi.com/thread/506929?ContentTypeID=1</link><pubDate>Fri, 18 Oct 2024 12:59:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc02599b-293f-4111-a6f0-42659891e808</guid><dc:creator>Torsten Robitzki</dc:creator><description>&lt;p&gt;Sorry, but I can not directly use your configuration (that&amp;#39;s a general problem of this documentation-by-example approach), because I have an application, that requires certain configurations and I need to somehow merge your configurations with the ones, required by my app.&lt;/p&gt;
&lt;p&gt;`CONFIG_NCS_SAMPLES_DEFAULTS`&amp;nbsp;was applied for testing. Later, I probably have to remove this &amp;quot;catch-all&amp;quot; option and have to figure out, which parts of this are relevant.&lt;/p&gt;
&lt;p&gt;`CONFIG_BT`, `CONFIG_BT_PERIPHERAL` have the same values, `CONFIG_BT_DEVICE_NAME` is set, but to a different value.&lt;/p&gt;
&lt;p&gt;`CONFIG_BT_LBS`, `CONFIG_BT_LBS_POLL_BUTTON` and `CONFIG_DK_LIBRARY` are not used, as I don&amp;#39;t want to receive the firmware updates via that BLE service.&lt;/p&gt;
&lt;p&gt;`CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE` is set to the exact value.&lt;/p&gt;
&lt;p&gt;Adding `&lt;span&gt;CONFIG_NCS_SAMPLES_DEFAULTS` does not solve the issue.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I made an other observation: When I change the device name in `device: DT_CHOSEN(nordic_pm_ext_flash)` from the `pm_static.yml` into something, that not exists, I do not get any build errors.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Does&amp;nbsp;this&amp;nbsp;nordic_pm_ext_flash maps to `nordic,pm-ext-flash = &amp;amp;mx25r64;` in the chosen section?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using MCUBoot with nRF5340</title><link>https://devzone.nordicsemi.com/thread/506919?ContentTypeID=1</link><pubDate>Fri, 18 Oct 2024 12:39:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:571eb3e5-829e-4d4e-8a41-9127a3dbb031</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Yes, but the app.overlay is normally not applied to the mcuboot build, only the main application. I see you are also disabling the QSPI node. Is the&amp;nbsp;mx25r64 not on your QSPI bus?&lt;/p&gt;
[quote userid="4223" url="~/f/nordic-q-a/115570/using-mcuboot-with-nrf5340/506916"]&lt;span&gt;The only warning I receive from the `&lt;/span&gt;&lt;span&gt;* Running CMake for mcuboot *` is about the RTT configuration. For the application cmake run, I got this warning:&lt;/span&gt;[/quote]
&lt;p&gt;It looks like you are missing the&amp;nbsp;CONFIG_IMG_MANAGER. Did you use&amp;nbsp;my configurations from&amp;nbsp;peripheral_lbs_fota_enc/boards/nrf5340dk_nrf5340_cpuapp.conf?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using MCUBoot with nRF5340</title><link>https://devzone.nordicsemi.com/thread/506916?ContentTypeID=1</link><pubDate>Fri, 18 Oct 2024 12:34:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:781ac464-21e0-410a-84d7-19896f998268</guid><dc:creator>Torsten Robitzki</dc:creator><description>&lt;p&gt;This is the start of my `app.overlay`:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt; &amp;amp;zephyr_udc0 {
    cdc_acm_uart0 {
        compatible = &amp;quot;zephyr,cdc-acm-uart&amp;quot;;
    };
};

/ {
    chosen {
        nordic,pm-ext-flash = &amp;amp;mx25r64;
    };
};

/*
   Disable QSPI peripheral, to not get the Zephyr QSPI driver linked in,
   which would clash with drivers/flash_memory.cpp
 */
&amp;amp;qspi {
    status = &amp;quot;disabled&amp;quot;;
};

...&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve disabled the qspi-disable part of the overlay file, but still there are some entries in `&lt;span&gt;flash_map` with `fa_dev` set to 0 (and the resulting dts still does not contain the required chosen value):&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;(gdb) p/x *flash_map@flash_map_entries
$3 = {{
    fa_id = 0x0,
    pad16 = 0x0,
    fa_off = 0x0,
    fa_size = 0x10000,
    fa_dev = 0x94b0
  }, {
    fa_id = 0x1,
    pad16 = 0x0,
    fa_off = 0x0,
    fa_size = 0x40000,
    fa_dev = 0x949c
  }, {
    fa_id = 0x2,
    pad16 = 0x0,
    fa_off = 0x0,
    fa_size = 0xe0000,
    fa_dev = 0x0
  }, {
    fa_id = 0x3,
    pad16 = 0x0,
    fa_off = 0x10000,
    fa_size = 0x200,
    fa_dev = 0x94b0
  }, {
    fa_id = 0x4,
    pad16 = 0x0,
    fa_off = 0x10000,
    fa_size = 0xe0000,
    fa_dev = 0x94b0
  }, {
    fa_id = 0x5,
    pad16 = 0x0,
    fa_off = 0x10200,
    fa_size = 0xdfe00,
    fa_dev = 0x94b0
  }, {
    fa_id = 0x6,
    pad16 = 0x0,
    fa_off = 0x10200,
    fa_size = 0xdfe00,
    fa_dev = 0x94b0
  }, {
    fa_id = 0x7,
    pad16 = 0x0,
    fa_off = 0x40000,
    fa_size = 0x0,
    fa_dev = 0x949c
  }, {
    fa_id = 0x8,
    pad16 = 0x0,
    fa_off = 0xe0000,
    fa_size = 0x40000,
    fa_dev = 0x0
  }, {
    fa_id = 0x9,
    pad16 = 0x0,
    fa_off = 0xf0000,
    fa_size = 0x10000,
    fa_dev = 0x94b0
  }, {
    fa_id = 0xa,
    pad16 = 0x0,
    fa_off = 0x120000,
    fa_size = 0x6e0000,
    fa_dev = 0x0
  }}
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The number of entries in the array corresponds with the number of entries in pm_static.yml, but the order seems to be different.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The only warning I receive from the `&lt;/span&gt;&lt;span&gt;* Running CMake for mcuboot *` is about the RTT configuration. For the application cmake run, I got this warning:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;    warning: UPDATEABLE_IMAGE_NUMBER (defined at /Users/todi/bloomlife/zephyr-
    workspace/nrf/samples/common/mcumgr_bt_ota_dfu/Kconfig:88, subsys/dfu/Kconfig:95) was assigned the
    value &amp;#39;2&amp;#39; but got the value &amp;#39;&amp;#39;. Check these unsatisfied dependencies:
    (((BOARD_THINGY53_NRF5340_CPUAPP || BOARD_THINGY53_NRF5340_CPUAPP_NS) &amp;amp;&amp;amp; SOC_SERIES_NRF53X &amp;amp;&amp;amp;
    NCS_SAMPLE_MCUMGR_BT_OTA_DFU) || (!MCUBOOT &amp;amp;&amp;amp; IMG_MANAGER)) (=n). See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_UPDATEABLE_IMAGE_NUMBER and/or look up
    UPDATEABLE_IMAGE_NUMBER in the menuconfig/guiconfig interface. The Application Development Primer,
    Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
    helpful too.
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could that be a hint as to where the problem is?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using MCUBoot with nRF5340</title><link>https://devzone.nordicsemi.com/thread/506907?ContentTypeID=1</link><pubDate>Fri, 18 Oct 2024 12:11:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37b3133d-5a79-4b69-8505-6cf1dacb9d6e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks. It appears that you are missing the &amp;#39;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/scripts/partition_manager/partition_manager.html"&gt;nordic,pm-ext-flash&lt;/a&gt;&amp;#39; property in your zephyr.dts. Without this, the bootloader will not know which flash device to use for accessing the partitions in &amp;#39;external_flash&amp;#39;. In my sample, I&amp;nbsp;had a board overlay&amp;nbsp;to&amp;nbsp;set&amp;nbsp;this &amp;#39;chosen&amp;#39; (/peripheral_lbs_fota_enc/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/ {
	chosen {
		nordic,pm-ext-flash = &amp;amp;mx25r64;
	};
};
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using MCUBoot with nRF5340</title><link>https://devzone.nordicsemi.com/thread/506900?ContentTypeID=1</link><pubDate>Fri, 18 Oct 2024 12:04:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3202f367-826a-4ebb-a543-61b174594495</guid><dc:creator>Torsten Robitzki</dc:creator><description>&lt;p&gt;Currently, I try to use a static portions. Thanks for looking into this. Files are renamed to be accepted by your forums software.&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/4530.zephyr.dts"&gt;devzone.nordicsemi.com/.../4530.zephyr.dts&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/6505.pm_5F00_static.yml.txt"&gt;devzone.nordicsemi.com/.../6505.pm_5F00_static.yml.txt&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/4034_2E00_.config.txt"&gt;devzone.nordicsemi.com/.../4034_2E00_.config.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using MCUBoot with nRF5340</title><link>https://devzone.nordicsemi.com/thread/506891?ContentTypeID=1</link><pubDate>Fri, 18 Oct 2024 11:44:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b11e3816-8070-4512-9d02-bb22fbbcbcf3</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Logging over RTT can be unreliable when there are multiple images in the boot chain, as the next image in the boot sequence may overwrite the RTT log buffer in RAM. However, a common reason for the bootloader failing to boot the app and entering FIH_PANIC is that there were an error in configuring the external flash. Can you provide&amp;nbsp;your generated zephyr.dts and .config file? These are located in build/mcuboot/zephyr.&lt;/p&gt;
&lt;p&gt;Also, are you currently testing with or without a static partitioning file? Either way, please provide the&amp;nbsp;partition&amp;nbsp;file as well if possible.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using MCUBoot with nRF5340</title><link>https://devzone.nordicsemi.com/thread/506877?ContentTypeID=1</link><pubDate>Fri, 18 Oct 2024 11:10:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6d22db9-9e21-4b0b-b872-fcfa58035fe0</guid><dc:creator>Torsten Robitzki</dc:creator><description>&lt;p&gt;With your configuration, I was at least able to build all images without error. Now, I&amp;#39;m debugging the bootloader. I&amp;#39;m not able to enable RTT logging. But currently, the startup stops by an attempt to iterate over all images. All flash areas are opened and a few of the 11 flash areas do not have the&amp;nbsp;fa_dev in&amp;nbsp;struct flash_area set.&lt;/p&gt;
&lt;p&gt;This flash_map seem to be build in flash_map_partion_manager.c and there,&amp;nbsp;fa_dev is assigned by `DEVICE_DT_GET_OR_NULL(DT_MTD_FROM_FIXED_PARTITION(part))` which somehow implies, that a value of 0 is expected for that map.&lt;/p&gt;
&lt;p&gt;Now, I wonder, why that member is assigned to 0, if later, at runtime, a value != 0 is expected and how can I figure out, what is going wrong.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using MCUBoot with nRF5340</title><link>https://devzone.nordicsemi.com/thread/506709?ContentTypeID=1</link><pubDate>Thu, 17 Oct 2024 11:34:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e98baf7-c8f9-439b-a1e1-9744357abcdb</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Yes, B0n is required for netcore DFU. It is enabled through the&amp;nbsp;SB_CONFIG_SECURE_BOOT_NETCORE symbol in sysbuild.conf&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using MCUBoot with nRF5340</title><link>https://devzone.nordicsemi.com/thread/506705?ContentTypeID=1</link><pubDate>Thu, 17 Oct 2024 11:32:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f67ae3bd-d3ae-47c1-a6ad-ffb1bbadb2ec</guid><dc:creator>Torsten Robitzki</dc:creator><description>&lt;p&gt;I&amp;#39;m not even able to trigger the error above. My `pm_static.yml` works in your example, albeit the resulting&amp;nbsp;&lt;span&gt;partition_manager_report look different. I guess, I have to revisit every switch and configuration bit and make two clean builds with every change.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Largest difference, I see is that my build does not include the `&lt;/span&gt;&lt;span&gt;b0n` (which I think is required for the update of the bluetooth HCI controller on the radio core).&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using MCUBoot with nRF5340</title><link>https://devzone.nordicsemi.com/thread/506674?ContentTypeID=1</link><pubDate>Thu, 17 Oct 2024 09:49:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:290ac0aa-33d8-4c3e-b5b8-c27815d3ec8d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I&amp;#39;m not sure if I have experienced the same. Could you please try and see if you experience the same with the sample I provided? The linker error for&amp;nbsp;&lt;span&gt;PM_MCUBOOT_PRIMARY_1_ADDRESS will be raised if the flash RAM partition is missing.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using MCUBoot with nRF5340</title><link>https://devzone.nordicsemi.com/thread/506673?ContentTypeID=1</link><pubDate>Thu, 17 Oct 2024 09:37:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67e9cfd0-1e2c-4c6c-94e6-f97566a92f69</guid><dc:creator>Torsten Robitzki</dc:creator><description>&lt;p&gt;Thank you! I will go through that example.&lt;/p&gt;
&lt;p&gt;An other, very annoying observation I made: In the corse&amp;nbsp;to, basically &amp;quot;try and error&amp;quot;, figuring out some settings that fixes build errors, I found, that the build is not reproducible!&lt;/p&gt;
&lt;p&gt;Currently, I have a state, where I completely delete the build folder, start the build with `&lt;span&gt;--pristine` added to the `west build` command and get alternating, two different errors. The one error, is the error above, while building the application.After I received that error, I delete the build folder again and rerun the build command. Every second time, I receive a linker error, while linking the application (a missing symbol, probably not defined due to the first issue).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;As the second error is a linker error, this can not be any effect from parallel build, where the order of build steps could change. I disable the usage of `&lt;/span&gt;ccache`, but the behavior does not change. :-/&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using MCUBoot with nRF5340</title><link>https://devzone.nordicsemi.com/thread/506647?ContentTypeID=1</link><pubDate>Thu, 17 Oct 2024 08:26:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f63556a-1a48-4a0a-bd25-b1dee977caa0</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve created a demo based on the peripheral_lbs sample, please see attached below.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Demo sample&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/peripheral_5F00_lbs_5F00_enc_5F00_fota.zip"&gt;devzone.nordicsemi.com/.../peripheral_5F00_lbs_5F00_enc_5F00_fota.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Disclaimers&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;- DFU with encrypted images is not a feature that has been tested or validated by Nordic (&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/91331/nrf52840-ncs-mcuboot-cc310-enabled-image-encryption"&gt;nRF52840 + NCS + MCUBoot, CC310-enabled image encryption?&lt;/a&gt;&amp;nbsp;) .&lt;/p&gt;
&lt;p&gt;- The cmake signing script does not &lt;span style="text-decoration:line-through;"&gt;sign &lt;/span&gt;encrypt the netcore image. This can be fixed by patching relevant cmake script.&lt;/p&gt;
&lt;p&gt;- The application_dfu.zip generated by the build contains signed but not encrypted images. Use the&amp;nbsp;/build/peripheral_lbs_fota_enc/zephyr/zephyr.signed.encrypted.bin binary instead (application image). The netcore image which is signed but not encrypted is called&amp;nbsp;signed_by_mcuboot_and_b0_ipc_radio.bin and is located in build/.&lt;/p&gt;
&lt;p&gt;- I have not done any extensive testing of this demo, just&amp;nbsp;verified that I was able to update the appcore FW.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>