This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How do you add a new file to Segger ?

I am pulling my hair, literally , I just can't get this company ! I am working with 4 IDE's in parallel and none of them has this stupidity .

  1. I right click->add a new file-> C file
  2. same for .h file
  3. In the project main.c file I try to include them : #include "source.h"

"No such file or directory" // he can't find the files that I see right in front of my face

So you have to add them to preprocessor some how right ? So I have a custom folder in my project with my files, how I force Segger to see the whole folder so I can keep adding source files and he can see them?

What are the exact steps to be able to add files to the project ? 4 hours of searching , this is insane.

WHY THEY DID THIS SO HARD ????????????????

Parents
  • Sounds like the path where your source.h is located is not in the "User Include Directories".

    Make sure that you have selected the project in the file explorer on the left.(click it once). Then click on the "Project" on the tab on the top, and click on "Edit Options". Under C/C++ click on "Preprocessor", and add the path to the "User Include Directories".

  • Well I know that but I don'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 "bla" what is the path of it ? if you check your project folder in the mac you will not find "bla" anywhere, only the source files.

Reply
  • Well I know that but I don'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 "bla" what is the path of it ? if you check your project folder in the mac you will not find "bla" anywhere, only the source files.

Children
No Data
Related