📄 os_cpu_c.lis
字号:
.module os_cpu_c.c
.area text(rom, con, rel)
0000 .dbfile D:\MICRIUM\ICC\os_cpu_c.c
0000 .dbfunc e OSInitHookBegin _OSInitHookBegin fV
.even
0000 _OSInitHookBegin::
0000 .dbline -1
0000 .dbline 31
0000 ; /*
0000 ; *********************************************************************************************************
0000 ; * uC/OS-II
0000 ; * The Real-Time Kernel
0000 ; *
0000 ; * ATmega128 Specific code
0000 ; *
0000 ; * File : OS_CPU_C.C
0000 ; * By : Ole Saether
0000 ; * Jean J. Labrosse
0000 ; *********************************************************************************************************
0000 ; */
0000 ;
0000 ; #define OS_CPU_GLOBALS
0000 ; #include <includes.h>
0000 ;
0000 ; /*
0000 ; *********************************************************************************************************
0000 ; * OS INITIALIZATION HOOK
0000 ; * (BEGINNING)
0000 ; *
0000 ; * Description: This function is called by OSInit() at the beginning of OSInit().
0000 ; *
0000 ; * Arguments : none
0000 ; *
0000 ; * Note(s) : 1) Interrupts should be disabled during this call.
0000 ; *********************************************************************************************************
0000 ; */
0000 ; #if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
0000 ; void OSInitHookBegin (void)
0000 ; {
0000 .dbline -2
0000 L1:
0000 .dbline 0 ; func end
0000 0895 ret
0002 .dbend
0002 .dbfunc e OSInitHookEnd _OSInitHookEnd fV
.even
0002 _OSInitHookEnd::
0002 .dbline -1
0002 .dbline 49
0002 ; }
0002 ; #endif
0002 ;
0002 ; /*
0002 ; *********************************************************************************************************
0002 ; * OS INITIALIZATION HOOK
0002 ; * (END)
0002 ; *
0002 ; * Description: This function is called by OSInit() at the end of OSInit().
0002 ; *
0002 ; * Arguments : none
0002 ; *
0002 ; * Note(s) : 1) Interrupts should be disabled during this call.
0002 ; *********************************************************************************************************
0002 ; */
0002 ; #if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
0002 ; void OSInitHookEnd (void)
0002 ; {
0002 .dbline -2
0002 L2:
0002 .dbline 0 ; func end
0002 0895 ret
0004 .dbend
0004 .dbfunc e OSTaskCreateHook _OSTaskCreateHook fV
0004 .dbstruct 0 14 os_event
0004 .dbfield 0 OSEventType c
0004 .dbfield 1 OSEventGrp c
0004 .dbfield 2 OSEventCnt i
0004 .dbfield 4 OSEventPtr pV
0004 .dbfield 6 OSEventTbl A[8:8]c
0004 .dbend
0004 .dbstruct 0 34 os_tcb
0004 .dbfield 0 OSTCBStkPtr pc
0004 .dbfield 2 OSTCBNext pS[os_tcb]
0004 .dbfield 4 OSTCBPrev pS[os_tcb]
0004 .dbfield 6 OSTCBEventPtr pS[os_event]
0004 .dbfield 8 OSTCBDly i
0004 .dbfield 10 OSTCBStat c
0004 .dbfield 11 OSTCBPrio c
0004 .dbfield 12 OSTCBX c
0004 .dbfield 13 OSTCBY c
0004 .dbfield 14 OSTCBBitX c
0004 .dbfield 15 OSTCBBitY c
0004 .dbfield 16 OSTCBCtxSwCtr l
0004 .dbfield 20 OSTCBCyclesTot l
0004 .dbfield 24 OSTCBCyclesStart l
0004 .dbfield 28 OSTCBStkBase pc
0004 .dbfield 30 OSTCBStkUsed l
0004 .dbend
0004 ; ptcb -> R0,R1
.even
0004 _OSTaskCreateHook::
0004 .dbline -1
0004 .dbline 67
0004 ; }
0004 ; #endif
0004 ;
0004 ; /*$PAGE*/
0004 ; /*
0004 ; *********************************************************************************************************
0004 ; * TASK CREATION HOOK
0004 ; *
0004 ; * Description: This function is called when a task is created.
0004 ; *
0004 ; * Arguments : ptcb is a pointer to the task control block of the task being created.
0004 ; *
0004 ; * Note(s) : 1) Interrupts are disabled during this call.
0004 ; *********************************************************************************************************
0004 ; */
0004 ; #if OS_CPU_HOOKS_EN > 0
0004 ; void OSTaskCreateHook (OS_TCB *ptcb)
0004 ; {
0004 .dbline 71
0004 ; #ifdef OS_VIEW_MODULE
0004 ; OSView_TaskCreateHook(ptcb);
0004 ; #else
0004 ; ptcb = ptcb; /* Prevent compiler warning */
0004 .dbline -2
0004 L3:
0004 .dbline 0 ; func end
0004 0895 ret
0006 .dbsym l ptcb 0 pS[os_tcb]
0006 .dbend
0006 .dbfunc e OSTaskDelHook _OSTaskDelHook fV
0006 ; ptcb -> R0,R1
.even
0006 _OSTaskDelHook::
0006 .dbline -1
0006 .dbline 90
0006 ; #endif
0006 ; }
0006 ; #endif
0006 ;
0006 ;
0006 ; /*
0006 ; *********************************************************************************************************
0006 ; * TASK DELETION HOOK
0006 ; *
0006 ; * Description: This function is called when a task is deleted.
0006 ; *
0006 ; * Arguments : ptcb is a pointer to the task control block of the task being deleted.
0006 ; *
0006 ; * Note(s) : 1) Interrupts are disabled during this call.
0006 ; *********************************************************************************************************
0006 ; */
0006 ; #if OS_CPU_HOOKS_EN > 0
0006 ; void OSTaskDelHook (OS_TCB *ptcb)
0006 ; {
0006 .dbline 91
0006 ; ptcb = ptcb; /* Prevent compiler warning */
0006 .dbline -2
0006 L4:
0006 .dbline 0 ; func end
0006 0895 ret
0008 .dbsym l ptcb 0 pS[os_tcb]
0008 .dbend
0008 .dbfunc e OSTaskIdleHook _OSTaskIdleHook fV
.even
0008 _OSTaskIdleHook::
0008 .dbline -1
0008 .dbline 109
0008 ; }
0008 ; #endif
0008 ;
0008 ; /*
0008 ; *********************************************************************************************************
0008 ; * IDLE TASK HOOK
0008 ; *
0008 ; * Description: This function is called by the idle task. This hook has been added to allow you to do
0008 ; * such things as STOP the CPU to conserve power.
0008 ; *
0008 ; * Arguments : none
0008 ; *
0008 ; * Note(s) : 1) Interrupts are enabled during this call.
0008 ; *********************************************************************************************************
0008 ; */
0008 ; #if OS_CPU_HOOKS_EN > 0 && OS_VERSION >= 251
0008 ; void OSTaskIdleHook (void)
0008 ; {
0008 .dbline -2
0008 L5:
0008 .dbline 0 ; func end
0008 0895 ret
000A .dbend
000A .dbfunc e OSTaskStatHook _OSTaskStatHook fV
.even
000A _OSTaskStatHook::
000A .dbline -1
000A .dbline 126
000A ; }
000A ; #endif
000A ;
000A ; /*
000A ; *********************************************************************************************************
000A ; * STATISTIC TASK HOOK
000A ; *
000A ; * Description: This function is called every second by uC/OS-II's statistics task. This allows your
000A ; * application to add functionality to the statistics task.
000A ; *
000A ; * Arguments : none
000A ; *********************************************************************************************************
000A ; */
000A ;
000A ; #if OS_CPU_HOOKS_EN > 0
000A ; void OSTaskStatHook (void)
000A ; {
000A .dbline -2
000A L6:
000A .dbline 0 ; func end
000A 0895 ret
000C .dbend
000C .dbfunc e OSTaskStkInit _OSTaskStkInit fpc
000C ; phard_stk -> R22,R23
000C ; tmp -> R10,R11
000C ; psoft_stk -> R20,R21
000C ; opt -> <dead>
000C ; ptos -> R10,R11
000C ; p_arg -> R18,R19
000C ; task -> R16,R17
.even
000C _OSTaskStkInit::
000C 0E940000 xcall push_xgsetF03C
0010 A884 ldd R10,y+8
0012 B984 ldd R11,y+9
0014 .dbline -1
0014 .dbline 167
0014 ; }
0014 ; #endif
0014 ;
0014 ; /*$PAGE*/
0014 ; /*
0014 ; **********************************************************************************************************
0014 ; * INITIALIZE A TASK'S STACK
0014 ; *
0014 ; * Description: This function is called by either OSTaskCreate() or OSTaskCreateExt() to initialize the
0014 ; * stack frame of the task being created. This function is highly processor specific.
0014 ; *
0014 ; * Arguments : task is a pointer to the task code
0014 ; *
0014 ; * p_arg is a pointer to a user supplied data area that will be passed to the task
0014 ; * when the task first executes.
0014 ; *
0014 ; * ptos is a pointer to the top of stack. It is assumed that 'ptos' points to the
0014 ; * highest valid address on the stack.
0014 ; *
0014 ; * opt specifies options that can be used to alter the behavior of OSTaskStkInit().
0014 ; * (see uCOS_II.H for OS_TASK_OPT_???).
0014 ; *
0014 ; * Returns : Always returns the location of the new top-of-stack' once the processor registers have
0014 ; * been placed on the stack in the proper order.
0014 ; *
0014 ; * Note(s) : Interrupts are enabled when your task starts executing. You can change this by setting the
0014 ; * SREG to 0x00 instead. In this case, interrupts would be disabled upon task startup. The
0014 ; * application code would be responsible for enabling interrupts at the beginning of the task
0014 ; * code. You will need to modify OSTaskIdle() and OSTaskStat() so that they enable interrupts.
0014 ; * Failure to do this will make your system crash!
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -