<?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>Setting BT_DIS_FW_REV_STR from VERSION file</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/109344/setting-bt_dis_fw_rev_str-from-version-file</link><description>Hi, 
 Im using the VERSION file for firmware versioning: https://docs.zephyrproject.org/latest/build/version/index.html 
 I would like to use this to set BT_DIS_FW_REV_STR for the BT DIS service. 
 What I have tried: 
 - setting BT_DIS_FW_REV_STR in project</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 29 Apr 2025 12:27:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/109344/setting-bt_dis_fw_rev_str-from-version-file" /><item><title>RE: Setting BT_DIS_FW_REV_STR from VERSION file</title><link>https://devzone.nordicsemi.com/thread/533395?ContentTypeID=1</link><pubDate>Tue, 29 Apr 2025 12:27:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a44d44a-a031-4d73-b1ab-14a56d16e8e5</guid><dc:creator>JoEi</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/vibe"&gt;Vidar Berg&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve just tried to do the same thing with NCS 2.9.0 and 3.0.0 but initially it didn&amp;#39;t work.&lt;br /&gt;In my case the problem was the line &amp;quot;&lt;span&gt;source&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;Kconfig.zephyr&amp;quot;&amp;quot;&lt;/span&gt;&lt;br /&gt;I had to put it at the end of the Kconfig file and then everything worked fine.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Johannes&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting BT_DIS_FW_REV_STR from VERSION file</title><link>https://devzone.nordicsemi.com/thread/476014?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2024 19:04:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:863b7f39-8f37-4557-9ebb-5990361bc94d</guid><dc:creator>Rein G. Bentdal</dc:creator><description>&lt;p&gt;Thanks! Worked like a charm&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting BT_DIS_FW_REV_STR from VERSION file</title><link>https://devzone.nordicsemi.com/thread/474213?ContentTypeID=1</link><pubDate>Mon, 18 Mar 2024 08:18:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0595b4f3-e5f5-4367-984a-8de8c6854fee</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Please try to add the Kconfig file included in the .zip attached below to your project source directory.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/0753.Kconfig.zip"&gt;devzone.nordicsemi.com/.../0753.Kconfig.zip&lt;/a&gt;&lt;/p&gt;
[quote user=""]- setting&amp;nbsp; BT_DIS_FW_REV_STR in project CMakeLists.txt: seems like I first have to run&amp;nbsp;&lt;span&gt;find_package&lt;/span&gt;&lt;span&gt;(Zephyr REQUIRED HINTS &lt;/span&gt;&lt;span&gt;$ENV{ZEPHYR_BASE}&lt;/span&gt;&lt;span&gt;) to expose the versioning variables. However this then looks to be too late for setting&amp;nbsp;BT_DIS_FW_REV_STR&lt;/span&gt;[/quote]
&lt;p&gt;I agree with your observation. This approach would probably have worked if the version information was available&amp;nbsp;prior to calling find_package().&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>