Using C-Callable IP Libraries

Using a C-callable library is similar to using any software library. You#includeheader files for the library in appropriate source files and use thesdscc -Ioption to compile your source, for example

> sdscc –c –I –o main.o main.c

When you are using the SDSoC IDE, you add thesesdsccoptions by right-clicking on your project, selectingC/C++ Build Settings->SDSCC Compiler->Directories(orSDS++ Compiler->Directoriesfor C++ compilation).

To link the library into your application, you use the -L and -l options.
> sdscc –sds-pf zc702 ${OBJECTS} –L -l –o myApp.elf

As with the standard GNU linkers, for a library calledlibMyLib.a, you use-lMyLib.

When you are using the SDSoC IDE, you add thesesdsccoptions by right-clicking on your project, selectingC/C++ Build Settings>SDS++ Linker>Libraries.

You can find code examples that employ C-callable libraries in the SDSoC™ environment installation under thesamples/fir_lib/useandsamples/rtl_lib/arraycopy/usedirectories.