Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Osip2 on uClinux

Altera_Forum
Honored Contributor II
1,216 Views

I am experiencing a problem, trying to use Osip under uClinux/niosII 

When running the following code the whole system locks up... 

 

Is there anybody here with some Osip/Osip2 experience? 

# include <sys/time.h># include <osip2/osip.h>  

 

int main(void) 

int i; 

osip_t *osip; 

i=osip_init(&osip); 

if (i!=0) 

return -1; 

 

Might be a thread or semaphore problem, i just don&#39;t know where to start 

looking 

Any sugestions? 

 

regards 

 

Mikkel Kidmose
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
393 Views

> When running the following code the whole system locks up... 

 

I remember having the same problem -- it had something to do with tracing or 

gperf or something like that-- but it has been awhile. When you configure, try 

disabling the (initially) unnecessary features, then go from there. E.g.: 

 

--enable-static 

--disable-shared 

--disable-trace 

--disable-debug 

--disable-gperf 

 

Also, make sure your include paths are properly set so you don&#39;t build against 

the wrong headers: e.g. 

 

$ export CPPFLAGS "-I<whatever>" 

 

Regards, 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
393 Views

Thx for the help. 

 

I found the problem but not the solution yet.... 

when i make the executable the osip library isnt linked in to it statically 

so the osip_init is unknown. Tried adding -static to LDFLAGS but that does not help 

any ideas?
0 Kudos
Altera_Forum
Honored Contributor II
393 Views

> Tried adding -static to LDFLAGS but that does not help any ideas? 

 

Remove all of your osip libraries and reconfigure ... make sure you 

--disable-shared --enable-static, make/install again, then rebuild your 

application. 

 

Regards, 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
393 Views

thx Scott  

 

But the solution was even simpler i had commented out my osip2 lib in rules.mak by accident... http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/blink.gif  

 

So now my Osip2 works....  

 

And i have moved on to eXosip2 the init has the same problem... but it is beeing linked 

i am stepping thru the exosip_init() but havent found the problem yet... 

 

i configured it with: 

--host=nios2-elf 

--enable-static --disable-shared --disable-gperf --disable-libtool-lock --disable-debug --disable-josua --disable-glib --disable-glibtest --enable-pthread --enable-sysv --enable-semaphore --silent 

 

any ideas  

 

regards 

 

Mikkel
0 Kudos
Altera_Forum
Honored Contributor II
393 Views

Hi Mikkel, 

 

> had commented out my osip2 lib in rules.mak by accident... 

 

I hate it when that happens! ;-) 

 

> So now my Osip2 works.... 

 

Great! 

 

> And i have moved on to eXosip2 

 

Sorry, can&#39;t help here. I looked at eXosip2 ... but the license for that is GPL rather 

than LGPL ... and I wasn&#39;t crazy about the architecture ... so I never bothered to 

dig any deeper. 

 

Let us know how you make out. 

 

Regards, 

--Scott
0 Kudos
Reply