<?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>nrf_drv_timer.c left out from compiling</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/48691/nrf_drv_timer-c-left-out-from-compiling</link><description>I am getting following error while building the project. 
 
 undefined reference to `nrf_drv_timer_pause&amp;#39; 
 undefined reference to `nrf_drv_timer_clear&amp;#39; 
 
 I believe these functions are located in nrf_drv_timer.c . I have added the nrf_drv_timer.h header</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Jun 2019 12:29:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/48691/nrf_drv_timer-c-left-out-from-compiling" /><item><title>RE: nrf_drv_timer.c left out from compiling</title><link>https://devzone.nordicsemi.com/thread/193429?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2019 12:29:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5eb1efe-5ad2-40ac-bd36-ff0b2369edd6</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;That&amp;#39;s an interesting thought. Usually #defines are used in .h files and cause compilation errors for undefined functions as unused functions are tossed by the linker anyway so you just compile them and don&amp;#39;t worry about it. However the nrf_drv_timer.c does have code guarded by #if, in this case it&amp;#39;s&amp;nbsp;&lt;/p&gt;
&lt;p&gt;#if NRF_MODULE_ENABLED(TIMER)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;and&lt;/p&gt;
&lt;p&gt;#if ENABLED_TIMER_COUNT&lt;/p&gt;
&lt;p&gt;so yes it&amp;#39;s quite likely one of those two things is not enabled.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_drv_timer.c left out from compiling</title><link>https://devzone.nordicsemi.com/thread/193389?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2019 11:07:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e3a9d94-7470-4c4a-88cc-7f4e368d9de0</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;Maybe you need to add another define to be able to use nrf_drv_pause &amp;amp; nrf_drv_timer_clear? Have you checked to make sure this is not the case?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_drv_timer.c left out from compiling</title><link>https://devzone.nordicsemi.com/thread/193276?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2019 01:43:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6ee82fb-0704-4b14-a1d9-6061fe8b9789</guid><dc:creator>Rabbi</dc:creator><description>&lt;p&gt;Thank you for your reply. I haven&amp;#39;t excluded it. Also, I removed it and added it again but the problem remains.&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/960x720/__key/communityserver-discussions-components-files/4/0447.Capture.PNG" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_drv_timer.c left out from compiling</title><link>https://devzone.nordicsemi.com/thread/193268?ContentTypeID=1</link><pubDate>Mon, 17 Jun 2019 22:43:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0fcb5bd7-a8e0-4517-897a-2f133baa3d6c</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;well it&amp;#39;s either not actually on the list or you&amp;#39;ve selected the option (right click) to exclude it from the project, or the folder it&amp;#39;s in is excluded from the project or similar. You could try removing it and then re-adding it incase you&amp;#39;ve selected such an option by mistake.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_drv_timer.c left out from compiling</title><link>https://devzone.nordicsemi.com/thread/193267?ContentTypeID=1</link><pubDate>Mon, 17 Jun 2019 22:11:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:731af804-4521-47f5-a84c-955412df9ac5</guid><dc:creator>Rabbi</dc:creator><description>&lt;p&gt;This file is on that list. However, it is left as uncompiled.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_drv_timer.c left out from compiling</title><link>https://devzone.nordicsemi.com/thread/193266?ContentTypeID=1</link><pubDate>Mon, 17 Jun 2019 21:53:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c79555aa-6af2-4e73-a75f-68a01a368c15</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;So add the .c file to the list of files in the project so it gets compiled. That big list of files on the left hand side of the screen, those are the compiled files, if it&amp;#39;s not being compiled, it&amp;#39;s because it&amp;#39;s not in that list.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>