<?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 do you add a new file to Segger ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21850/how-do-you-add-a-new-file-to-segger</link><description>I am pulling my hair, literally , I just can&amp;#39;t get this company !
I am working with 4 IDE&amp;#39;s in parallel and none of them has this stupidity . 
 
 I right click-&amp;gt;add a new file-&amp;gt; C file 
 same for .h file 
 In the project main.c file I try to include</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 01 Jun 2020 14:59:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21850/how-do-you-add-a-new-file-to-segger" /><item><title>RE: How do you add a new file to Segger ?</title><link>https://devzone.nordicsemi.com/thread/252584?ContentTypeID=1</link><pubDate>Mon, 01 Jun 2020 14:59:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4251c33a-b924-4ced-b385-a3ba50def1a3</guid><dc:creator>jjifa</dc:creator><description>&lt;p&gt;me too.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You&amp;#39;re not the only one who&amp;#39;s having a hard time.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;I&amp;#39;m also wasting a lot of time on these settings. So I understand how you feel.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do you add a new file to Segger ?</title><link>https://devzone.nordicsemi.com/thread/141795?ContentTypeID=1</link><pubDate>Sun, 29 Jul 2018 23:05:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:832e8219-1edd-4aa4-9400-b75bd06a7f7d</guid><dc:creator>Cray</dc:creator><description>&lt;p&gt;I understand your frustration here. Daniel&amp;#39;s solution worked but Segger certainly wasn&amp;#39;t thinking ease of use when adding files. Sort of a basic function for an IDE and to make it so obscure is bad. Showing the file in the project explorer including the full path being discoverable yet not finding it when compiling is a UI sin.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do you add a new file to Segger ?</title><link>https://devzone.nordicsemi.com/thread/85805?ContentTypeID=1</link><pubDate>Sat, 06 May 2017 08:35:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb4d18b9-e429-49ed-9b64-d6104a8335c2</guid><dc:creator>Bndit</dc:creator><description>&lt;p&gt;@Daniel Wang Thanks, your logic is not so fair, first because I said on the question that I did try to add it to the project path, and the full path did NOT work. Second, and &lt;em&gt;most&lt;/em&gt; important, I think it has to do with understanding humans, when you understand them, you find it hard to understand why some companies makes things really un-logic. If you make a software, and a user adds a file, you KNOW he wants to use it, and if you know it, you automatically add it for him, this is how it works in EVERY IDE out there. EVERY . So when you understand UI, UX, you can&amp;#39;t even believe you have to add files yourself, you think you did something wrong. And if a company like Segger who has probably millions of dollars can&amp;#39;t actually understand such basic things, so that makes them old, stupid, and unrelevant for the future. The fact that people accept this just makes them strange, not me.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do you add a new file to Segger ?</title><link>https://devzone.nordicsemi.com/thread/85804?ContentTypeID=1</link><pubDate>Fri, 05 May 2017 21:46:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09823972-70de-4be4-bc73-77622a74420b</guid><dc:creator>Daniel Wang</dc:creator><description>&lt;p&gt;Sometimes you cannot find the answer to your exact problem on the internet. So you have to find the solution yourself using logic and resonating, and you get better at that with more experience. If you still can&amp;#39;t find the solution, you ask on Devzone :). Here is the logic I used to find the answer:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I tested what you did with creating the files with the project inspector, and I see that the files that are created is located in the project folder itself. When I get the error &amp;quot;No such file or directory&amp;quot;&amp;quot;, I know that the compiler does not know the location of the files.&lt;/li&gt;
&lt;li&gt;Where does the Segger compiler look for the file location ? =&amp;gt; in the &amp;quot;User Include Directories&amp;quot;. That means that the project folder itself is not located in the &amp;quot;User Include Directories&amp;quot;. In the &amp;quot;User Include Directories&amp;quot; there is a option to &amp;quot;Show Macros&amp;quot;. I found the $(ProjectDir) there. :)&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do you add a new file to Segger ?</title><link>https://devzone.nordicsemi.com/thread/85803?ContentTypeID=1</link><pubDate>Fri, 05 May 2017 21:19:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9affc2fb-65b4-43af-8c2a-ca96bbe75949</guid><dc:creator>Bndit</dc:creator><description>&lt;p&gt;That worked. I wonder where you learn all these things, there is NOWHERE on the internet information about it, specifically this line you just show me here. I can&amp;#39;t understand why I am the only one who struggles with this thing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do you add a new file to Segger ?</title><link>https://devzone.nordicsemi.com/thread/85802?ContentTypeID=1</link><pubDate>Fri, 05 May 2017 20:57:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20e61f57-05c9-4d05-b913-165284bc5497</guid><dc:creator>Daniel Wang</dc:creator><description>&lt;p&gt;So when you just add files in the project inspector, the file will be located in the project folder itself(where the project .emProject file is located). So add &lt;code&gt;$(ProjectDir)&lt;/code&gt; to the User Include Directories&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do you add a new file to Segger ?</title><link>https://devzone.nordicsemi.com/thread/85801?ContentTypeID=1</link><pubDate>Fri, 05 May 2017 20:47:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b06c7378-d1b3-4713-89e4-7fcd2a89c8b4</guid><dc:creator>Bndit</dc:creator><description>&lt;p&gt;Well I know that but I don&amp;#39;t understand what is going on . I created a folder inside the project inspector and added source files in it. How do you add the path to this folder ? this folder is not exist in your computer its just in the project inspector . How you add that folder to your preprocessor? it has no path! If I made a folder inside the project called &amp;quot;bla&amp;quot; what is the path of it ? if you check your project folder in the mac you will not find &amp;quot;bla&amp;quot; anywhere, only the source files.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do you add a new file to Segger ?</title><link>https://devzone.nordicsemi.com/thread/85800?ContentTypeID=1</link><pubDate>Fri, 05 May 2017 20:29:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75ed7598-0eb1-48d2-8413-75ace0047483</guid><dc:creator>Daniel Wang</dc:creator><description>&lt;p&gt;Sounds like the path where your source.h is located is not in the &amp;quot;User Include Directories&amp;quot;.&lt;/p&gt;
&lt;p&gt;Make sure that you have selected the project in the file explorer on the left.(click it once). Then click on the &amp;quot;Project&amp;quot; on the tab on the top, and click on &amp;quot;Edit Options&amp;quot;. Under C/C++ click on &amp;quot;Preprocessor&amp;quot;, and add the path to the &amp;quot;User Include Directories&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>