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

📄 tasks.s43

📁 MSP430 IAR project with FreeRTOS port.
💻 S43
📖 第 1 页 / 共 5 页
字号:
//////////////////////////////////////////////////////////////////////////////
//                                                                           /
// IAR MSP430 C/C++ Compiler V3.41A/W32                22/Apr/2006  00:25:18 /
// Copyright 1996-2006 IAR Systems. All rights reserved.                     /
//                                                                           /
//    __rt_version  =  2                                                     /
//    __double_size =  32                                                    /
//    __reg_r4      =  free                                                  /
//    __reg_r5      =  free                                                  /
//    __pic         =  no                                                    /
//    __core        =  64kb                                                  /
//    Source file   =  C:\MSP430F169_Eval_Port\FreeRTOSv401\Source\tasks.c   /
//    Command line  =  C:\MSP430F169_Eval_Port\FreeRTOSv401\Source\tasks.c   /
//                     -D ROWLEY_MSP430 -D IAR_MSP430 -lC                    /
//                     C:\MSP430F169_Eval_Port\FreeRTOSv401\Debug\List\ -lA  /
//                     C:\MSP430F169_Eval_Port\FreeRTOSv401\Debug\List\      /
//                     --remarks -o C:\MSP430F169_Eval_Port\FreeRTOSv401\Deb /
//                     ug\Obj\ -s2 --no_cse --no_unroll --no_inline          /
//                     --no_code_motion --no_tbaa --debug -e                 /
//                     --migration_preprocessor_extensions --double=32 -I    /
//                     C:\MSP430F169_Eval_Port\FreeRTOSv401\Demo\Common\Incl /
//                     ude\ -I C:\MSP430F169_Eval_Port\FreeRTOSv401\Source\I /
//                     nclude\ -I C:\MSP430F169_Eval_Port\FreeRTOSv401\Demo\ /
//                     MSP430_IAR\ -I C:\MSP430F169_Eval_Port\FreeRTOSv401\S /
//                     ource\portable\msp430f1611\ -I "C:\Program Files\IAR  /
//                     Systems\Embedded Workbench 4.0\430\INC\" -I           /
//                     "C:\Program Files\IAR Systems\Embedded Workbench      /
//                     4.0\430\INC\CLIB\"                                    /
//    List file     =  C:\MSP430F169_Eval_Port\FreeRTOSv401\Debug\List\tasks /
//                     .s43                                                  /
//                                                                           /
//                                                                           /
//////////////////////////////////////////////////////////////////////////////

        NAME tasks

        RTMODEL "__core", "64kb"
        RTMODEL "__double_size", "32"
        RTMODEL "__pic", "no"
        RTMODEL "__reg_r4", "free"
        RTMODEL "__reg_r5", "free"
        RTMODEL "__rt_version", "2"

        RSEG CSTACK:DATA:SORT:NOROOT(1)

        EXTERN ?Epilogue3
        EXTERN ?Epilogue4
        EXTERN ?Epilogue8
        EXTERN ?Epilogue5
        EXTERN ?cstart_init_zero
        EXTERN ?longjmp_r4
        EXTERN ?longjmp_r5
        EXTERN ?setjmp_r4
        EXTERN ?setjmp_r5

