Hi everyone.
I've been trying to use eclipse for debugging purposes since with no luck.
I followed the instruction on the wiki and can successfully build and debug a basic print to console "hello world".
The issues begin when i compile any of the example projects. when i execute the binary I keep getting "kernel panic"
Message from syslogd@bela at Dec 20 13:24:14 ...
kernel:[ 3402.703043] Internal error: Oops: 17 [#1] PREEMPT ARM
Message from syslogd@bela at Dec 20 13:24:14 ...
kernel:[ 3402.830176] Process Bela (pid: 661, stack limit = 0xda97e218)
...
....
......
I traced the code and found out the the kernel crushes when in an inline function called:
"inline int create_and_start_thread " located in "xenomai_wraps.h"
The exact line when the panic messages appear are on line 149 when calling "__wrap_pthread_create" .
This is the copied code from the file:
inline int create_and_start_thread(pthread_t* task, const char* taskName, int priority, int stackSize, pthread_callback_t* callback, void* arg)
{
pthread_attr_t attr;
if(__wrap_pthread_attr_init(&attr))
{
fprintf(stderr, "Error: unable to init thread attributes\n");
return -1;
}
if(int ret = set_thread_stack_and_priority(&attr, stackSize, priority))
{
return ret;
}
if(int ret = __wrap_pthread_create(task, &attr, callback, arg))
{
return ret;
}
#if XENOMAI_MAJOR == 2
// note the different spelling. Worst thing is that
// pthread_setname_np would still compile and run (because it is a POSIX
// extension provided by Linux), but would not have the desired effect.
pthread_set_name_np(*task, taskName);
#endif
#if XENOMAI_MAJOR == 3
__wrap_pthread_setname_np(*task, taskName);
#endif
// check that effective parameters match the ones we requested
//pthread_attr_t actualAttr;
//pthread_getattr_np(*task, &actualAttr);
//size_t stk;
//pthread_attr_getstacksize(&actualAttr, &stk);
//printf("measured stack: %d, requested stack: %d\n", stk, stackSize);
pthread_attr_destroy(&attr);
return 0;
}
Would really appreciate you help with this matter...