Hi,
I would like to take some files and use them as a lib in my project.
Is it possible? Can I create a library and include it to my project?
Thanks!
Hi,
I would like to take some files and use them as a lib in my project.
Is it possible? Can I create a library and include it to my project?
Thanks!
Hi,
I'm using SDK17.2, I think it's nRF5 SDK.
Thanks!
Yep, that would be the nRF5 SDK. In that case:
Which IDE are you using for development? Segger Embedded Studio, Keil uVision or something else?
Regards,
Sigurd Hellesvik
I'm using Segger Embedded Studio
In that case, there are four steps you could follow for adding your own .h and .c files:
1. Create a folder in the nRF5 SDK with your custom files:
2. In the file menu in the left of Segger Embedded Studio, you see already uploaded files.
Right click the project, and add a folder for your library, and add your .h and .c files by using the "add existing files" option on the folder.
Should look like this:

3. Right click your project and select "Options. Select "Preprocessor". Then likely you want to select the "Common" Configuration from the dropdown in the top left.
Should look like this:
Double click "User Include Directories", and set the path to the folder where your .h file can be found. The path is starting in your project directory. Click OK.
4. Add needed configurations for your files to sdk_config.h manually:
Is this explanation what you were looking for?
Regards,
Sigurd Hellesvik
Hi,
Thanks!
Is this different then adding regular files to the project?