[SOLVED] Integration of external library (OPUS audio codec)

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] 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?

    I also attached the libopus folder structure.

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

    Best,
    Nick
    Images
    • libopus_folderstructure.PNG

      55.31 kB, 1,063×697, viewed 61 times
  • 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,
    Nino
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support contact us per e-mail.
    The following contact form can be used for this: Contact Us