<?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>Adding new libraries</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119479/adding-new-libraries</link><description>Hello, 
 
 I&amp;#39;m new to software development so apologies if this is a simple question but I can&amp;#39;t find a straightforward answer for nordic connect sdk on vs code. 
 An IC I&amp;#39;m trying to use comes with its own libraries, I have .c and .h versions of the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Mar 2025 13:56:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119479/adding-new-libraries" /><item><title>RE: Adding new libraries</title><link>https://devzone.nordicsemi.com/thread/525745?ContentTypeID=1</link><pubDate>Tue, 04 Mar 2025 13:56:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a60c7abc-6e62-4bd3-b5d8-539f105cab4b</guid><dc:creator>Rm3</dc:creator><description>&lt;p&gt;Hi, thanks for the reply, got it working now thank you!&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding new libraries</title><link>https://devzone.nordicsemi.com/thread/525744?ContentTypeID=1</link><pubDate>Tue, 04 Mar 2025 13:55:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbccf04c-e05f-4a63-9a57-bf0685324352</guid><dc:creator>Rm3</dc:creator><description>&lt;p&gt;Hi, that&amp;#39;s exactly the sort of thing I was looking for. Thank you!&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding new libraries</title><link>https://devzone.nordicsemi.com/thread/525721?ContentTypeID=1</link><pubDate>Tue, 04 Mar 2025 13:13:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa87c8df-7af2-4a42-b6a5-b7aec2c57c77</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There are multiple ways to add external files.&lt;/p&gt;
&lt;p&gt;The sample you are pointing to is if you got a precompiled library, so this is not what you are looking for&lt;br /&gt;If you want to include c and h files in your project, there are two main ways to do that:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Adding &lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-7-device-driver-model/"&gt;your own driver&lt;/a&gt;. For many use-cases this is more complex than you need. It is the &amp;quot;zephyr way&amp;quot; tho.&lt;/li&gt;
&lt;li&gt;Just adding your own files in CMakeLists.txt, as seen in our samples. For example &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/samples/cellular/lte_ble_gateway/CMakeLists.txt"&gt;here&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding new libraries</title><link>https://devzone.nordicsemi.com/thread/525591?ContentTypeID=1</link><pubDate>Mon, 03 Mar 2025 18:54:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9326b67-24fb-467e-86ac-eee8b1c7accd</guid><dc:creator>Alex-Uzinakod</dc:creator><description>&lt;p&gt;Would you mind sharing your file tree and your current CMakeLists ?&lt;br /&gt;&lt;br /&gt;Generally, you can add your files to the src folder and your new file in the CMakeLists.txt like:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class="ui-code" data-mode="c_cpp"&gt;target_sources(app PRIVATE
    src/main.c
    src/my_new_file.c
)&lt;/pre&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>