<?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>CONFIG options in cmake file have no effect after updating NCS to 2.5</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/108594/config-options-in-cmake-file-have-no-effect-after-updating-ncs-to-2-5</link><description>Hi, 
 I am migrating some projects from NCS 2.3 to NCS 2.5.2 and noticed that the configs I made in the cmakelists file no longer have an effect. 
 This is how it worked in ncs 2.3: 
 
 But now this has no effect anymore. If I set the options in prj.conf</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 03 May 2024 13:54:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/108594/config-options-in-cmake-file-have-no-effect-after-updating-ncs-to-2-5" /><item><title>RE: CONFIG options in cmake file have no effect after updating NCS to 2.5</title><link>https://devzone.nordicsemi.com/thread/481826?ContentTypeID=1</link><pubDate>Fri, 03 May 2024 13:54:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da4f7ea0-62c8-4d0b-a7f2-95605e4e8335</guid><dc:creator>jonas.woerner</dc:creator><description>&lt;p&gt;I just found out that I was doing it wrong all the time, and if doing it right, it does work!&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#2b2d31;color:#dbdee1;float:none;font-family:&amp;#39;gg mono&amp;#39;, &amp;#39;Source Code Pro&amp;#39;, Consolas, &amp;#39;Andale Mono WT&amp;#39;, &amp;#39;Andale Mono&amp;#39;, &amp;#39;Lucida Console&amp;#39;, &amp;#39;Lucida Sans Typewriter&amp;#39;, &amp;#39;DejaVu Sans Mono&amp;#39;, &amp;#39;Bitstream Vera Sans Mono&amp;#39;, &amp;#39;Liberation Mono&amp;#39;, &amp;#39;Nimbus Mono L&amp;#39;, Monaco, &amp;#39;Courier New&amp;#39;, Courier, monospace;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:pre-wrap;"&gt;set(CONFIG_MCUBOOT_HEX_FILE &amp;quot;\&amp;quot;${CMAKE_SOURCE_DIR}/my.hex\&amp;quot;&amp;quot; CACHE STRING &amp;quot;blah&amp;quot;)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;note that the quotes have to be escaped. And what I was missing, was the &amp;quot;CACHE STRING&amp;quot; stuff. It works like that. Thanks to Bell over at Discord for telling me :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CONFIG options in cmake file have no effect after updating NCS to 2.5</title><link>https://devzone.nordicsemi.com/thread/471825?ContentTypeID=1</link><pubDate>Fri, 01 Mar 2024 14:07:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81638832-2528-4028-94fb-fc34b9d5da11</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I see the same. We have had a similar case reported before and &lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/12543"&gt;did some work on it&lt;/a&gt;&amp;nbsp;but it is not completed yet. For now I suggest using a fixed path and specifying in prj.conf as that is the only curently supported and working option, but you can look into the mentionned pull request if you really need to work around id (note that this may not make it in even with changes, so there is no guarantee that that approach will work in the future).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CONFIG options in cmake file have no effect after updating NCS to 2.5</title><link>https://devzone.nordicsemi.com/thread/471042?ContentTypeID=1</link><pubDate>Tue, 27 Feb 2024 13:51:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b91ba701-6870-4e88-a7c7-b5c60c9e0ca1</guid><dc:creator>jonas.woerner</dc:creator><description>&lt;p&gt;I just tried it and this sample does work. but try adding set(CONFIG_MCUBOOT_BUILD_STRATEGY_USE_HEX_FILE &amp;quot;y&amp;quot;)&lt;/p&gt;
