<?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>Linking error with SAADC driver</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47700/linking-error-with-saadc-driver</link><description>I am getting the linking error seen in the uploaded image. I am using segger embedded studio with SDK 15.3.0. I have already added the nrfx_saadc.c file to the project folder as well as enabled saadc in the config file. 
 
 
 code error points to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 03 Jun 2019 05:58:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47700/linking-error-with-saadc-driver" /><item><title>RE: Linking error with SAADC driver</title><link>https://devzone.nordicsemi.com/thread/190406?ContentTypeID=1</link><pubDate>Mon, 03 Jun 2019 05:58:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc21aefe-f732-4699-ba9b-35d5e551b1ed</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;It looks like you have not included the source file for the legacy PPI driver to the project:&lt;/p&gt;
&lt;p&gt;integration\nrfx\legacy\nrf_drv_ppi.c&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Linking error with SAADC driver</title><link>https://devzone.nordicsemi.com/thread/190393?ContentTypeID=1</link><pubDate>Sun, 02 Jun 2019 21:56:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75058d32-3bf9-4569-abc3-9efd6d75cc53</guid><dc:creator>michael1</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I actually fixed the problem using the method you suggested after looking at Jorgen&amp;#39;s and Chris&amp;#39;s answer. I realized that there is actually two saadc enables and I only enabled the nrfx_saadc_enabled.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#ifndef SAADC_ENABLED
#define SAADC_ENABLED 1
#endif

#ifndef NRFX_SAADC_ENABLED
#define NRFX_SAADC_ENABLED 1
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;However, I am wondering if you can help with a very similar linking issue with the PPI driver. I have added the PPI driver file and enabled it in the sdk_config.h file. However, I am getting a linking error seen below. I have attached the project files for the attached a link for the project.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/mmabcd/nordic_support_question_saadc/tree/master/ble_app_template%20copy"&gt;github.com/.../ble_app_template copy&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Building ‘ble_app_template_pca10056_s140’ from solution ‘ble_app_template_pca10056_s140’ in configuration ‘Release’
  Compiling ‘main.c’
  Linking ble_app_template_pca10056_s140.elf
    Output/ble_app_template_pca10056_s140 Release/Obj/main.o: in function `saadc_sampling_event_init&amp;#39;:
    undefined reference to `nrf_drv_ppi_init&amp;#39;
Build failed&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Linking error with SAADC driver</title><link>https://devzone.nordicsemi.com/thread/189617?ContentTypeID=1</link><pubDate>Tue, 28 May 2019 11:53:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb97586d-892e-4cde-9292-d368129676bd</guid><dc:creator>Chris_Dev</dc:creator><description>&lt;p&gt;Hi Michaell,&lt;/p&gt;
&lt;p&gt;I had the same issue, even after changing the sdk_config.h file and adding the source files to my project.&lt;/p&gt;
&lt;p&gt;Jorgen is correct, this should be sufficient.&lt;/p&gt;
&lt;p&gt;A temporary fix for this is to go to the&amp;nbsp;&lt;strong&gt;nrfx_saadc.c&amp;nbsp;&lt;/strong&gt;file and add &lt;strong&gt;#define NRFX_SAADC_ENABLED 1&lt;/strong&gt;&amp;nbsp;to the top of the file. See below:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1559044338113v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Chris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Linking error with SAADC driver</title><link>https://devzone.nordicsemi.com/thread/189388?ContentTypeID=1</link><pubDate>Mon, 27 May 2019 14:51:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:646dd13c-9056-4bf3-bee0-21c209c88b3a</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Adding the source file and enabling the module should be sufficient. Are you sure that you did not include multiple sdk_config.h files, or if there is something else in the project that overwrites the config?&lt;/p&gt;
&lt;p&gt;Can you upload the project for debugging?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Linking error with SAADC driver</title><link>https://devzone.nordicsemi.com/thread/189119?ContentTypeID=1</link><pubDate>Fri, 24 May 2019 22:33:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d035d3b-e957-4d28-9ea3-e08fa1eb895c</guid><dc:creator>michael1</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have enabled the SAADC in the sdk_config.h file. The error still persist? Is there any else I am missing when adding a driver other than adding the driver file to the project and enabling in sdk_config.h?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Linking error with SAADC driver</title><link>https://devzone.nordicsemi.com/thread/188963?ContentTypeID=1</link><pubDate>Fri, 24 May 2019 07:46:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a155995f-3158-4f62-945c-dc735aaf9afe</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Have you enabled the SAADC legacy driver by setting the following define in your sdk_config.h file?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;// &amp;lt;e&amp;gt; SAADC_ENABLED - nrf_drv_saadc - SAADC peripheral driver - legacy layer
//==========================================================
#ifndef SAADC_ENABLED
#define SAADC_ENABLED 1
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>