This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Adding External Libraries to NRF5840 DK using NRFConnect SDK in VSCode

Hi,

I'm trying to develop a simple application on the NRF5840 DK using the NRFConnect SDK inside VScode. 
I am struggling to see how to add external libraries to an application? Where does one place them within the project, and what does one need to add to the CMakeLists.txt so that the main.c can find the header files?

I've followed the youtube series for setting up NRFConnect and set things up correctly (I believe) - I've managed to get the blinky and button program etc working, as well as editing them.

I've also managed to make a small test library using the method laid out in the below video:

https://www.nordicsemi.com/Products/Development-tools/nRF-Connect-for-VS-Code#:~:text=The%20nRF%20Connect%20for%20VS,cross%2Dplatform%20and%20popular%20IDE.

 - which looks like the below image:

However, I cannot figure out how to add more complex libraries. I would like to use this library to connect to a notecard (https://github.com/blues/note-nrf52) which I believe also needs this library (https://github.com/blues/note-c), but when I try adding them, the compiler cannot see the #include "note.h" header file. Would I have to use a different method of including the library to the lines added to the CMakeList.txt in the image above? I'm confused because the note-c-master library isn't a simple single .c file with a corresponding .h file.

this was my attempt:

Thanks

Related