??vTaskIncrementTick_0 EQU 0
        PUBWEAK ?setjmp_save_r4
        PUBWEAK ?setjmp_save_r5
        FUNCTION prvAllocateTCBAndStack,021203H
        LOCFRAME CSTACK, 8, STACK
        FUNCTION prvCheckTasksWaitingTermination,021203H
        LOCFRAME CSTACK, 6, STACK
        FUNCTION prvDeleteTCB,021203H
        LOCFRAME CSTACK, 4, STACK
        FUNCTION prvIdleTask,021603H
        LOCFRAME CSTACK, 4, STACK
        FUNCTION prvInitialiseTCBVariables,021203H
        LOCFRAME CSTACK, 12, STACK
        FUNCTION prvInitialiseTaskLists,021203H
        LOCFRAME CSTACK, 4, STACK
        PUBLIC pxCurrentTCB
        PUBLIC uxTaskGetNumberOfTasks
        FUNCTION uxTaskGetNumberOfTasks,0203H
        LOCFRAME CSTACK, 2, STACK
        PUBLIC uxTaskPriorityGet
        FUNCTION uxTaskPriorityGet,0203H
        LOCFRAME CSTACK, 2, STACK
        PUBLIC vTaskCleanUpResources
        FUNCTION vTaskCleanUpResources,021203H
        LOCFRAME CSTACK, 6, STACK
        PUBLIC vTaskDelay
        FUNCTION vTaskDelay,021203H
        LOCFRAME CSTACK, 8, STACK
        PUBLIC vTaskDelayUntil
        FUNCTION vTaskDelayUntil,021203H
        LOCFRAME CSTACK, 12, STACK
        PUBLIC vTaskDelete
        FUNCTION vTaskDelete,021203H
        LOCFRAME CSTACK, 6, STACK
        PUBLIC vTaskEndScheduler
        FUNCTION vTaskEndScheduler,021203H
        LOCFRAME CSTACK, 2, STACK
        PUBLIC vTaskIncrementTick
        FUNCTION vTaskIncrementTick,021203H
        LOCFRAME CSTACK, 4, STACK
        PUBLIC vTaskPlaceOnEventList
        FUNCTION vTaskPlaceOnEventList,021203H
        LOCFRAME CSTACK, 8, STACK
        PUBLIC vTaskPrioritySet
        FUNCTION vTaskPrioritySet,021203H
        LOCFRAME CSTACK, 10, STACK
        PUBLIC vTaskResume
        FUNCTION vTaskResume,021203H
        LOCFRAME CSTACK, 8, STACK
        PUBLIC vTaskStartScheduler
        FUNCTION vTaskStartScheduler,021203H
        LOCFRAME CSTACK, 12, STACK
        PUBLIC vTaskSuspend
        FUNCTION vTaskSuspend,021203H
        LOCFRAME CSTACK, 6, STACK
        PUBLIC vTaskSuspendAll
        FUNCTION vTaskSuspendAll,0203H
        LOCFRAME CSTACK, 2, STACK
        PUBLIC vTaskSwitchContext
        FUNCTION vTaskSwitchContext,0203H
        LOCFRAME CSTACK, 2, STACK
        PUBLIC xTaskCreate
        FUNCTION xTaskCreate,021203H
        LOCFRAME CSTACK, 26, STACK
        PUBLIC xTaskGetTickCount
        FUNCTION xTaskGetTickCount,0203H
        LOCFRAME CSTACK, 2, STACK
        PUBLIC xTaskRemoveFromEventList
        FUNCTION xTaskRemoveFromEventList,021203H
        LOCFRAME CSTACK, 8, STACK
        PUBLIC xTaskResumeAll
        FUNCTION xTaskResumeAll,021203H
        LOCFRAME CSTACK, 8, STACK
        
        CFI Names cfiNames0
        CFI StackFrame CFA SP DATA
        CFI Resource PC:16, SP:16, SR:16, R4:16, R5:16, R6:16, R7:16, R8:16
        CFI Resource R9:16, R10:16, R11:16, R12:16, R13:16, R14:16, R15:16
        CFI EndNames cfiNames0
        
        CFI Common cfiCommon0 Using cfiNames0
        CFI CodeAlign 2
        CFI DataAlign 2
        CFI ReturnAddress PC CODE
        CFI CFA SP+2
        CFI PC Frame(CFA, -2)
        CFI SR Undefined
        CFI R4 SameValue
        CFI R5 SameValue
        CFI R6 SameValue
        CFI R7 SameValue
        CFI R8 SameValue
        CFI R9 SameValue
        CFI R10 SameValue
        CFI R11 SameValue
        CFI R12 Undefined
        CFI R13 Undefined
        CFI R14 Undefined
        CFI R15 Undefined
        CFI EndCommon cfiCommon0
        
        EXTERN vPortFree
        FUNCTION vPortFree,0202H
        EXTERN pvPortMalloc
        FUNCTION pvPortMalloc,0202H
        EXTERN memset
        FUNCTION memset,010202H
        EXTERN vListRemove
        FUNCTION vListRemove,0202H
        EXTERN vListInsertEnd
        FUNCTION vListInsertEnd,0202H
        EXTERN usCriticalNesting
        EXTERN vPortYield
        FUNCTION vPortYield,0202H
        EXTERN vListInitialise
        FUNCTION vListInitialise,0202H
        EXTERN strncpy
        FUNCTION strncpy,010202H
        EXTERN vListInitialiseItem
        FUNCTION vListInitialiseItem,0202H
        EXTERN vApplicationIdleHook
        FUNCTION vApplicationIdleHook,0202H
        EXTERN vListInsert
        FUNCTION vListInsert,0202H
        EXTERN vPortEndScheduler
        FUNCTION vPortEndScheduler,0202H
        EXTERN pxPortInitialiseStack
        FUNCTION pxPortInitialiseStack,0202H
        EXTERN xPortStartScheduler
        FUNCTION xPortStartScheduler,0202H

