<?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>Matter bridge build process fails with &amp;quot;region `FLASH&amp;#39; overflowed&amp;quot;</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/109935/matter-bridge-build-process-fails-with-region-flash-overflowed</link><description>Hi guys, I&amp;#39;m playing with : Matter Bridge from SDK v2.6.0.rc1 on nRF7002-DK. I tried to extend Matter data model with &amp;quot;Temperature color light&amp;quot; and add a new device but it caused that its flash is overflowed: My question is very simple: How to fix it</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 17 Apr 2024 11:43:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/109935/matter-bridge-build-process-fails-with-region-flash-overflowed" /><item><title>RE: Matter bridge build process fails with "region `FLASH' overflowed"</title><link>https://devzone.nordicsemi.com/thread/479193?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 11:43:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc5a5bda-01e5-49d4-992e-b92a8c2bb71d</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Great&lt;/p&gt;
&lt;p&gt;Just 1 thing for information: I would recommend that you wait until NCS 2.6.1 before you attempt wifi patch relocation which requires qspi due to a bug in the qspi driver in v2.6.0.&lt;/p&gt;
&lt;p&gt;This has been fixed upstream and will be released within a couple of weeks&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Fix posted upstream: &lt;/span&gt;&lt;a title="https://github.com/zephyrproject-rtos/zephyr/pull/71373" href="https://github.com/zephyrproject-rtos/zephyr/pull/71373"&gt;https://github.com/zephyrproject-rtos/zephyr/pull/71373&lt;/a&gt;&lt;br /&gt;&lt;span&gt;Cherry-pick into NCS: &lt;/span&gt;&lt;a title="https://github.com/nrfconnect/sdk-nrf/pull/14812" href="https://github.com/nrfconnect/sdk-nrf/pull/14812"&gt;https://github.com/nrfconnect/sdk-nrf/pull/14812&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter bridge build process fails with "region `FLASH' overflowed"</title><link>https://devzone.nordicsemi.com/thread/478990?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2024 12:41:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:120e4a86-0df2-43bb-b697-4e6c0d3b7c6c</guid><dc:creator>Ondro</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have no progress. I&amp;#39;m working on the build &lt;span class="HwtZe" lang="en"&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;that fits on the internal flash:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="127836" url="~/f/nordic-q-a/109935/matter-bridge-build-process-fails-with-region-flash-overflowed/477779"]Fortunately,&amp;nbsp; switching release build + Os optimization&amp;nbsp; helps me enough but now I&amp;#39;m at 99% of flash usage so we will see[/quote]
&lt;p&gt;I&amp;#39;m not expecting that the image size would increase more. And if yes then I would try to enable the wifi fw patch relocation. In my point of view, it could be closed for now.&lt;/p&gt;
&lt;p&gt;Thank you and BR,&lt;/p&gt;
&lt;p&gt;Ondro&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter bridge build process fails with "region `FLASH' overflowed"</title><link>https://devzone.nordicsemi.com/thread/478885?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2024 08:00:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d76a164c-1dd1-4609-a057-ee0166d9ec55</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It&amp;#39;s been a while since you&amp;#39;ve heard from me.&amp;nbsp;Have you had any success with setting up your partitions since last time?&lt;/p&gt;
&lt;p&gt;If not, could you share the entire project in a zip?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter bridge build process fails with "region `FLASH' overflowed"</title><link>https://devzone.nordicsemi.com/thread/478018?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2024 10:59:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fca1d9d-e538-4530-8620-098d88fbcbc1</guid><dc:creator>Ondro</dc:creator><description>[quote userid="107683" url="~/f/nordic-q-a/109935/matter-bridge-build-process-fails-with-region-flash-overflowed/477981"]Might be that the device does not know of the external flash. How did you set it up in your devicetree files?[/quote]
&lt;p&gt;I didn&amp;#39;t make any changes in devicetree. All what I changed was in &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/shared.zip"&gt;shared.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter bridge build process fails with "region `FLASH' overflowed"</title><link>https://devzone.nordicsemi.com/thread/477981?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2024 09:05:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:509260a0-5f12-42bd-be8e-f767e15591df</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Ondro"]At the first look, Wifi patch relocation to external flash seemed to be promising but unfortunately it is for external flashes connected over QSPI and not SPI. QSPI is used for Wifi chip. According to the documentation &amp;quot;...&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.6.0/nrf/device_guides/working_with_nrf/nrf70/developing/fw_patches_ext_flash.html"&gt;fw_patches_ext_flash.html&lt;/a&gt;&amp;quot;, nRF7002DK is not supported. I found something related to it at devzone: &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/82430/ncs-external-flash-ota-change-qspi-to-spi"&gt;ncs-external-flash-ota-change-qspi-to-spi&lt;/a&gt; but I didn&amp;#39;t go deeper.[/quote]
&lt;p&gt;Ah yeah you&amp;#39;re right. The relocation through the XIP features in that documentation requires qspi, so the alternative would be to do a similar relocation using flash API and your own proprietary implementation of this.&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/matter_bridge/doc/matter_bridge_description.html#building-and-running"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/matter_bridge/doc/matter_bridge_description.html#building-and-running&lt;/a&gt;&amp;nbsp;explains how you can enable the wifi fw patch relocation as well&lt;/p&gt;
[quote user="Ondro"] nRF7002DK is not supported[/quote]
&lt;p&gt;This is note quite right, but the demo is showcased using a nRF5340DK with a 7002DK as a shield. The nRF7002 supports the firmware patch relocation. But the 7002 is only a host-chip, and it requires a companion chip to work. On the 7002DK there is two nRF devices: The nRF7002 host chpi which is used for Wifi and Wifi-stuff only, connected with SPI to a nRF5340 that is acting as the companion chip (i.e where the application runs). In addition there is an external flash (mx25) that is by default connected to the 5340 with QSPI. Your explanation leads me to believe that you&amp;#39;re not&amp;nbsp;&lt;em&gt;quite&amp;nbsp;&lt;/em&gt;aware that this is how the 7002Dk is set up, but I could be wrong.&lt;/p&gt;
[quote user="Ondro"]I&amp;#39;ve read the intermediate course too and I would say that matter_bridge application is very complicated especially on nRF7002DK.[/quote]
&lt;p&gt;It is a comprehensive application, yes.&lt;/p&gt;
[quote user="Ondro"]On the base of this I have no clue what to do.[/quote]
&lt;p&gt;It might be better to start with simpler applications, i.e familiarize yourself with the other Matter over Thread and Matter over Wifi samples and see how you can optimize their footprint through either fw relocation to the external flash or through&amp;nbsp;&lt;/p&gt;
[quote user="Ondro"]In my opinion, I don&amp;#39;t see any restriction why an region of the external flash should be &amp;quot;unknown&amp;quot;. What could be a reason of this error?[/quote]
&lt;p&gt;&lt;em&gt;[error] [ Worker] - Address range [0x0013B000 - 0x0013B591] does not map to a known memory.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Might be that the device does not know of the external flash. How did you set it up in your devicetree files?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter bridge build process fails with "region `FLASH' overflowed"</title><link>https://devzone.nordicsemi.com/thread/477971?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2024 08:34:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fc0d6f3-2bb2-4d14-9487-69b677bb211a</guid><dc:creator>Ondro</dc:creator><description>&lt;p&gt;I tried to put every settings what could make a sense to *.conf files. It seems that redundant settings are ignored and conflicting ones caused errors thus I didn&amp;#39;t spent time with distinguishing what is relevant and what not. Then I updated pm_static_dfu.yml and it seems that I have a progress. Files are here: &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/shared.zip"&gt;devzone.nordicsemi.com/.../shared.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Sizes in regions where are not a part of external flash was increased due to:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;[138/148] Generating zephyr/mcuboot_primary_app.hex
[139/148] Generating zephyr/mcuboot_primary.hex
[140/148] Generating ../../zephyr/app_update.bin
FAILED: zephyr/app_update.bin /home/ubuntu/Projects/matter3/examples/nordic/bridge-for-ble-devices/build/zephyr/app_update.bin
cd /home/ubuntu/Projects/matter3/examples/nordic/bridge-for-ble-devices/build/modules/mcuboot &amp;amp;&amp;amp; /home/ubuntu/Projects/nordic-4.1.2/toolchains/19127b768d/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-objcopy --input-target=ihex --output-target=binary --gap-fill=0xff /home/ubuntu/Projects/matter3/examples/nordic/bridge-for-ble-devices/build/zephyr/mcuboot_primary_app.hex /home/ubuntu/Projects/matter3/examples/nordic/bridge-for-ble-devices/build/zephyr/app_to_sign.bin &amp;amp;&amp;amp; /home/ubuntu/Projects/nordic-4.1.2/toolchains/19127b768d/usr/local/bin/python3.9 /home/ubuntu/Projects/nordic-4.1.2/v2.6.0-rc1/bootloader/mcuboot/scripts/imgtool.py sign --key /home/ubuntu/Projects/nordic-4.1.2/v2.6.0-rc1/bootloader/mcuboot/root-rsa-2048.pem --header-size 0x200 --align 4 --version 2.5.99+0 --pad-header --slot-size 0xeb000 /home/ubuntu/Projects/matter3/examples/nordic/bridge-for-ble-devices/build/zephyr/app_to_sign.bin /home/ubuntu/Projects/matter3/examples/nordic/bridge-for-ble-devices/build/zephyr/app_update.bin
Usage: imgtool.py sign [OPTIONS] INFILE OUTFILE
Try &amp;#39;imgtool.py sign -h&amp;#39; for help.

