<?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>Conditioanl compilation.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/123091/conditioanl-compilation</link><description>I am using mcuboot with the child image functionality. my app should work for nrf52840dk and nrf5340dk. I want to set up the configurations so that for each board, the right configurations would be chosen. For the main image, I know this is pretty simple</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 23 Jul 2025 14:22:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/123091/conditioanl-compilation" /><item><title>RE: Conditioanl compilation.</title><link>https://devzone.nordicsemi.com/thread/543377?ContentTypeID=1</link><pubDate>Wed, 23 Jul 2025 14:22:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:325fba67-ebcb-499c-9c0a-916f6aaca1ac</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;1. Yes. You have to&amp;nbsp;add the configurations of mcuboot from the default&amp;nbsp;&lt;span&gt;MCUboot&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;prj.conf&lt;/code&gt;&lt;span&gt;&amp;nbsp;of the SDK. In addition to the change, you want to make you have to add this default one as well.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If you only want to add or override a few settings, you should instead use&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;mcuboot.conf&lt;/code&gt;&lt;span&gt;&amp;nbsp;at the appropriate level, which&amp;nbsp;&lt;/span&gt;&lt;strong&gt;overlays&lt;/strong&gt;&lt;span&gt;&amp;nbsp;the default configuration rather than replacing it entirely.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2.&amp;nbsp;. I am also trying to take diffrent pm_static files for each board. I am trying to use the pm_static_&amp;lt;board name&amp;gt;.yaml convetntion but for some reason the build system doesnt pick it up, why is that?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can you show me the inside picture of your application folder?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Conditioanl compilation.</title><link>https://devzone.nordicsemi.com/thread/542978?ContentTypeID=1</link><pubDate>Mon, 21 Jul 2025 09:33:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fbbce34c-a7b5-466f-b0b8-c121ad5437c7</guid><dc:creator>shlomots</dc:creator><description>&lt;p&gt;thanks, few followups,&lt;br /&gt;1. I actually found out I can do that few moments ago, but the problem is once I create this mcuboot folder, it doesn&amp;#39;t take the base prj.conf of the mcuboot imagae, forcing me to write one myself and putting it inside the mcuboot folder. If I create this folder, it means I have to override the entire prj.conf?&lt;br /&gt;2. I am also trying to take diffrent pm_static files for each board. I am trying to use the pm_static_&amp;lt;board name&amp;gt;.yaml convetntion but for some reason the build system doesnt pick it up, why is that?&lt;br /&gt;I am using ncs 2.7.0.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Conditioanl compilation.</title><link>https://devzone.nordicsemi.com/thread/542977?ContentTypeID=1</link><pubDate>Mon, 21 Jul 2025 09:28:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf096f70-cb0b-4834-be9d-44d218c7c748</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Sholomo,&lt;/p&gt;
&lt;p&gt;Setting separate configurations for the specific board (for the child image in a multi-board project), you have to use child_image/mcuboot/boards directory in the project. For each board,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;&lt;span&gt;&lt;code dir="ltr"&gt;child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf&lt;/code&gt;&amp;nbsp;(for nrf5340dk)&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;span&gt;&lt;code dir="ltr"&gt;child_image/mcuboot/boards/nrf52840dk_nrf52840.conf&lt;/code&gt;&amp;nbsp;(for nrf52840dk)&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, in your case you can place the configuration files in&amp;nbsp;child_image/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf file&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BOOT_IMAGE_ACCESS_HOOK_NRF5340=y
CONFIG_BOOT_IMAGE_ACCESS_HOOKS=y

CONFIG_NRF53_MULTI_IMAGE_UPDATE=y
CONFIG_UPDATEABLE_IMAGE_NUMBER=2
CONFIG_PCD_APP=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;There is a previous case&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/113686/support-for-separate-mcuboot-configurations-for-nrf52840-and-nrf5340"&gt;(+) Support for separate mcuboot configurations for nrf52840 and nrf5340 - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone&lt;/a&gt;, you can look at.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;p&gt;Kazi&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>