<?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>Undefined reference to &amp;#39;nrf_dfu_button_enter_check&amp;#39;</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/28527/undefined-reference-to-nrf_dfu_button_enter_check</link><description>When creating a custom bootloader for buttonless DFU, it is surprising to see that nrf_dfu.c not compile without defining button related function. 
 The warning 
 nRF5_SDK_14.2.0_17b948a/components/libraries/bootloader/dfu/nrf_dfu.c:81: undefined reference</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 21 Dec 2017 16:42:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/28527/undefined-reference-to-nrf_dfu_button_enter_check" /><item><title>RE: Undefined reference to 'nrf_dfu_button_enter_check'</title><link>https://devzone.nordicsemi.com/thread/112962?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2017 16:42:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4770e64-80ef-4b17-ba78-f4c716e4159a</guid><dc:creator>Kyle Krueger</dc:creator><description>&lt;p&gt;That is still a workaround though. Given that buttonless dfu is supported, it should be expected that all code referencing button presses may be safely removed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Undefined reference to 'nrf_dfu_button_enter_check'</title><link>https://devzone.nordicsemi.com/thread/112961?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2017 16:30:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39c57b60-81d6-4d12-b2ec-2adfcca7c8d1</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Not sure why it&amp;#39;s complaining, in our example the function is defined in main.c:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;bool nrf_dfu_button_enter_check(void)
{
    if (nrf_gpio_pin_read(BOOTLOADER_BUTTON) == 0)
    {
        return true;
    }
    
    return false;
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Undefined reference to 'nrf_dfu_button_enter_check'</title><link>https://devzone.nordicsemi.com/thread/112964?ContentTypeID=1</link><pubDate>Fri, 08 Dec 2017 11:02:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0888fcb8-568b-434a-9ce0-2cba43cd91fd</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Thank you for the report. I have forwarded your suggestion to the the SDK team.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Undefined reference to 'nrf_dfu_button_enter_check'</title><link>https://devzone.nordicsemi.com/thread/112963?ContentTypeID=1</link><pubDate>Thu, 07 Dec 2017 11:44:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e35e388-c800-4114-bb44-68e9e2d2681f</guid><dc:creator>Kyle Krueger</dc:creator><description>&lt;p&gt;A workaround is to make a define of the function in the bootloader code even though the function is not needed.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;bool nrf_dfu_button_enter_check(void)
{
    return false;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I would suggest fixing this in the next release with a weak function declaration within the SDK that doesn&amp;#39;t do anything.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;@brief Empty button press handler to be overridden when not using buttonless DFU
__weak bool nrf_dfu_button_enter_check(void)
{
    return false;
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>