Shared Library integration

Hi, since I'm currently working on a test framework (with usage of CUnit) and have a far-goal of getting libcoap to run on RIOT it raises the question of how we deal with shared libraries (especially since we say we support Wiselib). Since I did not found any way how wiselib was introduced I use two approaches so far — both, shall we say, suboptimal in my opinion:

* since I'm testing the test framework on the native port I'm just *linking CUnit* with LFLAGS in the Makefile (meh, because of not possible on "other" boards) * my early draft of including libcoap was done by compiling as a *.a file and just include it like a normal module (meh, because requieres lib to be in RIOTPATH as a submodule and because it might be problamatic if one tries to include proprietary (*gasp*) libraries).

So I'm either looking for ideas how to optimize one of the approaches or incorperate support for shared libraries into RIOT.

Kind Regards, Martin Lenders

Hi Martin,

Martin Lenders <mlenders@inf.fu-berlin.de> writes:

since I'm currently working on a test framework (with usage of CUnit) and have a far-goal of getting libcoap to run on RIOT it raises the question of how we deal with shared libraries (especially since we say we support Wiselib). Since I did not found any way how wiselib was introduced I use two approaches so far — both, shall we say, suboptimal in my opinion:

on which branch of libcoap are you working? I am in the process of restructuring a lot of things to improve support for foreign platforms such as Contiki or LWIP. I did not have sorted out the right abstraction level for this, hence suggestions are always appreciated.

One important change (others will follow) is in the branch io-with-callbacks -- it offloads the network I/O from the library itself.

Gruesse Olaf

Hi Martin!

* my early draft of including libcoap was done by compiling as a *.a file and just include it like a normal module (meh, because requieres lib to be in RIOTPATH as a submodule and because it might be problamatic if one tries to include proprietary (*gasp*) libraries).

I think Benjamin already introduced the hook to integrate external modules in https://github.com/RIOT-OS/RIOT/pull/75/files

So I'm either looking for ideas how to optimize one of the approaches or incorperate support for shared libraries into RIOT.

Anyway, a concept for dynamic module loading would be interesting.

Cheers, Oleg