<?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>Read out the bootloader version from nrfutil from the main application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91286/read-out-the-bootloader-version-from-nrfutil-from-the-main-application</link><description>Hi 
 How can I read out the bootloader version from the main application which I defined in the zip packet (or merged hex) with nrfutil? 
 rfutil pkg generate --hw-version 52 --bootloader-version X 
 nrfutil settings generate --no-backup --family NRF52840</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 24 Aug 2022 11:08:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91286/read-out-the-bootloader-version-from-nrfutil-from-the-main-application" /><item><title>RE: Read out the bootloader version from nrfutil from the main application</title><link>https://devzone.nordicsemi.com/thread/383043?ContentTypeID=1</link><pubDate>Wed, 24 Aug 2022 11:08:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca8e6ca8-4230-401a-88d8-5236a8844cad</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The application version will be kept in the bootloader settings area in the last flash page (&lt;span&gt;&lt;a title="Memory layout" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_bootloader.html?cp=8_1_3_5_0_7#lib_bootloader_memory"&gt;Memory layout&lt;/a&gt;&lt;/span&gt;), so you could get the version number from there.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;quot;nrf_dfu_types.h&amp;quot;

#define BOOTLOADER_SETTINGS_PAGE_ADDR 0xFF000

int main(void)
{
    bool erase_bonds;

    // Initialize.
    log_init();
    nrf_dfu_settings_t const * dfu_settings = (nrf_dfu_settings_t const *) BOOTLOADER_SETTINGS_PAGE_ADDR;
    NRF_LOG_INFO(&amp;quot;Application version %d&amp;quot;, dfu_settings-&amp;gt;app_version);
    ...&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Include path for nrf_dfu_types.h is ../../../../../../components/libraries/bootloader/dfu&lt;/p&gt;
&lt;p&gt;The other alternative would be to integrate the &lt;span&gt;&lt;a title="DFU settings" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/group__nrf__dfu__settings.html?cp=8_1_6_10_7_0_6"&gt;DFU settings&lt;/a&gt;&lt;/span&gt; module in your application, but I don&amp;#39;t think it makes sense in this case as you only need read access.&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>