<?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>How to compile project with include and src folders</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/105770/how-to-compile-project-with-include-and-src-folders</link><description>Hi nRF Team, 
 We are using nRF52832 with nRF5_SDK_17.1.0_ddde560. Our project is growing bigger and we need to separate the header and source files into different folder for better management. We wanted to split .h files into include folder and .c files</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 17 Nov 2023 21:50:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/105770/how-to-compile-project-with-include-and-src-folders" /><item><title>RE: How to compile project with include and src folders</title><link>https://devzone.nordicsemi.com/thread/456255?ContentTypeID=1</link><pubDate>Fri, 17 Nov 2023 21:50:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbcb6ba7-5e65-4615-a0c2-7b82a3e729c7</guid><dc:creator>Xander To</dc:creator><description>&lt;p&gt;Hi Johnny,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for your help. It actually fixed the problem by deleting the _build folder entirely.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Xander&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to compile project with include and src folders</title><link>https://devzone.nordicsemi.com/thread/456245?ContentTypeID=1</link><pubDate>Fri, 17 Nov 2023 19:47:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8168f0d3-fbc8-4b96-bdac-2ea8f84affe3</guid><dc:creator>Johnny Nguyen</dc:creator><description>&lt;p&gt;Hi Xander,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Quick shot in the dark, can you try deleting the _build directory entirely?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;$(PROJ_DIR)/src/custom_file.c \&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;should have been all you need.&lt;/p&gt;
&lt;p&gt;Given your output log states&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;&amp;quot;&amp;#39;../../../custom_file.c&amp;#39;&amp;quot;&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;it seems like&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;$(PROJ_DIR)/custom_file.c \ &lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;is what it tried to do.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I very briefly tested the in an existing application with identical folder structure to your opening post (src/ and include/ directories added to put the files in there), and the only addition I needed was&amp;nbsp;&amp;nbsp; $(PROJ_DIR)/src/custom_file.c \ under the&amp;nbsp;SRC_FILES += \ list.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to compile project with include and src folders</title><link>https://devzone.nordicsemi.com/thread/456235?ContentTypeID=1</link><pubDate>Fri, 17 Nov 2023 18:33:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03a97c89-0a34-44a9-844d-43acb86adac7</guid><dc:creator>Xander To</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Yes I use make and arm gcc. Which build artifacts I should remove? I have deleletd all files in armgcc/_build folder but it doesn&amp;#39;t solve the issue&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Xander&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to compile project with include and src folders</title><link>https://devzone.nordicsemi.com/thread/456105?ContentTypeID=1</link><pubDate>Fri, 17 Nov 2023 10:06:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17c517e8-a0c6-4e64-b9fa-7ae73d016918</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Xander,&lt;/p&gt;
&lt;p&gt;Are you using&amp;nbsp;make and ARM gcc to build your project? If so,&amp;nbsp;you should only need to make the change you mentioned.&lt;/p&gt;
&lt;p&gt;Could you please retry after clearing all existing build artifacts?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>