I have a problem with the embedded program in the NIOS II/f with µCosII system. Could you please help me ?
I have several semaphores but when I initialize more than 5 semaphores with OSemCreate(0) (whatever the semaphores are), the program crashes.
To be more precise some tasks will execute normally whereas some others will stop during execution without reason, far after the OSemCreate call.
For this Reason, I used the semaphores without initialization (directly with OSSemPost and OSSemPend and it worked
But now I want to create a queue and just adding
makes the program crash the same way
Here is the main program and don't hesitate to ask me other parts.
Thanks a lot,
/** ... **/
m_ETHRxSemaphore = OSSemCreate(0);
m_ETHTxSemaphore = OSSemCreate(0);
m_AGCSemaphore = OSSemCreate(0);
m_booting = OSSemCreate(0);
m_dhcpSemaphore = OSSemCreate(0);
m_RandomSemaphore = OSSemCreate(0);
//long_commands_event = OSQCreate(&long_commands_fifo, LONG_COMMANDS_FIFO_SIZE);
OSTaskCreateExt(TaskStart, NULL, (void*)&TaskStart_stk[START_TASK_SIZE-1], TASK_TaskStart_PRIORITY, TASK_TaskStart_PRIORITY,
(void*)&TaskStart_stk, START_TASK_SIZE, &TaskUserData[TASK_TaskStart_ID] , OS_TASK_OPT_STK_CHK | OS_TASK_OPT_STK_CLR);
For more complete information about compiler optimizations, see our Optimization Notice.