// C:\MSP430F169_Eval_Port\FreeRTOSv401\Source\tasks.c
//    1 /*
//    2 	FreeRTOS V4.0.1 - Copyright (C) 2003-2006 Richard Barry.
//    3 
//    4 	This file is part of the FreeRTOS distribution.
//    5 
//    6 	FreeRTOS is free software; you can redistribute it and/or modify
//    7 	it under the terms of the GNU General Public License as published by
//    8 	the Free Software Foundation; either version 2 of the License, or
//    9 	(at your option) any later version.
//   10 
//   11 	FreeRTOS is distributed in the hope that it will be useful,
//   12 	but WITHOUT ANY WARRANTY; without even the implied warranty of
//   13 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//   14 	GNU General Public License for more details.
//   15 
//   16 	You should have received a copy of the GNU General Public License
//   17 	along with FreeRTOS; if not, write to the Free Software
//   18 	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//   19 
//   20 	A special exception to the GPL can be applied should you wish to distribute
//   21 	a combined work that includes FreeRTOS, without being obliged to provide
//   22 	the source code for any proprietary components.  See the licensing section
//   23 	of http://www.FreeRTOS.org for full details of how and when the exception
//   24 	can be applied.
//   25 
//   26 	***************************************************************************
//   27 	See http://www.FreeRTOS.org for documentation, latest information, license
//   28 	and contact details.  Please ensure to read the configuration and relevant
//   29 	port sections of the online documentation.
//   30 	***************************************************************************
//   31 */
//   32 
//   33 /*
//   34 Changes from V1.00:
//   35 	
//   36 	+ Call to portRESTORE_CONTEXT has been removed.  The first context
//   37 	  switch is now performed within sPortStartScheduler().
//   38 
//   39 Changes from V1.01:
//   40 
//   41 	+ More use of 8bit data types.
//   42 	+ Function name prefixes changed where the data type returned has changed.
//   43 	+ configUSE_TRACE_FACILITY is no longer defined by default.
//   44 
//   45 Changes from V1.2.0
//   46 
//   47 	+ Introduced ucTopReadyPriority.  This tracks the highest priority ready
//   48 	  queue that contains a valid TCB and thus makes the context switch
//   49 	  slightly faster.
//   50 
//   51 	+ prvAddTaskToReadyQueue() has been made a macro.
//   52 
//   53 Changes from V1.2.6
//   54 
//   55 	+ Added conditional compilation directives.
//   56 	+ Extended API.
//   57 	+ Rearranged function order.
//   58 	+ Creating a task now causes a context switch if the task being created
//   59 	  has a higher priority than the calling task - assuming the kernel is
//   60 	  running.
//   61 	+ vTaskDelete() now only causes a context switch if the calling task is
//   62 	  the task being deleted.
//   63 
//   64 Changes from V2.0.0
//   65 
//   66 	+ Allow the type of the tick count to be 16 or 32 bits.
//   67 	+ Introduce xPendingReadyList feature to allow the time interrupts have to
//   68 	  be disabled to be minimised.
//   69 	+ Remove the #if( INCLUDE_vTaskSuspendAll ) statements.  vTaskSuspendAll()
//   70 	  is now always included as it is used by the scheduler itself.
//   71 
//   72 Changes from V2.1.0
//   73 
//   74 	+ Bug fix - pxCurrentTCB is now initialised before the call to
//   75 	  prvInitializeTaskLists().  Previously pxCurrentTCB could be accessed
//   76 	  while null.
//   77 
//   78 Changed from V2.1.1
//   79 
//   80 	+ Change to where lStackSize is declared within sTaskCreate() to prevent
//   81 	  compiler warnings with 8051 port.
//   82 
//   83 Changes from V2.2.0
//   84 
//   85 	+ Explicit use of 'signed' qualifier on portCHAR types added.
//   86 	+ Changed odd calculation of initial pxTopOfStack value when
//   87 	  portSTACK_GROWTH < 0.
//   88 	+ Removed pcVersionNumber definition.
//   89 
//   90 Changes from V2.5.3
//   91 
//   92 	+ cTaskResumeAll() modified to ensure it can be called prior to the task
//   93 	  lists being initialised.
//   94 
//   95 Changes from V2.5.5
//   96 
//   97 	+ Added API function vTaskDelayUntil().
//   98 	+ Added INCLUDE_vTaskDelay conditional compilation.
//   99 
//  100 Changes from V2.6.0
//  101 
//  102  	+ Updated the vWriteTraceToBuffer macro to always be 4 byte aligned so it
//  103 	  can be used on ARM architectures.
//  104 	+ tskMAX_TASK_NAME_LEN definition replaced with the port specific
//  105 	  configMAX_TASK_NAME_LEN definition.
//  106 	+ Removed the call to strcpy when copying across the task name into the
//  107 	  TCB.
//  108 	+ Added ucTasksDeleted variable to prevent vTaskSuspendAll() being called
//  109 	  too often in the idle task.
//  110 
//  111 Changes between V3.0.0 and V2.6.1
//  112 
//  113 	+ When resuming the scheduler a yield is performed if either a tick has
//  114 	  been missed, or a task is moved from the pending ready list into a ready
//  115 	  list.  Previously a yield was not performed on this second condition.
//  116 	+ Introduced the type portBASE_TYPE.  This necessitates several API
//  117 	  changes.
//  118 	+ Removed the sUsingPreemption variable.  The constant defined in
//  119 	  portmacro.h is now used directly.
//  120 	+ The idle task can now include an optional hook function - and no longer
//  121 	  completes its time slice if other tasks with equal priority to it are
//  122 	  ready to run.
//  123 	+ See the FreeRTOS.org documentation for more information on V2.x.x to
//  124 	  V3.x.x modifications.
//  125 
//  126 Changes from V3.1.1
//  127 
//  128 	+ Modified vTaskPrioritySet() and vTaskResume() to allow these functions to
//  129 	  be called while the scheduler is suspended.
//  130 	+ Corrected the task ordering within event lists.
//  131 
//  132 Changes from V3.2.0
//  133 
//  134 	+ Added function xTaskGetCurrentTaskHandle().
//  135 
//  136 Changes from V3.2.4
//  137 
//  138 	+ Changed the volatile declarations on some variables to reflect the 
//  139 	  changes to the list definitions.
//  140 	+ Changed the order of the TCB definition so there is commonality between
//  141 	  the task control block and a co-routine control block.
//  142 	+ Allow the scheduler to be started even if no tasks other than the idle
//  143 	  task has been created.  This allows co-routines to run even when no tasks
//  144 	  have been created.
//  145 	+ The need for a context switch is now signalled if a task woken by an 
//  146 	  event has a priority greater or equal to the currently running task.
//  147 	  Previously this was only greater than.
//  148 
//  149 Changes from V4.0.0
//  150 
//  151 	+ Added the xMissedYield handling.
//  152 */
//  153 
//  154 #include <stdio.h>
//  155 #include <stdlib.h>
//  156 #include <string.h>
//  157 
//  158 #include "FreeRTOS.h"
//  159 #include "task.h"
//  160 
//  161 /*
//  162  * Macro to define the amount of stack available to the idle task.
//  163  */
//  164 #define tskIDLE_STACK_SIZE	configMINIMAL_STACK_SIZE
//  165 

⌨️ 快捷键说明

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