<?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>Module dependencies</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34774/module-dependencies</link><description>Hey guys, 
 With the new SDK15, I find myself looking at dependency problems over and over again. Right now, I am trying to setup a simple A/D conversion using nrfx_adc. Found the nrfx_adc module, found the documentation on the infocentre. I included</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 31 May 2018 15:10:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34774/module-dependencies" /><item><title>RE: Module dependencies</title><link>https://devzone.nordicsemi.com/thread/134227?ContentTypeID=1</link><pubDate>Thu, 31 May 2018 15:10:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b81d5e7-2abf-407a-a051-7a27cbd49ec1</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I&amp;#39;m not sure I understand your point. It is no problem to use a mix of new nrfx drivers and legacy drivers. The configuration is only overwritten if you have the configuration for that specific legacy driver in your sdk_config.h file. If you only have nrfx driver configs, this will be used. If you have SAADC legacy driver configs and NRFX SPIM driver configs&amp;nbsp;in sdk_config.h, only SAADC NRFX driver config will be overwritten by apply_old_config.h. It is not possible to use a mix of legacy SAADC driver functions&amp;nbsp;&lt;strong&gt;and&amp;nbsp;&lt;/strong&gt;NRFX_SAADC driver function calls as this will cause driver issues.&lt;/p&gt;
&lt;p&gt;The thing I could agree on is that it should be clearified that the legacy configs need to be &lt;strong&gt;removed&lt;/strong&gt; (not just set to 0) from sdk_config.h when switching to NRFX drivers. This could also have been resolved in apply_old_config.h by only overwriting the settings if the legacy drivers was enabled:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#if defined(SAADC_ENABLED) &amp;amp;&amp;amp; (SAADC_ENABLED == 1)

#undef NRFX_SAADC_ENABLED
#define NRFX_SAADC_ENABLED SAADC_ENABLED&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Module dependencies</title><link>https://devzone.nordicsemi.com/thread/134198?ContentTypeID=1</link><pubDate>Thu, 31 May 2018 13:14:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95aac653-7fe8-4b4d-8ffa-0fc31980a003</guid><dc:creator>jev</dc:creator><description>&lt;p&gt;That assumption is just bad practice IMHO. This way, we cannot use a mixed style drivers thus new drivers will either be written based on soon-to-be-deprecated API&amp;#39;s or we&amp;#39;ll have to rewrite existing drivers now too.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Module dependencies</title><link>https://devzone.nordicsemi.com/thread/133809?ContentTypeID=1</link><pubDate>Tue, 29 May 2018 12:23:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd7e04d9-edb8-454d-ad67-65d22354c74a</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have forwarded your request on more documentation of SDK module dependencies to our SDK team.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure I understand what you mean is the issue with the SAADC_ENABLED/NRFX_SAADC_ENABLED configs. The legacy layer was provided as a simple way to migrate projects to the new SDK/nrfx driver library without having to update the whole API. If you enable the legacy driver in the sdk_config.h file (SAADC_ENABLED), it is assumed that this will be used. Since this is just a legacy layer running on top of the NRFX_SAADC driver, the apply_old_config.h file makes sure the NRFX driver is enabled, as this is required for the legacy layer to work. If you want to use the new NRFX drivers, you should remove the legacy configs from the sdk_config.h file. If you switch to using the new drivers instead of the legacy layer, you should not face debugging issues due to function renaming using defines. We will migrate more examples to use nrfx drivers in future SDKS.&lt;/p&gt;
&lt;p&gt;Not all examples requre all sdk_config parameters, and not every config is included in the sdk_config.h files. In the examples, only the modules that is used should be enabled. The sdk_config.h file found in config directory contains most config parameters. You should feel free to use this for your project and redefine your configs using app_config.h file.&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><item><title>RE: Module dependencies</title><link>https://devzone.nordicsemi.com/thread/133648?ContentTypeID=1</link><pubDate>Mon, 28 May 2018 12:22:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8eef7c5b-828e-4d54-9553-eeea32af8616</guid><dc:creator>jev</dc:creator><description>&lt;p&gt;Guys... can you please fix the&amp;nbsp;legacy support you tried to use in sdk_config.h? I was bitten once more with this...&lt;/p&gt;
&lt;p&gt;Example: in the sdk_config.h you provide in the template project, you have defines for both, SAADC_ENABLED and NRFX_SAADC_ENABLED. This suggests as per comments in sdk_config.h that the latter actually enables the renames nrfx_ prefixed driver. It doesn&amp;#39;t since the setting is silently overwritten in apply_old_config.h:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#if defined(SAADC_ENABLED)

#undef NRFX_SAADC_ENABLED
#define NRFX_SAADC_ENABLED  SAADC_ENABLED&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This is not just true for SAADC, but others as well.&lt;/p&gt;
&lt;p&gt;Also, it would make things a lot clearer if you did not include modified sdk_config.h files in the example projects. You provide a mechanism to&amp;nbsp;#include &amp;quot;app_config.h&amp;quot;. Why not use it? It makes things perfectly clear: &amp;quot;for this example, we modified this, this and this&amp;quot;.&lt;/p&gt;
&lt;p&gt;Thanks for listening again guys. I hope these comments help to make the SDK easier to understand. Keep up the good work!&lt;/p&gt;
&lt;p&gt;PS: the renaming of symbols through macro&amp;#39;s kills debugability. So please please please... don&amp;#39;t! Example:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define nrf_drv_saadc_uninit            nrfx_saadc_uninit&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It looks like there is a function &amp;quot;nrf_drv_saadc_uninit&amp;quot; after this backward-compatibility definition, but in the debugger there is no way I can find a symbol named nrf_drv_saadc_uninit which makes it unnecessary hard to put a breakpoint on it for example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>