&lt;p&gt;this should lead to an error because the hex file is not specified, but with the current version of NCS its just ignored.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CONFIG options in cmake file have no effect after updating NCS to 2.5</title><link>https://devzone.nordicsemi.com/thread/471032?ContentTypeID=1</link><pubDate>Tue, 27 Feb 2024 13:32:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6bcdc35a-e86d-4737-80d8-68ab25079dea</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There is no way I am aware of to change it. That would be the hack/workaround by specifying the relative path in CMakeLists.txt. Regarding that,&amp;nbsp;while it is not the supported way it should work, and still works for me on version 2.5.2. Can you test on your end, for instance by testing with &lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/keys_and_signatures/mcuboot_smp_custom_key"&gt;this unoficial sample&lt;/a&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CONFIG options in cmake file have no effect after updating NCS to 2.5</title><link>https://devzone.nordicsemi.com/thread/471026?ContentTypeID=1</link><pubDate>Tue, 27 Feb 2024 13:17:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6776819-d800-446c-91e5-25344b072fbe</guid><dc:creator>jonas.woerner</dc:creator><description>&lt;p&gt;is there a way to change this behaviour? this doesnt really make sense when using a precompiled hex file... Alternatively a fix for the cmake way would also be good. But if the preferred way is to use prj.conf, maybe including an option to force the relative root to prj.conf dir would be a good idea?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CONFIG options in cmake file have no effect after updating NCS to 2.5</title><link>https://devzone.nordicsemi.com/thread/471015?ContentTypeID=1</link><pubDate>Tue, 27 Feb 2024 12:47:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:340620cc-f0db-44f4-b6d2-0d8ac7f9233e</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Yes, you are right. It&amp;nbsp;will be relative to mcuboot. From the doc: &amp;quot;&lt;em&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.2/nrf/config_and_build/bootloaders_and_dfu/bootloader_adding.html"&gt;...the application directory for relative pathing is considered to be bootloader/mcuboot&lt;/a&gt;&lt;/em&gt;&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CONFIG options in cmake file have no effect after updating NCS to 2.5</title><link>https://devzone.nordicsemi.com/thread/470991?ContentTypeID=1</link><pubDate>Tue, 27 Feb 2024 11:57:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b71333c-e8e5-4361-a76a-e19cacfad031</guid><dc:creator>jonas.woerner</dc:creator><description>&lt;p&gt;so, I tried it but it does not work for me. the relative path is determined from the toolchain directory and not the application source directory... is there a way to change this?&lt;/p&gt;
&lt;p&gt;EDIT: Its not the toolchain dir, but the ncs/version/bootloader/mcuboot dir, Is this a bug? as this is the application directory of mcuboot, but only if I were to compile it... as Im using a precompiled version, this directory has nothing todo with my application..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CONFIG options in cmake file have no effect after updating NCS to 2.5</title><link>https://devzone.nordicsemi.com/thread/470780?ContentTypeID=1</link><pubDate>Mon, 26 Feb 2024 14:24:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb1bb80a-cd5d-4ff9-836d-da931b545927</guid><dc:creator>jonas.woerner</dc:creator><description>&lt;p&gt;ooh thats great, I will try this! thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CONFIG options in cmake file have no effect after updating NCS to 2.5</title><link>https://devzone.nordicsemi.com/thread/470779?ContentTypeID=1</link><pubDate>Mon, 26 Feb 2024 14:22:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b8401af-83ba-4f14-a889-a7fff433977b</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;That was a problem yes, but you can use relative paths now. This is described in the documentation (search for &amp;quot;relative&amp;quot; &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.2/nrf/config_and_build/bootloaders_and_dfu/bootloader_adding.html"&gt;here&lt;/a&gt;).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CONFIG options in cmake file have no effect after updating NCS to 2.5</title><link>https://devzone.nordicsemi.com/thread/470763?ContentTypeID=1</link><pubDate>Mon, 26 Feb 2024 13:46:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fffab50a-b63d-4476-9b9a-473d3e1da38a</guid><dc:creator>jonas.woerner</dc:creator><description>&lt;p&gt;ok, problem is, I cannot use relative paths in the prj.conf, or can?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CONFIG options in cmake file have no effect after updating NCS to 2.5</title><link>https://devzone.nordicsemi.com/thread/470761?ContentTypeID=1</link><pubDate>Mon, 26 Feb 2024 13:44:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c01f36c-c78e-451d-b7b2-7daf6095b56b</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi &lt;span&gt;Jonas&lt;/span&gt;,&lt;/p&gt;
&lt;p&gt;I will look into what has changed. That said, setting these configs in the CMakeLists.txt file has been suggested sometimes, but the proper way to provide tese is in Kconfig files (like prj.conf), so that should be used. (See &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.2/nrf/config_and_build/bootloaders_and_dfu/bootloader_adding.html"&gt;Adding a bootloader chain&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>