⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 os_cpu_a.lst

📁 ucosii的源代码希望能给予学习嵌入式系统的朋友一定的帮助
💻 LST
📖 第 1 页 / 共 5 页
字号:
  11               	* File : OS_CFG.H
  12               	* By   : Jean J. Labrosse
  13               	*
  14               	* Modifications by Julius Luukko 2003-07-14 (Julius.Luukko@lut.fi) for avr-gcc test program.
  15               	*
  16               	* - CPU_CLOCK_HZ must be defined here (used in os_cpu_a.asm)
  17               	* - defines a default stack size, which is used in all stack size definitions
  18               	*
  19               	* Your applications must define CPU_CLOCK_HZ!
  20               	*
  21               	***************************************************************************************************
  22               	*/
  23               	
  24               	#ifndef OS_CFG_H
  25               	#define OS_CFG_H
  26               	
  27               	#define CPU_CLOCK_HZ       8000000	//16000000
  28               	
  29               	#define OS_TASK_DEF_STK_SIZE    100    /* Default stack size                                       
  30               	
  31               	                                       /* ---------------------- MISCELLANEOUS --------------------
  32               	#define OS_ARG_CHK_EN             0    /* Enable (1) or Disable (0) argument checking              
  33               	#define OS_CPU_HOOKS_EN           1    /* uC/OS-II hooks are found in the processor port files     
  34               	
  35               	#define OS_DEBUG_EN               1    /* Enable(1) debug variables                                
  36               	
  37               	#define OS_EVENT_NAME_SIZE       32    /* Determine the size of the name of a Sem, Mutex, Mbox or Q
  38               	
  39               	#define OS_LOWEST_PRIO           12    /* Defines the lowest priority that can be assigned ...     
  40               	                                       /* ... MUST NEVER be higher than 63!                        
  41               	
  42               	#define OS_MAX_EVENTS             3    /* Max. number of event control blocks in your application  
  43               	#define OS_MAX_FLAGS              1    /* Max. number of Event Flag Groups    in your application  
  44               	#define OS_MAX_MEM_PART           1    /* Max. number of memory partitions                         
  45               	#define OS_MAX_QS                 2    /* Max. number of queue control blocks in your application  
  46               	#define OS_MAX_TASKS              5     /* Max. number of tasks in your application, MUST be >= 2  
  47               	
  48               	#define OS_SCHED_LOCK_EN          1    /*     Include code for OSSchedLock() and OSSchedUnlock()   
  49               	
  50               	#define OS_TASK_IDLE_STK_SIZE   OS_TASK_DEF_STK_SIZE
  51               	                                       /* Idle task stack size (# of OS_STK wide entries)          
  52               	
  53               	#define OS_TASK_STAT_EN           1    /* Enable (1) or Disable(0) the statistics task             
  54               	#define OS_TASK_STAT_STK_SIZE   OS_TASK_DEF_STK_SIZE
  55               	                                       /* Statistics task stack size (# of OS_STK wide entries)    
  56               	#define OS_TASK_STAT_STK_CHK_EN   1    /* Check task stacks from statistic task                    
  57               	
  58               	#define OS_TICK_STEP_EN           1    /* Enable tick stepping feature for uC/OS-View              
GAS LISTING C:\DOCUME~1\捞悼荐\LOCALS~1\Temp/cc6Laaaa.s 			page 18


  59               	#define OS_TICKS_PER_SEC         50    /* Set the number of ticks in one second                    
  60               	
  61               	
  62               	                                       /* ----------------------- EVENT FLAGS ---------------------
  63               	#define OS_FLAG_EN                0    /* Enable (1) or Disable (0) code generation for EVENT FLAGS
  64               	#define OS_FLAG_WAIT_CLR_EN       0    /* Include code for Wait on Clear EVENT FLAGS               
  65               	#define OS_FLAG_ACCEPT_EN         0    /*     Include code for OSFlagAccept()                      
  66               	#define OS_FLAG_DEL_EN            0    /*     Include code for OSFlagDel()                         
  67               	#define OS_FLAG_NAME_SIZE        32    /*     Determine the size of the name of an event flag group
  68               	#define OS_FLAG_QUERY_EN          0    /*     Include code for OSFlagQuery()                       
  69               	
  70               	
  71               	                                       /* -------------------- MESSAGE MAILBOXES ------------------
  72               	#define OS_MBOX_EN                0    /* Enable (1) or Disable (0) code generation for MAILBOXES  
  73               	#define OS_MBOX_ACCEPT_EN         0    /*     Include code for OSMboxAccept()                      
  74               	#define OS_MBOX_DEL_EN            0    /*     Include code for OSMboxDel()                         
  75               	#define OS_MBOX_POST_EN           0    /*     Include code for OSMboxPost()                        
  76               	#define OS_MBOX_POST_OPT_EN       0    /*     Include code for OSMboxPostOpt()                     
  77               	#define OS_MBOX_QUERY_EN          0    /*     Include code for OSMboxQuery()                       
  78               	
  79               	
  80               	                                       /* --------------------- MEMORY MANAGEMENT -----------------
  81               	#define OS_MEM_EN                 0    /* Enable (1) or Disable (0) code generation for MEMORY MANA
  82               	#define OS_MEM_QUERY_EN           0    /*     Include code for OSMemQuery()                        
  83               	#define OS_MEM_NAME_SIZE         32    /*     Determine the size of a memory partition name        
  84               	
  85               	
  86               	                                       /* ---------------- MUTUAL EXCLUSION SEMAPHORES ------------
  87               	#define OS_MUTEX_EN               0    /* Enable (1) or Disable (0) code generation for MUTEX      
  88               	#define OS_MUTEX_ACCEPT_EN        0    /*     Include code for OSMutexAccept()                     
  89               	#define OS_MUTEX_DEL_EN           0    /*     Include code for OSMutexDel()                        
  90               	#define OS_MUTEX_QUERY_EN         0    /*     Include code for OSMutexQuery()                      
  91               	
  92               	
  93               	                                       /* ---------------------- MESSAGE QUEUES -------------------
  94               	#define OS_Q_EN                   0    /* Enable (1) or Disable (0) code generation for QUEUES     
  95               	#define OS_Q_ACCEPT_EN            0    /*     Include code for OSQAccept()                         
  96               	#define OS_Q_DEL_EN               0    /*     Include code for OSQDel()                            
  97               	#define OS_Q_FLUSH_EN             0    /*     Include code for OSQFlush()                          
  98               	#define OS_Q_POST_EN              0    /*     Include code for OSQPost()                           
  99               	#define OS_Q_POST_FRONT_EN        0    /*     Include code for OSQPostFront()                      
 100               	#define OS_Q_POST_OPT_EN          0    /*     Include code for OSQPostOpt()                        
 101               	#define OS_Q_QUERY_EN             0    /*     Include code for OSQQuery()                          
 102               	
 103               	
 104               	                                       /* ------------------------ SEMAPHORES ---------------------
 105               	#define OS_SEM_EN                 1    /* Enable (1) or Disable (0) code generation for SEMAPHORES 
 106               	#define OS_SEM_ACCEPT_EN          1    /*    Include code for OSSemAccept()                        
 107               	#define OS_SEM_DEL_EN             0    /*    Include code for OSSemDel()                           
 108               	#define OS_SEM_QUERY_EN           0    /*    Include code for OSSemQuery()                         
 109               	
 110               	
 111               	                                       /* --------------------- TASK MANAGEMENT -------------------
 112               	#define OS_TASK_CHANGE_PRIO_EN    0    /*     Include code for OSTaskChangePrio()                  
 113               	#define OS_TASK_CREATE_EN         1    /*     Include code for OSTaskCreate()                      
 114               	#define OS_TASK_CREATE_EXT_EN     0    /*     Include code for OSTaskCreateExt()                   
 115               	#define OS_TASK_DEL_EN            1    /*     Include code for OSTaskDel()                         
GAS LISTING C:\DOCUME~1\捞悼荐\LOCALS~1\Temp/cc6Laaaa.s 			page 19


 116               	#define OS_TASK_NAME_SIZE        32    /*     Determine the size of a task name                    
 117               	#define OS_TASK_PROFILE_EN        0    /*     Include variables in OS_TCB for profiling            
 118               	#define OS_TASK_QUERY_EN          1    /*     Include code for OSTaskQuery()                       
 119               	#define OS_TASK_SUSPEND_EN        0    /*     Include code for OSTaskSuspend() and OSTaskResume()  
 120               	#define OS_TASK_SW_HOOK_EN        1    /*     Include code for OSTaskSwHook()                      
 121               	
 122               	
 123               	                                       /* --------------------- TIME MANAGEMENT -------------------
 124               	#define OS_TIME_DLY_HMSM_EN       1    /*     Include code for OSTimeDlyHMSM()                     
 125               	#define OS_TIME_DLY_RESUME_EN     0    /*     Include code for OSTimeDlyResume()                   
 126               	#define OS_TIME_GET_SET_EN        0    /*     Include code for OSTimeGet() and OSTimeSet()         
 127               	#define OS_TIME_TICK_HOOK_EN      1    /*     Include code for OSTimeTickHook()                    
 128               	
 129               	
 130               	typedef INT8U             OS_FLAGS;    /* Data type for event flag bits (8, 16 or 32 bits)         
 131               	
  70               	
  71               	#ifndef OS_TASK_SW_HOOK_EN
  72               	#define OS_TASK_SW_HOOK_EN 1
  73               	#endif
  74               		
  75               	;**************************************************************************************************
  76               	;                                          PUBLIC DECLARATIONS
  77               	;**************************************************************************************************
  78               	
  79               	                .global OSStartHighRdy
  80               	                .global OSCtxSw
  81               	                .global OSIntCtxSw
  82               	                .global	OSTickISR
  83               	
  84               	;**************************************************************************************************
  85               	;                                         EXTERNAL DECLARATIONS
  86               	;**************************************************************************************************
  87               	
  88               	                .extern	OSIntExit
  89               	                .extern	OSIntNesting
  90               	                .extern	OSPrioCur
  91               	                .extern	OSPrioHighRdy
  92               	                .extern	OSRunning
  93               	#if OS_TASK_SW_HOOK_EN > 0
  94               	                .extern	OSTaskSwHook
  95               	#endif
  96               	                .extern	OSTCBCur
  97               	                .extern	OSTCBHighRdy
  98               	                .extern	OSTimeTick
  99               	
 100               	;**************************************************************************************************
 101               	;                                         MACROS
 102               	;**************************************************************************************************
 103               	
 104               	; Push all registers and the status register	
 105               	.macro	PUSHRS
 106               	
 107               	                push	r0
 108               	                push	r1
 109               	                push	r2
 110               	                push	r3
GAS LISTING C:\DOCUME~1\捞悼荐\LOCALS~1\Temp/cc6Laaaa.s 			page 20


 111               	                push	r4
 112               	                push	r5
 113               	                push	r6
 114               	                push	r7
 115               	                push	r8
 116               	                push	r9
 117               	                push	r10
 118               	                push	r11
 119               	                push	r12
 120               	                push	r13
 121               	                push	r14
 122               	                push	r15
 123               	                push	r16
 124               	                push	r17
 125               	                push	r18
 126               	                push	r19
 127               	                push	r20
 128               	                push	r21
 129               	                push	r22
 130               	                push	r23
 131               	                push	r24
 132               	                push	r25
 133               	                push	r26
 134               	                push	r27
 135               	                push	r28
 136               	                push	r29
 137               	                push	r30
 138               	                push	r31
 139               	#ifdef RAMPZ
 140               	                in      r16,_SFR_IO_ADDR(RAMPZ)
 141               	                push	r16
 142               	#endif
 143               	.endm
 144               	
 145               	; Pop all registers and the status registers
 146               	.macro	POPRS
 147               	
 148               	#ifdef RAMPZ
 149               	                pop     r16
 150               	                out     _SFR_IO_ADDR(RAMPZ),r16
 151               	#endif
 152               	                pop     r31
 153               	                pop     r30
 154               	                pop     r29
 155               	                pop     r28
 156               	                pop     r27
 157               	                pop     r26
 158               	                pop     r25
 159               	                pop     r24
 160               	                pop     r23
 161               	                pop     r22
 162               	                pop     r21
 163               	                pop     r20
 164               	                pop     r19
 165               	                pop     r18
 166               	                pop     r17
 167               	                pop     r16
GAS LISTING C:\DOCUME~1\捞悼荐\LOCALS~1\Temp/cc6Laaaa.s 			page 21


 168               	                pop     r15
 169               	                pop     r14
 170               	                pop     r13
 171               	                pop     r12
 172               	                pop     r11
 173               	                pop     r10
 174               	                pop     r9
 175               	       

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -