<?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>nrf52840 bootloader questions</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112322/nrf52840-bootloader-questions</link><description>Hi Devzone, 
 I am building an application for a nrf52840 mounted on a custom board. I wanted to implement the DFU functionality, and I have a few general questions, as well as some issues implementing it. 
 Questions: 
 
 From what I gather, BLE DFU</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 18 Jul 2024 09:29:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112322/nrf52840-bootloader-questions" /><item><title>RE: nrf52840 bootloader questions</title><link>https://devzone.nordicsemi.com/thread/494521?ContentTypeID=1</link><pubDate>Thu, 18 Jul 2024 09:29:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bedc361a-3f7a-48cd-b368-48507ea25123</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Great! Thanks for the update.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 bootloader questions</title><link>https://devzone.nordicsemi.com/thread/494519?ContentTypeID=1</link><pubDate>Thu, 18 Jul 2024 09:23:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e71c402-89c3-453d-a7fe-7d164610339a</guid><dc:creator>Nicolas Goualard</dc:creator><description>&lt;p&gt;Hi Charlie, thanks for all these answer.&lt;br /&gt;I managed to understand why I had trouble making it work on my side:&lt;/p&gt;
&lt;p&gt;- I named the pm_static file pm_static.y&lt;span style="text-decoration:underline;"&gt;a&lt;/span&gt;ml and not pm_static.yml, preventing it from being picked up by the partition manager,&lt;/p&gt;
&lt;p&gt;- in the dts, out of habit I used&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;zephyr,pm-ext-flash&lt;/pre&gt;&amp;nbsp;, and not&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;nordic,pm-ext-flash&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;so it was due to rather dumb mistakes on my part. Once I fixed these issues it works as expected and I am able to perform a DFU via BLE with the SDK v2.6.1.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll look into the transition to SDK v2.7.0&lt;/p&gt;
&lt;p&gt;Thanks again for your help,&lt;/p&gt;
&lt;p&gt;Nicolas Goualard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 bootloader questions</title><link>https://devzone.nordicsemi.com/thread/492943?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2024 11:34:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0854e6c-b3fa-4d74-9149-493e50ac26bb</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi Nicolas,&lt;/p&gt;
&lt;p&gt;Sorry for the late reply. We are short of staff due to the summer vacation period.&lt;/p&gt;
&lt;p&gt;1)&lt;/p&gt;
[quote user=""]From what I gather, BLE DFU can only be done using MCUBoot as bootloader, am I correct ?[/quote]
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Yes, Mcuboot is the only supported bootload for SMP in NCS.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;2)&lt;/p&gt;
[quote user=""]There is a LTE module mounted on the board, communicating with the nrf52840 via UART. Is MCUBoot capable of receiving an update sent via LTE ?[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It is possible, but there is no solution you can use directly. See the discussion in another ticket.&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/102046/firmware-update-through-uart-with-other-microcontroller-not-pc-or-mobile-tools?ReplyFilter=Answers&amp;amp;ReplySortBy=Answers&amp;amp;ReplySortOrder=Descending"&gt;Firmware update through UART with other microcontroller (Not PC or Mobile tools) - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone (nordicsemi.com)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;3)&lt;/p&gt;
[quote user=""]&lt;span style="font-weight:400;"&gt;Since I want to be able to update the bootloader if needed, I wanted to implement a 2 stage bootloader chain. Following the instructions here: &lt;/span&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/config_and_build/bootloaders/bootloader_adding.html"&gt;&lt;span style="font-weight:400;"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/config_and_build/bootloaders/bootloader_adding.html&lt;/span&gt;&lt;/a&gt;&lt;span style="font-weight:400;"&gt;, this can be done by enabling the CONFIG_SECURE_BOOT and CONFIG_BOOTLOADER_MCUBOOT options in the app prj.conf file. From my understanding, Zephyr’s sysbuild can be used to handle multi-image builds, so it could be suited to handle the two bootloader and application images. Are there benefits to doing it one way or the other ?&lt;/span&gt;[/quote]
&lt;p&gt;From the recently released NCS v2.7.0, the previous method to define&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/config_and_build/multi_image.html#ug-multi-image"&gt;&lt;span&gt;multi-image builds (parent-child images)&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is deprecated and being replaced by&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a title="(in Zephyr Project v3.6.99)" href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/build/sysbuild/index.html#sysbuild"&gt;&lt;span&gt;Sysbuild (System build)&lt;/span&gt;&lt;/a&gt;. According to &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/migration/migration_sysbuild.html"&gt;Migrating from multi-image builds to sysbuild (nordicsemi.com)&lt;/a&gt;&amp;nbsp;guidance, it has the following features/benifites:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;Sysbuild controls which images are added to a build, instead of the main application.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;Sysbuild specifies the project configuration files for all images, which was previously done in the main application or child applications.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;Sysbuild controls the packaging of firmware components, instead of the main application.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;Sysbuild manages some software functionality of image builds, such as the configuration mode of an nRF70-series radio.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;Sysbuild runs partition manager code (if enabled) and distributes the output information to images.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;4)&lt;/p&gt;
[quote user=""]&lt;p&gt;&lt;span style="font-weight:400;"&gt;Is there a way to disable the uart console and enable the RTT logs on the NSIB bootloader ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Alternatively, can I send the bootloader logs to a USB connection ? I tried to get some inspiration from the USB console sample, but to no avail.&lt;/span&gt;&lt;/p&gt;[/quote][quote user="Nicolas Goualard"]I am still having issues with the NSIB console, did you have a chance to look into this ?[/quote]
&lt;p&gt;For RTT log output, I&amp;nbsp;did a try but did not get NSIB RTT log output either. I will spend more time on this and give you an update later.&lt;/p&gt;
&lt;p&gt;For USB log output, you can refer to &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/104173/custom-board-dfu-on-usb-port-on-vs-code?ReplySortBy=CreatedDate&amp;amp;ReplySortOrder=Ascending"&gt;(+) Custom board DFU on USB port on VS Code - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone (nordicsemi.com)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;5)&lt;/p&gt;
[quote user=""]I imagine the first one refers to the NSIB, and the second one to my application.&amp;nbsp;&lt;span style="font-weight:400;"&gt;The application Flash region size in this case is much smaller than when compiling without the bootloader. I imagine it is used by the bootloader ? Is there a way to configure the size available for my program, and if so, what are the best practices with respect to sizes when using a single or 2 stage bootloader ?&lt;/span&gt;[/quote]
&lt;p&gt;Yes, this is so-called dual slots DFU, you need to reserve another solt same as you have assigned for your application firmware for safe DFU operation. You can configure the solt size of course.&lt;/p&gt;
&lt;p&gt;If you are talking about available size for your application program firmware, it is not related too much about single(NSIB or MCUboot) or two stage bootloader(MCUboot), because they are normally quite small size, but the single solt or dual slot DFU choice will matter. Both of them have p&lt;span&gt;ros and cons&lt;/span&gt;, the differences are introduced in the below page, you need to decide according to your needs.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-8-bootloaders-and-dfu-fota/topic/device-firmware-update-dfu-essentials/#Dual-slot-DFU-with-swapping"&gt;Device Firmware Update (DFU) essentials - Nordic Developer Academy (nordicsemi.com)&lt;/a&gt;&lt;/p&gt;
[quote user=""]&lt;p&gt;&lt;span style="font-weight:400;"&gt;However, if I go to check the generated devicetree file, device n°124 corresponds to a spi node that otherwise works in my standalone application.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Do you have any pointers on what I can look into to solve this issue ?&lt;/span&gt;&lt;/p&gt;[/quote][quote user="Nicolas Goualard"]It looks to me like something is wrong in my configuration as slot1_partition does not seem to be recognized. Do you have an idea what could be wrong please ?[/quote][quote user="Nicolas Goualard"]If I move a partition from the nrf52840 internal flash to this external flash, I imagine the bootloader will need to power the flash to have access to the partition ? Can you confirm this ?&amp;nbsp;I saw the regulator-fixed compatible, which has a&amp;nbsp;&lt;span&gt;regulator-always-on property. Can this be used to enable the bootloader to power the flash ?&lt;/span&gt;[/quote]
&lt;p&gt;If you are going to use MCUboot with external flash, you can refer to this sample from my colleague:&amp;nbsp;&lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/smp/mcuboot_smp_uart_feat_external_flash"&gt;samples_for_nrf_connect_sdk/bootloader_samples/smp/mcuboot_smp_uart_feat_external_flash at main · hellesvik-nordic/samples_for_nrf_connect_sdk (github.com)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Charlie&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 bootloader questions</title><link>https://devzone.nordicsemi.com/thread/492942?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2024 11:34:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:067a0387-7202-4b5c-b385-d42c9e4c6280</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi Nicolas,&lt;/p&gt;
&lt;p&gt;Sorry for the late reply. We are short of staff due to the summer vacation period.&lt;/p&gt;
&lt;p&gt;1)&lt;/p&gt;
[quote user=""]From what I gather, BLE DFU can only be done using MCUBoot as bootloader, am I correct ?[/quote]
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Yes, Mcuboot is the only supported bootload for SMP in NCS.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;2)&lt;/p&gt;
[quote user=""]There is a LTE module mounted on the board, communicating with the nrf52840 via UART. Is MCUBoot capable of receiving an update sent via LTE ?[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It is possible, but there is no solution you can use directly. See the discussion in another ticket.&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/102046/firmware-update-through-uart-with-other-microcontroller-not-pc-or-mobile-tools?ReplyFilter=Answers&amp;amp;ReplySortBy=Answers&amp;amp;ReplySortOrder=Descending"&gt;Firmware update through UART with other microcontroller (Not PC or Mobile tools) - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone (nordicsemi.com)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;3)&lt;/p&gt;
[quote user=""]&lt;span style="font-weight:400;"&gt;Since I want to be able to update the bootloader if needed, I wanted to implement a 2 stage bootloader chain. Following the instructions here: &lt;/span&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/config_and_build/bootloaders/bootloader_adding.html"&gt;&lt;span style="font-weight:400;"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/config_and_build/bootloaders/bootloader_adding.html&lt;/span&gt;&lt;/a&gt;&lt;span style="font-weight:400;"&gt;, this can be done by enabling the CONFIG_SECURE_BOOT and CONFIG_BOOTLOADER_MCUBOOT options in the app prj.conf file. From my understanding, Zephyr’s sysbuild can be used to handle multi-image builds, so it could be suited to handle the two bootloader and application images. Are there benefits to doing it one way or the other ?&lt;/span&gt;[/quote]
&lt;p&gt;From the recently released NCS v2.7.0, the previous method to define&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/config_and_build/multi_image.html#ug-multi-image"&gt;&lt;span&gt;multi-image builds (parent-child images)&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is deprecated and being replaced by&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a title="(in Zephyr Project v3.6.99)" href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/build/sysbuild/index.html#sysbuild"&gt;&lt;span&gt;Sysbuild (System build)&lt;/span&gt;&lt;/a&gt;. According to &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/migration/migration_sysbuild.html"&gt;Migrating from multi-image builds to sysbuild (nordicsemi.com)&lt;/a&gt;&amp;nbsp;guidance, it has the following features/benifites:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;Sysbuild controls which images are added to a build, instead of the main application.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;Sysbuild specifies the project configuration files for all images, which was previously done in the main application or child applications.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;Sysbuild controls the packaging of firmware components, instead of the main application.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;Sysbuild manages some software functionality of image builds, such as the configuration mode of an nRF70-series radio.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;Sysbuild runs partition manager code (if enabled) and distributes the output information to images.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;4)&lt;/p&gt;
[quote user=""]&lt;p&gt;&lt;span style="font-weight:400;"&gt;Is there a way to disable the uart console and enable the RTT logs on the NSIB bootloader ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Alternatively, can I send the bootloader logs to a USB connection ? I tried to get some inspiration from the USB console sample, but to no avail.&lt;/span&gt;&lt;/p&gt;[/quote][quote user="Nicolas Goualard"]I am still having issues with the NSIB console, did you have a chance to look into this ?[/quote]
&lt;p&gt;For RTT log output, I&amp;nbsp;did a try but did not get NSIB RTT log output either. I will spend more time on this and give you an update later.&lt;/p&gt;
&lt;p&gt;For USB log output, you can refer to &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/104173/custom-board-dfu-on-usb-port-on-vs-code?ReplySortBy=CreatedDate&amp;amp;ReplySortOrder=Ascending"&gt;(+) Custom board DFU on USB port on VS Code - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone (nordicsemi.com)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;5)&lt;/p&gt;
[quote user=""]I imagine the first one refers to the NSIB, and the second one to my application.&amp;nbsp;&lt;span style="font-weight:400;"&gt;The application Flash region size in this case is much smaller than when compiling without the bootloader. I imagine it is used by the bootloader ? Is there a way to configure the size available for my program, and if so, what are the best practices with respect to sizes when using a single or 2 stage bootloader ?&lt;/span&gt;[/quote]
&lt;p&gt;Yes, this is so-called dual slots DFU, you need to reserve another solt same as you have assigned for your application firmware for safe DFU operation. You can configure the solt size of course.&lt;/p&gt;
&lt;p&gt;If you are talking about available size for your application program firmware, it is not related too much about single(NSIB or MCUboot) or two stage bootloader(MCUboot), because they are normally quite small size, but the single solt or dual slot DFU choice will matter. Both of them have p&lt;span&gt;ros and cons&lt;/span&gt;, the differences are introduced in the below page, you need to decide according to your needs.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-8-bootloaders-and-dfu-fota/topic/device-firmware-update-dfu-essentials/#Dual-slot-DFU-with-swapping"&gt;Device Firmware Update (DFU) essentials - Nordic Developer Academy (nordicsemi.com)&lt;/a&gt;&lt;/p&gt;
[quote user=""]&lt;p&gt;&lt;span style="font-weight:400;"&gt;However, if I go to check the generated devicetree file, device n°124 corresponds to a spi node that otherwise works in my standalone application.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Do you have any pointers on what I can look into to solve this issue ?&lt;/span&gt;&lt;/p&gt;[/quote][quote user="Nicolas Goualard"]It looks to me like something is wrong in my configuration as slot1_partition does not seem to be recognized. Do you have an idea what could be wrong please ?[/quote][quote user="Nicolas Goualard"]If I move a partition from the nrf52840 internal flash to this external flash, I imagine the bootloader will need to power the flash to have access to the partition ? Can you confirm this ?&amp;nbsp;I saw the regulator-fixed compatible, which has a&amp;nbsp;&lt;span&gt;regulator-always-on property. Can this be used to enable the bootloader to power the flash ?&lt;/span&gt;[/quote]
&lt;p&gt;If you are going to use MCUboot with external flash, you can refer to this sample from my colleague:&amp;nbsp;&lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/smp/mcuboot_smp_uart_feat_external_flash"&gt;samples_for_nrf_connect_sdk/bootloader_samples/smp/mcuboot_smp_uart_feat_external_flash at main · hellesvik-nordic/samples_for_nrf_connect_sdk (github.com)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Charlie&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 bootloader questions</title><link>https://devzone.nordicsemi.com/thread/492502?ContentTypeID=1</link><pubDate>Fri, 05 Jul 2024 14:53:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c865db7-d656-40dc-b641-a4962184f926</guid><dc:creator>Nicolas Goualard</dc:creator><description>&lt;p&gt;Hi Charlie, I am still having issues with the NSIB console, did you have a chance to look into this ?&lt;/p&gt;
&lt;p&gt;I did find a way to get past item n&amp;deg;6, and get a better understanding of item n&amp;deg;5. Thanks to this I could move forward, and I managed to do a DFU via BLE on my device, which is good!&lt;/p&gt;
&lt;p&gt;However it seems that the space dedicated to my application by the partition manager is rather small, so I wanted to use the external flash that is present on my board to move the mcuboot_secondary partition on there, and increase the size of the mcuboot primary and secondary partitions.&lt;/p&gt;
&lt;p&gt;In order to do that I followed the instructions here :&lt;br /&gt;&lt;a id="" href="https://docs.nordicsemi.com/bundle/ncs-2.6.1/page/nrf/config_and_build/bootloaders/bootloader_external_flash.html"&gt;https://docs.nordicsemi.com/bundle/ncs-2.6.1/page/nrf/config_and_build/bootloaders/bootloader_external_flash.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and here:&lt;br /&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.6.1/page/nrf/scripts/partition_manager/partition_manager.html#pm-external-flash"&gt;https://docs.nordicsemi.com/bundle/ncs-2.6.1/page/nrf/scripts/partition_manager/partition_manager.html#pm-external-flash&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and I took inspiration from the SDK nrf/tests/modules/mcuboot/external_flash/ files.&lt;/p&gt;
&lt;p&gt;I added a child_image/mcuboot/prj.conf and child_image/mcuboot/boards/board.overlay files to my project:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/ {
	chosen {
		zephyr,pm-ext-flash = &amp;amp;w25q128;
	};
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# MCUboot requires a large stack size, otherwise an MPU fault will occur
CONFIG_MAIN_STACK_SIZE=10240

# Enable flash operations
CONFIG_FLASH=y

CONFIG_BOOT_MAX_IMG_SECTORS=256
CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I also added a pm_static.yaml file in my application root folder:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;mcuboot_secondary:
  address: 0x00000
  region: external_flash
  size: 0xda000&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;However I get the following errors when building:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;FAILED: zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/CMakeFiles/subsys__mgmt__mcumgr__grp__img_mgmt.dir/src/zephyr_img_mgmt.c.obj 
ccache /home/vboxuser/ncs/toolchains/2be090971e/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DEXT_API_MAGIC=0x281ee6de,0xb845acea,13314 -DFIRMWARE_INFO_MAGIC=0x281ee6de,0x8fcebb4c,13314 -DKERNEL -DNRF52840_XXAA -DUSE_PARTITION_MANAGER=1 -DVALIDATION_INFO_MAGIC=0x281ee6de,0x86518483,78850 -DVALIDATION_POINTER_MAGIC=0x281ee6de,0x6919b47e,78850 -DZCBOR_ASSERTS -D_ANSI_SOURCE -D_FORTIFY_SOURCE=1 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrf/drivers/mpsl/clock_control -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/eqs-motion-s-zephyr.git/app/build/zephyr/include/generated -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/soc/arm/nordic_nrf/nrf52 -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/lib/libc/newlib/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/soc/common/nordic_nrf/. -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/soc/arm/nordic_nrf/common/. -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/subsys/mgmt/mcumgr/util/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/bootloader/mcuboot/boot/bootutil/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/subsys/mgmt/mcumgr/transport/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/subsys/usb/device -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/subsys/bluetooth -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/subsys/settings/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/drivers/usb/common/nrf_usbd_common/. -I/home/vboxuser/Documents/eqs-motion-s-zephyr/eqs-motion-s-zephyr.git/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/eqs-motion-s-zephyr.git/include/shared_types -I/home/vboxuser/Documents/eqs-motion-s-zephyr/eqs-motion-s-zephyr.git/lib/BMI270/BMI270 -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrf/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrf/lib/multithreading_lock/. -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrf/subsys/bluetooth/controller/. -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/drivers/flash -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrf/tests/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/modules/hal/cmsis/CMSIS/Core/Include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/modules/cmsis/. -I/home/vboxuser/Documents/eqs-motion-s-zephyr/modules/lib/cmsis-dsp/Include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/modules/hal/nordic/nrfx -I/home/vboxuser/Documents/eqs-motion-s-zephyr/modules/hal/nordic/nrfx/drivers/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/modules/hal/nordic/nrfx/mdk -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/modules/hal_nordic/nrfx/. -I/home/vboxuser/Documents/eqs-motion-s-zephyr/modules/debug/segger/SEGGER -I/home/vboxuser/Documents/eqs-motion-s-zephyr/modules/debug/segger/Config -I/home/vboxuser/Documents/eqs-motion-s-zephyr/modules/crypto/tinycrypt/lib/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/modules/lib/zcbor/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrfxlib/mpsl/fem/common/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrfxlib/mpsl/fem/nrf21540_gpio/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrfxlib/mpsl/fem/nrf21540_gpio_spi/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrfxlib/mpsl/fem/simple_gpio/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrfxlib/mpsl/fem/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrfxlib/mpsl/fem/include/protocol -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrfxlib/mpsl/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrfxlib/mpsl/include/protocol -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrfxlib/softdevice_controller/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/bootloader/mcuboot/boot/bootutil/zephyr/.. -I/home/vboxuser/Documents/eqs-motion-s-zephyr/bootloader/mcuboot/boot/bootutil/zephyr/../include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -isystem /home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/lib/libc/common/include -isystem /home/vboxuser/Documents/eqs-motion-s-zephyr/nrfxlib/crypto/nrf_cc310_platform/include -Wshadow -fno-strict-aliasing -Os -imacros /home/vboxuser/Documents/eqs-motion-s-zephyr/eqs-motion-s-zephyr.git/app/build/zephyr/include/generated/autoconf.h -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mfp16-format=ieee --sysroot=/home/vboxuser/ncs/toolchains/2be090971e/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros /home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=/home/vboxuser/Documents/eqs-motion-s-zephyr/eqs-motion-s-zephyr.git/app=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/home/vboxuser/Documents/eqs-motion-s-zephyr=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=nano.specs -std=c99 -MD -MT zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/CMakeFiles/subsys__mgmt__mcumgr__grp__img_mgmt.dir/src/zephyr_img_mgmt.c.obj -MF zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/CMakeFiles/subsys__mgmt__mcumgr__grp__img_mgmt.dir/src/zephyr_img_mgmt.c.obj.d -o zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/CMakeFiles/subsys__mgmt__mcumgr__grp__img_mgmt.dir/src/zephyr_img_mgmt.c.obj -c /home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/src/zephyr_img_mgmt.c
In file included from /home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/include/zephyr/storage/flash_map.h:275,
                 from /home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/src/zephyr_img_mgmt.c:10:
/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/src/zephyr_img_mgmt.c: In function &amp;#39;img_mgmt_flash_area_id&amp;#39;:
/home/vboxuser/Documents/eqs-motion-s-zephyr/nrf/include/flash_map_pm.h:43:22: error: &amp;#39;PM_mcuboot_secondary_ID&amp;#39; undeclared (first use in this function); did you mean &amp;#39;PM_mcuboot_primary_ID&amp;#39;?
   43 | #define PM_ID(label) PM_##label##_ID
      |                      ^~~
/home/vboxuser/Documents/eqs-motion-s-zephyr/nrf/include/flash_map_pm.h:48:35: note: in expansion of macro &amp;#39;PM_ID&amp;#39;
   48 | #define FIXED_PARTITION_ID(label) PM_ID(label)
      |                                   ^~~~~
/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/src/zephyr_img_mgmt.c:139:25: note: in expansion of macro &amp;#39;FIXED_PARTITION_ID&amp;#39;
  139 |                 fa_id = FIXED_PARTITION_ID(SLOT1_PARTITION);
      |                         ^~~~~~~~~~~~~~~~~~
/home/vboxuser/Documents/eqs-motion-s-zephyr/nrf/include/flash_map_pm.h:43:22: note: each undeclared identifier is reported only once for each function it appears in
   43 | #define PM_ID(label) PM_##label##_ID
      |                      ^~~
/home/vboxuser/Documents/eqs-motion-s-zephyr/nrf/include/flash_map_pm.h:48:35: note: in expansion of macro &amp;#39;PM_ID&amp;#39;
   48 | #define FIXED_PARTITION_ID(label) PM_ID(label)
      |                                   ^~~~~
/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/src/zephyr_img_mgmt.c:139:25: note: in expansion of macro &amp;#39;FIXED_PARTITION_ID&amp;#39;
  139 |                 fa_id = FIXED_PARTITION_ID(SLOT1_PARTITION);
      |                         ^~~~~~~~~~~~~~~~~~
[182/1093] Building C object zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/CMakeFiles/subsys__mgmt__mcumgr__grp__img_mgmt.dir/src/img_mgmt.c.obj
FAILED: zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/CMakeFiles/subsys__mgmt__mcumgr__grp__img_mgmt.dir/src/img_mgmt.c.obj 
ccache /home/vboxuser/ncs/toolchains/2be090971e/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DEXT_API_MAGIC=0x281ee6de,0xb845acea,13314 -DFIRMWARE_INFO_MAGIC=0x281ee6de,0x8fcebb4c,13314 -DKERNEL -DNRF52840_XXAA -DUSE_PARTITION_MANAGER=1 -DVALIDATION_INFO_MAGIC=0x281ee6de,0x86518483,78850 -DVALIDATION_POINTER_MAGIC=0x281ee6de,0x6919b47e,78850 -DZCBOR_ASSERTS -D_ANSI_SOURCE -D_FORTIFY_SOURCE=1 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrf/drivers/mpsl/clock_control -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/eqs-motion-s-zephyr.git/app/build/zephyr/include/generated -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/soc/arm/nordic_nrf/nrf52 -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/lib/libc/newlib/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/soc/common/nordic_nrf/. -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/soc/arm/nordic_nrf/common/. -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/subsys/mgmt/mcumgr/util/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/bootloader/mcuboot/boot/bootutil/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/subsys/mgmt/mcumgr/transport/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/subsys/usb/device -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/subsys/bluetooth -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/subsys/settings/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/drivers/usb/common/nrf_usbd_common/. -I/home/vboxuser/Documents/eqs-motion-s-zephyr/eqs-motion-s-zephyr.git/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/eqs-motion-s-zephyr.git/include/shared_types -I/home/vboxuser/Documents/eqs-motion-s-zephyr/eqs-motion-s-zephyr.git/lib/BMI270/BMI270 -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrf/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrf/lib/multithreading_lock/. -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrf/subsys/bluetooth/controller/. -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/drivers/flash -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrf/tests/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/modules/hal/cmsis/CMSIS/Core/Include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/modules/cmsis/. -I/home/vboxuser/Documents/eqs-motion-s-zephyr/modules/lib/cmsis-dsp/Include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/modules/hal/nordic/nrfx -I/home/vboxuser/Documents/eqs-motion-s-zephyr/modules/hal/nordic/nrfx/drivers/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/modules/hal/nordic/nrfx/mdk -I/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/modules/hal_nordic/nrfx/. -I/home/vboxuser/Documents/eqs-motion-s-zephyr/modules/debug/segger/SEGGER -I/home/vboxuser/Documents/eqs-motion-s-zephyr/modules/debug/segger/Config -I/home/vboxuser/Documents/eqs-motion-s-zephyr/modules/crypto/tinycrypt/lib/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/modules/lib/zcbor/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrfxlib/mpsl/fem/common/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrfxlib/mpsl/fem/nrf21540_gpio/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrfxlib/mpsl/fem/nrf21540_gpio_spi/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrfxlib/mpsl/fem/simple_gpio/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrfxlib/mpsl/fem/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrfxlib/mpsl/fem/include/protocol -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrfxlib/mpsl/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrfxlib/mpsl/include/protocol -I/home/vboxuser/Documents/eqs-motion-s-zephyr/nrfxlib/softdevice_controller/include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/bootloader/mcuboot/boot/bootutil/zephyr/.. -I/home/vboxuser/Documents/eqs-motion-s-zephyr/bootloader/mcuboot/boot/bootutil/zephyr/../include -I/home/vboxuser/Documents/eqs-motion-s-zephyr/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -isystem /home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/lib/libc/common/include -isystem /home/vboxuser/Documents/eqs-motion-s-zephyr/nrfxlib/crypto/nrf_cc310_platform/include -Wshadow -fno-strict-aliasing -Os -imacros /home/vboxuser/Documents/eqs-motion-s-zephyr/eqs-motion-s-zephyr.git/app/build/zephyr/include/generated/autoconf.h -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mfp16-format=ieee --sysroot=/home/vboxuser/ncs/toolchains/2be090971e/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros /home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=/home/vboxuser/Documents/eqs-motion-s-zephyr/eqs-motion-s-zephyr.git/app=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/home/vboxuser/Documents/eqs-motion-s-zephyr=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=nano.specs -std=c99 -MD -MT zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/CMakeFiles/subsys__mgmt__mcumgr__grp__img_mgmt.dir/src/img_mgmt.c.obj -MF zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/CMakeFiles/subsys__mgmt__mcumgr__grp__img_mgmt.dir/src/img_mgmt.c.obj.d -o zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/CMakeFiles/subsys__mgmt__mcumgr__grp__img_mgmt.dir/src/img_mgmt.c.obj -c /home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c
In file included from /home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/include/zephyr/sys/util_macro.h:34,
                 from /home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/include/zephyr/sys/util.h:17,
                 from /home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c:8:
/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c: In function &amp;#39;img_mgmt_active_slot&amp;#39;:
/home/vboxuser/Documents/eqs-motion-s-zephyr/nrf/include/flash_map_pm.h:52:18: error: &amp;#39;PM_PM_PM_mcuboot_secondary_ID_LABEL_OFFSET&amp;#39; undeclared (first use in this function)
   52 |         UTIL_CAT(PM_, UTIL_CAT(UTIL_CAT(PM_, UTIL_CAT(PM_ID(label), _LABEL)), x))
      |                  ^~~
/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/include/zephyr/sys/util_internal.h:105:36: note: in definition of macro &amp;#39;UTIL_PRIMITIVE_CAT&amp;#39;
  105 | #define UTIL_PRIMITIVE_CAT(a, ...) a##__VA_ARGS__
      |                                    ^
/home/vboxuser/Documents/eqs-motion-s-zephyr/nrf/include/flash_map_pm.h:52:9: note: in expansion of macro &amp;#39;UTIL_CAT&amp;#39;
   52 |         UTIL_CAT(PM_, UTIL_CAT(UTIL_CAT(PM_, UTIL_CAT(PM_ID(label), _LABEL)), x))
      |         ^~~~~~~~
/home/vboxuser/Documents/eqs-motion-s-zephyr/nrf/include/flash_map_pm.h:55:39: note: in expansion of macro &amp;#39;FIXED_PARTITION_DATA_FIELD&amp;#39;
   55 | #define FIXED_PARTITION_OFFSET(label) FIXED_PARTITION_DATA_FIELD(label, _OFFSET)
      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c:50:10: note: in expansion of macro &amp;#39;FIXED_PARTITION_OFFSET&amp;#39;
   50 |         (FIXED_PARTITION_OFFSET(label) == (PM_ADDRESS - PM_ADDRESS_OFFSET))
      |          ^~~~~~~~~~~~~~~~~~~~~~
/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c:164:13: note: in expansion of macro &amp;#39;FIXED_PARTITION_IS_RUNNING_APP_PARTITION&amp;#39;
  164 |         if (FIXED_PARTITION_IS_RUNNING_APP_PARTITION(slot1_partition)) {
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/vboxuser/Documents/eqs-motion-s-zephyr/nrf/include/flash_map_pm.h:52:18: note: each undeclared identifier is reported only once for each function it appears in
   52 |         UTIL_CAT(PM_, UTIL_CAT(UTIL_CAT(PM_, UTIL_CAT(PM_ID(label), _LABEL)), x))
      |                  ^~~
/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/include/zephyr/sys/util_internal.h:105:36: note: in definition of macro &amp;#39;UTIL_PRIMITIVE_CAT&amp;#39;
  105 | #define UTIL_PRIMITIVE_CAT(a, ...) a##__VA_ARGS__
      |                                    ^
/home/vboxuser/Documents/eqs-motion-s-zephyr/nrf/include/flash_map_pm.h:52:9: note: in expansion of macro &amp;#39;UTIL_CAT&amp;#39;
   52 |         UTIL_CAT(PM_, UTIL_CAT(UTIL_CAT(PM_, UTIL_CAT(PM_ID(label), _LABEL)), x))
      |         ^~~~~~~~
/home/vboxuser/Documents/eqs-motion-s-zephyr/nrf/include/flash_map_pm.h:55:39: note: in expansion of macro &amp;#39;FIXED_PARTITION_DATA_FIELD&amp;#39;
   55 | #define FIXED_PARTITION_OFFSET(label) FIXED_PARTITION_DATA_FIELD(label, _OFFSET)
      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c:50:10: note: in expansion of macro &amp;#39;FIXED_PARTITION_OFFSET&amp;#39;
   50 |         (FIXED_PARTITION_OFFSET(label) == (PM_ADDRESS - PM_ADDRESS_OFFSET))
      |          ^~~~~~~~~~~~~~~~~~~~~~
/home/vboxuser/Documents/eqs-motion-s-zephyr/zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c:164:13: note: in expansion of macro &amp;#39;FIXED_PARTITION_IS_RUNNING_APP_PARTITION&amp;#39;
  164 |         if (FIXED_PARTITION_IS_RUNNING_APP_PARTITION(slot1_partition)) {
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /home/vboxuser/ncs/toolchains/2be090971e/usr/local/bin/cmake --build /home/vboxuser/Documents/eqs-motion-s-zephyr/eqs-motion-s-zephyr.git/app/build&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;For reference, here is what my prj.conf looks like:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# This file contains selected Kconfig options for the application.

CONFIG_BOOT_DELAY=2000

# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y

# enable GPIO and PWM
CONFIG_GPIO=y
CONFIG_PWM=y

# enable uart driver
CONFIG_SERIAL=y

# additional board options
CONFIG_GPIO_AS_PINRESET=n

CONFIG_PINCTRL=y

# Config for Immutable Secure Bootloader
CONFIG_SECURE_BOOT=y

# Config for Upgradable Bootloader
CONFIG_BOOTLOADER_MCUBOOT=y
# Include MCUMGR and the dependencies in the build
# This KConfig option enables a lot of other stuff in the background. See https://docs.nordicsemi.com/bundle/ncs-latest/page/kconfig/index.html#CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU for more details.
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y
# Enable hooks to allow the application to be notified of DFU events
CONFIG_MCUMGR_MGMT_NOTIFICATION_HOOKS=y
CONFIG_MCUMGR_GRP_IMG_STATUS_HOOKS=y

# enabling State Machine Framework
CONFIG_SMF=y
CONFIG_SMF_ANCESTOR_SUPPORT=y

# enable Hardware info
CONFIG_HWINFO=y
CONFIG_HWINFO_NRF=y
CONFIG_TEMP_NRF5=y

# Enabling FPU
CONFIG_FPU=y

# enable ADC
CONFIG_ADC=y
CONFIG_ADC_NRFX_SAADC=y

# enable SPI
CONFIG_SPI=y
CONFIG_NORDIC_QSPI_NOR=y

# enabling Bluetooth
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME=&amp;quot;Zephyr&amp;quot;
CONFIG_BT_DEVICE_APPEARANCE=5184
# 5184 means Generic Outdoor Sports Activity. Complete list of appearance values can be found on the Bluetooth website under &amp;quot;assigned values&amp;quot; : https://www.bluetooth.com/specifications/assigned-numbers/
CONFIG_BT_MAX_CONN=1
CONFIG_BT_MAX_PAIRED=1
CONFIG_BT_GATT_CLIENT=y
CONFIG_BT_L2CAP_TX_MTU=247
CONFIG_BT_BUF_ACL_RX_SIZE=251
#Config for enabling changing ble name 
CONFIG_BT_DEVICE_NAME_DYNAMIC=y


# enabling bonding
CONFIG_BT_SETTINGS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_NVS=y
CONFIG_SETTINGS=y

# enabling BAS service and HRS service
CONFIG_BT_BAS=y
CONFIG_BT_HRS=y

#Enable Power Off of the device
CONFIG_POWEROFF=y
CONFIG_PM_DEVICE=y

# USB
CONFIG_STDOUT_CONSOLE=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PRODUCT=&amp;quot;Device&amp;quot;
CONFIG_USB_DEVICE_PID=0x0001
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y
CONFIG_UART_LINE_CTRL=y

# Enable assertions
CONFIG_ASSERT=y

# Enable the UART driver (for the BG77 UART?)
CONFIG_UART_ASYNC_API=n
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_NRFX_UARTE0=y

# Enbale Ring Buffer
CONFIG_RING_BUFFER=y

# Config for enabling newlib C
CONFIG_NEWLIB_LIBC=y
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y

# enable CMSIS for DSP library
CONFIG_CMSIS_DSP=y

# Config for enabling ZBus
CONFIG_ZBUS=y
CONFIG_ZBUS_MSG_SUBSCRIBER=y
CONFIG_HEAP_MEM_POOL_SIZE=1024
CONFIG_ZBUS_MSG_SUBSCRIBER_NET_BUF_POOL_SIZE=32
CONFIG_ZBUS_CHANNEL_NAME=y
#CONFIG_ZBUS_OBSERVER_NAME=y

CONFIG_THREAD_NAME=y
CONFIG_DEBUG_THREAD_INFO=y

# Stack sizes:
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
CONFIG_MAIN_STACK_SIZE=4096

# Enable MBED TFM PSA for hash and crypto
CONFIG_MBEDTLS=y
CONFIG_MBEDTLS_BUILTIN=y
CONFIG_MBEDTLS_CFG_FILE=&amp;quot;config-tls-generic.h&amp;quot;
CONFIG_MBEDTLS_ENTROPY_ENABLED=y
CONFIG_MBEDTLS_PSA_CRYPTO_C=y
CONFIG_MBEDTLS_ZEPHYR_ENTROPY=y

#Config clock 
CONFIG_CLOCK_CONTROL=y
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and my board .dts relevant (I think) parts:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/ {	chosen {		/*zephyr,console = &amp;amp;uart0;*/		zephyr,sram = &amp;amp;sram0;		zephyr,flash = &amp;amp;flash0;		zephyr,code-partition = &amp;amp;slot0_partition;		zephyr,pm-ext-flash = &amp;amp;w25q128;	};};...&amp;amp;qspi {	status = &amp;quot;okay&amp;quot;;	pinctrl-0 = &amp;lt;&amp;amp;qspi_default&amp;gt;;	pinctrl-1 = &amp;lt;&amp;amp;qspi_sleep&amp;gt;;	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;		w25q128: w25q128fw@0{		compatible = &amp;quot;nordic,qspi-nor&amp;quot;;		reg = &amp;lt;0&amp;gt;;		/* W25Q128 supports all readoc options */		readoc = &amp;quot;read4io&amp;quot;;		sck-frequency = &amp;lt;8000000&amp;gt;;		jedec-id = [ef 60 18]; //ef 60 18		size = &amp;lt;0x8000000&amp;gt;;		has-dpd;		t-enter-dpd = &amp;lt;3000&amp;gt;;		t-exit-dpd = &amp;lt;1800&amp;gt;;	};};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It looks to me like something is wrong in my configuration as slot1_partition does not seem to be recognized. Do you have an idea what could be wrong please ?&lt;/p&gt;
&lt;p&gt;In addition to that, I have another question: on my board, the external flash power is controlled by a GPIO of the nrf52840. I have a SYS_INIT call to a function that enables the power of the external flash before the spi communication starts, otherwise the JEDEC-ID could not be properly read at startup.&lt;br /&gt;If I move a partition from the nrf52840 internal flash to this external flash, I imagine the bootloader will need to power the flash to have access to the partition ? Can you confirm this ?&amp;nbsp;I saw the regulator-fixed compatible, which has a&amp;nbsp;&lt;span&gt;regulator-always-on property. Can this be used to enable the bootloader to power the flash ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Thanks in advance for your help.&lt;br /&gt;Nicolas Goualard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 bootloader questions</title><link>https://devzone.nordicsemi.com/thread/489945?ContentTypeID=1</link><pubDate>Fri, 21 Jun 2024 11:31:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35dd34fb-1ea0-4522-93f9-87b45fbb5af4</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi Nicolas,&lt;/p&gt;
&lt;p&gt;I will need sometime working on your questions and will send you a reply next week.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Charlie&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>