Error: Image size (0xeb798) + trailer (0x630) exceeds requested size 0xeb000
image.py: sign the payload
[141/148] Generating ../../zephyr/app_signed.hex&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I was a bit confused why it generated primary_app when I wanted to use the mcuboot_secondary.&lt;br /&gt;&lt;br /&gt;At the moment I facing to a problem with flashing the image to the device/chip:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;west flash -d /home/ubuntu/Projects/matter3/examples/nordic/bridge-for-ble-devices/build --skip-rebuild --dev-id 1050712793 --erase

-- west flash: using runner nrfjprog
-- runners.nrfjprog: mass erase requested
-- runners.nrfjprog: reset after flashing requested
-- runners.nrfjprog: Flashing file: /home/ubuntu/Projects/matter3/examples/nordic/bridge-for-ble-devices/build/zephyr/merged_domains.hex
-- runners.nrfjprog: /home/ubuntu/Projects/matter3/examples/nordic/bridge-for-ble-devices/build/zephyr/merged_domains.hex targets both nRF53 coprocessors; splitting it into: /home/ubuntu/Projects/matter3/examples/nordic/bridge-for-ble-devices/build/zephyr/GENERATED_CP_NETWORK_merged_domains.hex and /home/ubuntu/Projects/matter3/examples/nordic/bridge-for-ble-devices/build/zephyr/GENERATED_CP_APPLICATION_merged_domains.hex
[ #################### ]   1.167s | Erase file - Done erasing                                                          
[ #################### ]   1.949s | Program file - Done programming                                                    
[ #################### ]   1.565s | Verify file - Done verifying                                                       
[error] [ Client] - Encountered error -173: Command erase_file executed for 422 milliseconds with result -173          
[error] [ Worker] - Address range [0x0013B000 - 0x0013B591] does not map to a known memory.
ERROR: The file specified is not a valid hex file, has data outside valid areas
ERROR: or does not have data in valid areas.
NOTE: For additional output, try running again with logging enabled (--log).
NOTE: Any generated log error messages will be displayed.
FATAL ERROR: command exited with status 52: nrfjprog --program /home/ubuntu/Projects/matter3/examples/nordic/bridge-for-ble-devices/build/zephyr/GENERATED_CP_APPLICATION_merged_domains.hex --chiperase --verify -f NRF53 --coprocessor CP_APPLICATION --snr 1050712793&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In my opinion, I don&amp;#39;t see any restriction why an region of the external flash should be &amp;quot;unknown&amp;quot;. What could be a reason of this error?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter bridge build process fails with "region `FLASH' overflowed"</title><link>https://devzone.nordicsemi.com/thread/477779?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2024 11:29:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15dcb4e8-7c0f-48d0-abbc-ee2ca815374c</guid><dc:creator>Ondro</dc:creator><description>&lt;p&gt;Hi Andreas,&lt;/p&gt;
&lt;p&gt;thank you for the response.&lt;/p&gt;
&lt;p&gt;At the first look, Wifi patch relocation to external flash seemed to be promising but unfortunately it is for external flashes connected over QSPI and not SPI. QSPI is used for Wifi chip. According to the documentation &amp;quot;...&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.6.0/nrf/device_guides/working_with_nrf/nrf70/developing/fw_patches_ext_flash.html"&gt;fw_patches_ext_flash.html&lt;/a&gt;&amp;quot;, nRF7002DK is not supported. I found something related to it at devzone: &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/82430/ncs-external-flash-ota-change-qspi-to-spi"&gt;ncs-external-flash-ota-change-qspi-to-spi&lt;/a&gt; but I didn&amp;#39;t go deeper.&lt;/p&gt;
&lt;p&gt;Any attemps to use external flash finished without any impact. I used for verification:&lt;/p&gt;
&lt;p&gt;west build -t partition_manager_report&lt;br /&gt;west build -t rom_report&lt;/p&gt;
&lt;p&gt;Fortunately,&amp;nbsp; switching release build + Os optimization&amp;nbsp; helps me enough but now I&amp;#39;m at 99% of flash usage so we will see.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve read the intermediate course too and I would say that matter_bridge application is very complicated especially on nRF7002DK. According to this: &lt;a id="" href="https://github.com/nrfconnect/sdk-nrf/blob/v2.6.0-rc1/applications/matter_bridge/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf"&gt;https://github.com/nrfconnect/sdk-nrf/blob/v2.6.0-rc1/applications/matter_bridge/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;it seems that is it:&lt;br /&gt;- Simultaneous multi-image DFU&lt;br /&gt;- MCUboot&amp;rsquo;s serial recovery of the networking core image&lt;/p&gt;
&lt;p&gt;There are also:&lt;br /&gt;- nRF7002DK needs a special configuration in comparing to nRF5340DK due to QSPI vs SPI issue&lt;br /&gt;- nRF5340DK has 2 cores(app, net) which increases the number of partition regions&lt;/p&gt;
&lt;p&gt;On the base of this I have no clue what to do.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter bridge build process fails with "region `FLASH' overflowed"</title><link>https://devzone.nordicsemi.com/thread/477300?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2024 12:16:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1275d9f1-6aba-4566-91c6-45f49a44c681</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Unfortunately the Matter over Wfi version of the samples are quite large due to the requirement of both the Wifi stack and Matter libraries, but we&amp;#39;re working on creating ROM efficient solutions that can fit on the internal flash, but the bridge application is quite demanding in general&lt;/p&gt;
&lt;p&gt;A couple of items that you can consider to do:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Wifi patch relocation to external flash:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.6.0/nrf/device_guides/working_with_nrf/nrf70/developing/fw_patches_ext_flash.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.6.0/nrf/device_guides/working_with_nrf/nrf70/developing/fw_patches_ext_flash.html&lt;/a&gt;
&lt;ol&gt;
&lt;li&gt;This might save you 50-120kB depending on the wifi firmware patch&lt;/li&gt;
&lt;li&gt;Disclaimer, if you choose the xip&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Secondary mcuboot application slots on external flash (as is default on the DKs) is a must for DFU&lt;/li&gt;
&lt;li&gt;CONFIG_PM_PARTITION_REGION_SETTINGS_STORAGE_EXTERNAL=y&amp;nbsp; &amp;nbsp;to allocate settings partitions to external flash is also a good solution as you state you&amp;#39;ve done&lt;/li&gt;
&lt;li&gt;Minimal mcuboot as seen here&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/samples/matter/lock/child_image/mcuboot/prj_release.conf"&gt;https://github.com/nrfconnect/sdk-nrf/blob/main/samples/matter/lock/child_image/mcuboot/prj_release.conf&lt;/a&gt;&amp;nbsp;(used in the release version of for instance the Matter door lock)&lt;/li&gt;
&lt;li&gt;General footprint optimization&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/test_and_optimize/optimizing/index.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/test_and_optimize/optimizing/index.html&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="massimodutte"] you may need to configure the Partition Manager to utilize it effectively[/quote]
&lt;p&gt;When&amp;nbsp;&lt;a title="massimodutte" href="https://devzone.nordicsemi.com/members/massimodutte"&gt;massimodutte&lt;/a&gt;&amp;nbsp;refers to this I believe they&amp;#39;re suggesting that you customize the partitions to fit what you need through&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/scripts/partition_manager/partition_manager.html#static-configuration"&gt;static configuration&lt;/a&gt;&amp;nbsp;of the partition manager. There aren&amp;#39;t any good samples that illustrates how to do this, so the best way to learn more is to go through the documentation I mentioned, and this lesson in the intermediate course&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-8-bootloaders-and-dfu-fota/"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-8-bootloaders-and-dfu-fota/&lt;/a&gt;&amp;nbsp;with focus on the section regarding partition manager and static configuration.&lt;/p&gt;
[quote user="Ondro"]&lt;br /&gt;which matches with the chip. Then I would guess it is OK.[/quote]
&lt;p&gt;Thats correct, the nRF7002DK has the mx25 external flash device and is enabled through the board files. You can inspect the partitioning by using the partition manager tool in the extension or by navigating to the build folder and using the command&amp;nbsp;&lt;em&gt;ninja partition_manager_report&lt;/em&gt; to see how it is set up (if you remove what makes it overflow you should get a successful build).&lt;/p&gt;
[quote user="Ondro"]- I&amp;#39;m sure that my device supports multi-image builds because this project is multi-image one and it works well in the original state. It is also possible to see in the folder structure:[/quote]
&lt;p&gt;This is correct&lt;/p&gt;
[quote user="Ondro"]I&amp;#39;m not sure if it is everything or should I add something else.[/quote]
&lt;p&gt;If you have any other partitions that you don&amp;#39;t need to execute or that does not need to be in a secure part of the ROM (i.e don&amp;#39;t put keys on external flash), then you are limited with what you can do put on the external flash.&lt;/p&gt;
&lt;p&gt;Regarding XIP, this is a possible option but I would hardly recommend that your first XIP project is a Matter project. Start with something simpler that you have more control over to get familiarized with the qspi driver and&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A couple of big key items with executing code from external flash is&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;It demands a lot more power than executing code from internal flash&lt;/li&gt;
&lt;li&gt;You will need to have control over every single part that you execute from there w.r.t timers and interrupts. Nothing that is depending on timing critical code should be put on the external flash for code execution.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Let me know if this helps you get any closer with shrinking your modified Matter bridge application. And disclaimer, do note that this application is only experimental as of now&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter bridge build process fails with "region `FLASH' overflowed"</title><link>https://devzone.nordicsemi.com/thread/477258?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2024 09:08:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab66f1d8-2232-40c3-b02c-5c559ec722a2</guid><dc:creator>Ondro</dc:creator><description>&lt;p&gt;Thank you for the fast response. &lt;br /&gt;&lt;br /&gt;- You didn&amp;#39;t mentioned re-arrange internal flash. Does it mean it is not possible?&lt;br /&gt;- I mentioned optimizations only to show a big picture what I tried to use. I&amp;#39;m not going to follow this way.&lt;br /&gt;- I checked again the presence of the external flash and found it &lt;a title="here" href="https://nsscprodmedia.blob.core.windows.net/prod/software-and-other-downloads/dev-kits/nrf7002-dk/nrf7002-development-kit---hardware-files-0_7_2.zip"&gt;here&lt;/a&gt; in file PCA10143_Schematic_And_PCB.pdf&lt;br /&gt;where is &lt;a href="https://www.macronix.com/Lists/Datasheet/Attachments/8868/MX25R6435F,%20Wide%20Range,%2064Mb,%20v1.6.pdf"&gt;MX25R6435F&lt;/a&gt; chip connected over SPI. The file &lt;strong&gt;./boards/nrf7002dk_nrf5340_cpuapp.overlay&lt;/strong&gt; contains:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;/ {
  chosen {
    nordic,pm-ext-flash = &amp;amp;mx25r64;
  };
};&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;which matches with the chip. Then I would guess it is OK. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- I&amp;#39;m sure that my device supports multi-image builds because this project is multi-image one and it works well in the original state. It is also possible to see in the folder structure:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;./child_image/
    - mcuboot
    - hci_ipc&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;- If we are talking about &amp;quot;partition manager configuration file&amp;quot;, I think that it is about this file &lt;strong&gt;./configuration/nrf7002dk_nrf5340_cpuapp/pm_static_dfu.yml&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Here I made a few experiments but without success, e.g: &lt;br /&gt;- I increased a bit of &amp;quot;app&amp;quot; size or&lt;br /&gt;- I removed all blocks with &amp;quot;region: external_flash&amp;quot; and changed a region in blocks with &amp;quot;region: flash_primary&amp;quot; to &amp;quot;region: external_flash&amp;quot;&lt;br /&gt;&lt;br /&gt;I assume this file is connected to files:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;- ./prj.conf&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;- ./child_image/mcuboot/prj.conf&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;where I added (in both of them), e.g:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_SPI=y
CONFIG_SPI_NOR=y
CONFIG_FLASH=y
CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y
CONFIG_PM_PARTITION_REGION_SETTINGS_STORAGE_EXTERNAL=y  &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I&amp;#39;m not sure if it is everything or should I add something else.&lt;br /&gt;&lt;br /&gt;I&amp;#39;m afraid that everything what I tried to edit to solve the issue was ignored due to one of this warnings appeared during the build:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;=== child image b0n - CPUNET (inherited) end ===
...

          ---------------------------------------------------------------------
          --- WARNING: Using a bootloader without pm_static.yml.            ---
          --- There are cases where a deployed product can consist of       ---
          --- multiple images, and only a subset of these images can be     ---
          --- upgraded through a firmware update mechanism. In such cases,  ---
          --- the upgradable images must have partitions that are static    ---
          --- and are matching the partition map used by the bootloader     ---
          --- programmed onto the device.                                   ---
          ---------------------------------------------------------------------
...
=== child image hci_ipc - CPUNET end ===
...
=== child image mcuboot -  end ===
...
-- Found partition manager static configuration: /home/ubuntu/Projects/matter3/examples/nordic/bridge-for-ble-devices/configuration/nrf7002dk_nrf5340_cpuapp/pm_static_dfu.yml
Partition &amp;#39;mcuboot&amp;#39; is not included in the dynamic resolving since it is statically defined.
Partition &amp;#39;mcuboot_pad&amp;#39; is not included in the dynamic resolving since it is statically defined.
Partition &amp;#39;mcuboot_primary&amp;#39; is not included in the dynamic resolving since it is statically defined.
Partition &amp;#39;mcuboot_primary_app&amp;#39; is not included in the dynamic resolving since it is statically defined.
Partition &amp;#39;settings_storage&amp;#39; is not included in the dynamic resolving since it is statically defined.
Partition &amp;#39;mcuboot_primary_1&amp;#39; is not included in the dynamic resolving since it is statically defined.
Partition &amp;#39;mcuboot_secondary&amp;#39; is not included in the dynamic resolving since it is statically defined.
Partition &amp;#39;mcuboot_secondary_1&amp;#39; is not included in the dynamic resolving since it is statically defined.
Partition &amp;#39;pcd_sram&amp;#39; is not included in the dynamic resolving since it is statically defined.
CMake Warning at /home/ubuntu/Projects/nordic-4.1.2/v2.6.0-rc1/nrf/cmake/partition_manager.cmake:593 (message):
  Could not find memory mapped address for XIP.  Generated update hex files
  will not have the correct base address.  Hence they can not be programmed
  directly to the external flash&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The whole log is &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/matter_2D00_bridge.build.zip"&gt;devzone.nordicsemi.com/.../matter_2D00_bridge.build.zip&lt;/a&gt;. It is from the build process with edited &lt;strong&gt;prj.conf&lt;/strong&gt; files only.&lt;br /&gt;&lt;br /&gt;You also mentioned &amp;quot;memory regions&amp;quot;. I have an overview what is it but I have no clue how they are connected to the binary code which should filled there. Is my issue &amp;quot;section `datas&amp;#39; will not fit in region `FLASH&amp;#39;&amp;quot; connected to the &amp;quot;app&amp;quot; block? If yes where I can see it?&lt;/p&gt;
&lt;p&gt;I would like to ask you to be more specific in your answer because I&amp;#39;m completely new to this field.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter bridge build process fails with "region `FLASH' overflowed"</title><link>https://devzone.nordicsemi.com/thread/477186?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2024 16:12:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a7555eb-a050-45e6-bbac-76e4b4a04640</guid><dc:creator>massimodutte</dc:creator><description>&lt;p&gt;You&amp;#39;ve already mentioned using optimization flags like &lt;code&gt;-Os&lt;/code&gt; to optimize code size. Ensure that these flags are applied correctly and consider experimenting with other optimization flags if necessary. If your device has an external flash memory, you may need to configure the Partition Manager to utilize it effectively. This involves defining memory regions and their sizes in the partition manager configuration file. Make sure that your firmware image is configured to be stored in the external flash if you have one. If your device supports multi-image builds, you can split your firmware into multiple images, each stored in different memory regions. This can help manage memory usage more efficiently.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>