Sunday, March 18th 2018, 12:56am UTC+1

You are not logged in.

  • Login
  • Register

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.



Date of registration: Mar 1st 2018

Posts: 1


Thursday, March 1st 2018, 5:12pm

Integration of external library (OPUS audio codec)


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?

I also attached the libopus folder structure.

Please tell me if I need to be more specific. Thanks!

nick7 has attached the following image:
  • libopus_folderstructure.PNG


Super Moderator

Date of registration: Jan 2nd 2017

Posts: 809


Friday, March 2nd 2018, 11:43am

Hello Nick,

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

Does this answer your questions?

Best regards,