Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Integration of external library (OPUS audio codec)

Hi

I'm currently working with the Nordic DK 52 (SDK 14.2) and SEGGER ES (Windows 10). I want to use an external library (libopus 1.2.1) in one of the example emProjects from the SDK.
In the end I would like to be able to simply call opus functions from a library without having to worry about anything else.

How should I go about this?

1. Do I use MinGW GCC command prompt to build the opus library externally and then link it somehow to the existing emProject? (result -> I cannot find the appropriate makefile).
Are MinGW ggc and the SEGGER gcc compiler even compatible? Would this even matter if I "precompile" the library? I guess I'm just confused by different operating systems and compilers.

2. Do I create a separate project in SEGGER ES with different build configuration and build the library in SEGGER? If so how exactly can I do that? Can I then really think of this library as separated and simply save it with the other Nordic libraries?

Thank you for your inquiry.
You can use any precompiled library with ES if it is ARM gcc compatible.
MinGW is not ARM compatible.
To build your library you can either create a new solution and new library project or add a library project to your current solution.
For this go to File->New Project->Select if new or current solution->A library project-> Set project name and path-> Select your core type->next->finish

Now add all your library sources to that project and build it.
You can then add the build library either by drag and dropping it into one of the virtual folders in your nRF project or opening the project settings and set the path there:
Project-> Edit options...->Linker->Additional Input Files->Select library to add here