- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
how to initiaze the task stack when creating a task
need help hope anybody could relay thanksLink Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I think you could use the example "Hello uCoSii"...- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi soin :
I have read the function OSTaskStkInit in os_cpu_c.c, but i can't unstand some code 1: stk = frame_pointer - 13; 2: stk[12] = (INT32U)task; /* task address (ra) */ 3: stk[11] = (INT32U) pdata; /* first register argument (r4) */ 4:#if OS_THREAD_SAFE_NEWLIB stk[10] = (INT32U) local_impure_ptr; /* value of _impure_ptr for this thread */# endif /* OS_THREAD_SAFE_NEWLIB */ 5: stk[0] = ((INT32U)&OSStartTsk) + 4;/* exception return address (ea) */ i undstand these codes simulate the complier's action. in line 1: why 13 , only initialize 4 of 13 at most, stk[9]...stk[1] is for what ? in line 5:why need initialize ea
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page