<?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>NCS: Select pm_static.yml dependent on Config</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97834/ncs-select-pm_static-yml-dependent-on-config</link><description>I have two project configurations one for debug and one for release. Dependent on configuration I want to select pm_static_board.yml or use default flash layout. 
 For this I created Kconfig file and added new config: 
 
 In CMakeLists.tx added the following</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 09 Dec 2024 14:45:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97834/ncs-select-pm_static-yml-dependent-on-config" /><item><title>RE: NCS: Select pm_static.yml dependent on Config</title><link>https://devzone.nordicsemi.com/thread/514066?ContentTypeID=1</link><pubDate>Mon, 09 Dec 2024 14:45:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d88f4afb-7a16-4cfc-88b9-e9837157583e</guid><dc:creator>Marko W</dc:creator><description>&lt;p&gt;&lt;span class="HwtZe" lang="en"&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;I have the same problem and used the following solution: &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="HwtZe" lang="en"&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;Renamed the file &amp;quot;pm_static.yml&amp;quot; to &amp;quot;pm_static_release.yml&amp;quot;.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="HwtZe" lang="en"&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;Then in the build configuration for release (not debug) under &amp;quot;Extra CMake arguments&amp;quot; added the following: &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span class="HwtZe" lang="en"&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;-DPM_STATIC_YML_FILE=&amp;quot;pm_static_release.yml&amp;quot; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="HwtZe" lang="en"&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;(with &amp;quot;-&amp;quot; at the beginning!)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;To simplify things, I then saved the debug and release configuration in the configuration preset (CMakePresets.json).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS: Select pm_static.yml dependent on Config</title><link>https://devzone.nordicsemi.com/thread/466209?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2024 12:31:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84e6b147-4e1f-409d-99fd-21fb423912d2</guid><dc:creator>mesh777</dc:creator><description>&lt;p&gt;Seems the problem is that CMake does not see CONFIG value before&amp;nbsp;&lt;span&gt;find_package&lt;/span&gt;&lt;span&gt;(Zephyr &lt;/span&gt;&lt;span&gt;REQUIRED&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;HINTS&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;$ENV{ZEPHYR_BASE}&lt;/span&gt;&lt;span&gt;) is called.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;However if I place code after find_package call, pm_static file is not assigned.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Any ideas how to resolve this issue?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS: Select pm_static.yml dependent on Config</title><link>https://devzone.nordicsemi.com/thread/416052?ContentTypeID=1</link><pubDate>Fri, 17 Mar 2023 14:28:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c15d934-da01-447c-b378-dffa224cbb63</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Looks like you are doing everything fine.&lt;/p&gt;
&lt;p&gt;Can you please send your project as a whole in the zip file. Seems like CMAKE thing.&lt;/p&gt;
&lt;p&gt;(you don&amp;#39;t need to include your own source code, just the minimal project to demonstrate the issue.)&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>