<?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>Debugging out-of-tree device driver in NRF Connect</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93239/debugging-out-of-tree-device-driver-in-nrf-connect</link><description>We&amp;#39;re trying to develop a device driver by putting it in our application folder (under /drivers). 
 The west build system now recognises and builds it through the Kconfig and yaml files, but we can&amp;#39;t debug it. 
 We can set breakpoints in our application</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 31 Oct 2022 19:44:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93239/debugging-out-of-tree-device-driver-in-nrf-connect" /><item><title>RE: Debugging out-of-tree device driver in NRF Connect</title><link>https://devzone.nordicsemi.com/thread/393335?ContentTypeID=1</link><pubDate>Mon, 31 Oct 2022 19:44:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70030ed6-fae6-429b-8671-50122d3c9d50</guid><dc:creator>aonsquared</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;We&amp;#39;ve gotten it to work following your suggestions, however a new issue has popped up when we try to migrate the working application from NRF Connect SDK 2.0.2 to 2.1.0 or 2.1.1.&lt;/p&gt;
&lt;p&gt;We&amp;#39;ve opened it in a separate ticket here:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/93426/dts-error-when-migrating-from-ncs-2-0-2-to-ncs-2-1-0-or-2-1-1"&gt;devzone.nordicsemi.com/.../dts-error-when-migrating-from-ncs-2-0-2-to-ncs-2-1-0-or-2-1-1&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debugging out-of-tree device driver in NRF Connect</title><link>https://devzone.nordicsemi.com/thread/392599?ContentTypeID=1</link><pubDate>Wed, 26 Oct 2022 11:38:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e081b21d-f85a-4077-bca0-b54fc07e7281</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Try adding the sensor driver in a similar manner as explained here:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/91021/mcuboot-adding-custom-serial-flash-driver-as-secondary-partition/383961"&gt;RE: MCUBoot: adding custom serial flash driver as secondary partition&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the reply linked to above, the out-of-tree driver was meant to be used by MCUboot,&amp;nbsp;so the reply will apply to you if you just swap out MCUboot with your application (lvgl_test).&lt;/p&gt;
&lt;p&gt;Let me know if you have any issues with following the instructions in the link&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;Explanation:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The way the driver is added in the&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/v3.0.99-ncs1/samples/application_development/out_of_tree_driver"&gt;out_of_tree_driver example&lt;/a&gt; will only make it possible to access it directly.&lt;/p&gt;
&lt;p&gt;However, in your case you&amp;#39;re not accessing the functions in lpsddf.c directly, but instead you&amp;#39;re accessing them through the API &lt;em&gt;zephyr/drivers/sensor.h&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;For example, if you run&amp;nbsp;&lt;code&gt;sensor_sample_fetch()&lt;/code&gt;,&amp;nbsp;it will trigger the function&amp;nbsp;&lt;code&gt;lps22df_channel_get()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In order for Zephyr to see the out of tree lps22df.c and map it to the sensor.h API, you have to use the approach I linked to at the top.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debugging out-of-tree device driver in NRF Connect</title><link>https://devzone.nordicsemi.com/thread/392488?ContentTypeID=1</link><pubDate>Tue, 25 Oct 2022 22:29:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4b6f3cf-0e50-4d62-bed0-998b462569c1</guid><dc:creator>aonsquared</dc:creator><description>&lt;p&gt;Zip file attached.&lt;/p&gt;
&lt;p&gt;Are we missing a configuration option to enable debug and logging on the driver rather than the application?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/lvgl_5F00_test.zip"&gt;devzone.nordicsemi.com/.../lvgl_5F00_test.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debugging out-of-tree device driver in NRF Connect</title><link>https://devzone.nordicsemi.com/thread/392487?ContentTypeID=1</link><pubDate>Tue, 25 Oct 2022 22:22:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c256ab9-8b1f-42b7-a22c-6e121b1f88c6</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Could you upload your complete sample in zipped format, including the out-of-tree driver, so I can test it on my end and investigate this.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>