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

Adding a new header file Segger Embedded Studio

I realize I am like the hundredth person to have this problem but all the solutions I have found don't seem to work.

I am trying to add a simple header file to the nordic ble_blinky example but keep getting a `No such file or directory`.

The files I am trying to add are led_service.h and button_service.h along with there respective .c files.

The Error:

The solutions I have found:

1. Adding the Project include directory: 

I can't seem to find the actual location. The Segger Embedded Studio Manual after a file search says "The absolute value of the Project Directory project property of the current proje ct. [sic] If this isn't set then the directory containing the solution file. [sic]" (p. 1016) Which to be frank doesn't make sense to me. It seems unfinished. But at any rate, I added it.

2. Watched these videos: 

     SEGGER Embedded studio – Getting started

3. Looked at the manual on how to add a new file:

    "To add a new file to a project:
     1. In the Project Explorer, right-click the project to which you wish to add a new file.
     2. Choose Add New File." (p. 66)

...My current emotion

Please help.

Thank you.

Parents Reply Children
  • No problem.

    Just remember:

    • The folders within SES Project Explorer are just for organising your project view. The files shown can be in different directories to each other and ones not matching the folder name.
    • Whenever you add a new file ensure that you specify its location in the creation dialog box.

    I tend to place my own code in a Directory called "Application_Files" within my project, although in SES project explorer they may show up as in "Application_Files\BLE_Services" or "Application_Files\Protocols". I then use an include path of "$(ProjectDir)/Application_Files" and it will pick them all up.

    The compiler uses the project description file to locate the C code, but the header files are located from your pre-processor include path names.

Related