Hi all,
I am using RL-ARM with MCB1700. I hav 10 tasks running with priorities 2 to 11. I am using file system with SD Memory.
But when I run the code it is getting stuck in the forever loop of _mutex_initialize (OS_ID *mutex) function found in RTX_lib.c as shown below.
int _mutex_initialize (OS_ID *mutex) { /* Allocate and initialize a system mutex. */ if (nr_mutex >= OS_MUTEXCNT) { /* If you are here, you need to increase the number OS_MUTEXCNT. */ for (;;); } *mutex = &std_libmutex[nr_mutex++]; mutex_init (*mutex); return (1); }
It is asked to increase the number OS_MUTEXCNT. But Iam not finding where OS_MUTEXCNT is defined.
Please suggest.
Withe thanks and Regards Lingaraju
Why did you use a thread summary about your program getting stuck in a forever loop, when your real question is where OS_MUTEXCNT is defined?
As I have already discussed I have 10 tasks each with different priority.
The tasks which are using more stack are created using user stack option with seperate declared for each task.
Before I get into this I am facing problems with interrupt. What the code optimization levels do with the interrupts.
I have configured and enabled for EINT0, Timer1 and USB interrupts. For USB I am using the RTX_HID code. All other peripherals I hav initialised before I call the os_sys_init(). Whatevr the optimization level selected,The USB interrupt is not working unless I call the NVIC_enalbe_irq(USB_IRq) before I call the os_sys_init(). In this way it is working but going to hard fault with Bus fault escalation from rt_get_first function.
when optimization levels 1 or 2 is selected, The Timer1 interrupt is not working. The interrupt is coming. The control is not coming out of the IRQ handler. But with levels 0 and 3 Timer1 interrupt works properly
There is very less timr for the deadline.Please suggest.
regards Lingaraju