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

📄 integer.s43

📁 MSP430 IAR project with FreeRTOS port.
💻 S43
📖 第 1 页 / 共 2 页
字号:
//////////////////////////////////////////////////////////////////////////////
//                                                                           /
// IAR MSP430 C/C++ Compiler V3.41A/W32                22/Apr/2006  00:25:15 /
// 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\Demo\Common\Mini /
//                     mal\integer.c                                         /
//    Command line  =  C:\MSP430F169_Eval_Port\FreeRTOSv401\Demo\Common\Mini /
//                     mal\integer.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\integ /
//                     er.s43                                                /
//                                                                           /
//                                                                           /
//////////////////////////////////////////////////////////////////////////////

        NAME integer

        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 ?Mul32
        EXTERN ?DivMod32s
        EXTERN ?cstart_init_zero
        EXTERN ?longjmp_r4
        EXTERN ?longjmp_r5
        EXTERN ?setjmp_r4
        EXTERN ?setjmp_r5

        PUBWEAK ?setjmp_save_r4
        PUBWEAK ?setjmp_save_r5
        FUNCTION vCompeteingIntMathTask,0603H
        LOCFRAME CSTACK, 12, STACK
        PUBLIC vStartIntegerMathTasks
        FUNCTION vStartIntegerMathTasks,021203H
        LOCFRAME CSTACK, 14, STACK
        PUBLIC xAreIntegerMathsTaskStillRunning
        FUNCTION xAreIntegerMathsTaskStillRunning,0203H
        LOCFRAME CSTACK, 2, 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 usCriticalNesting
        EXTERN xTaskCreate
        FUNCTION xTaskCreate,0202H

// C:\MSP430F169_Eval_Port\FreeRTOSv401\Demo\Common\Minimal\integer.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  * This version of integer. c is for use on systems that have limited stack
//   35  * space and no display facilities.  The complete version can be found in
//   36  * the Demo/Common/Full directory.
//   37  *
//   38  * As with the full version, the tasks created in this file are a good test 
//   39  * of the scheduler context switch mechanism.  The processor has to access 
//   40  * 32bit variables in two or four chunks (depending on the processor).  The low 
//   41  * priority of these tasks means there is a high probability that a context 
//   42  * switch will occur mid calculation.  See flop. c documentation for 
//   43  * more information.
//   44  *
//   45  */
//   46 
//   47 /*
//   48 Changes from V1.2.1
//   49 
//   50 	+ The constants used in the calculations are larger to ensure the
//   51 	  optimiser does not truncate them to 16 bits.
//   52 
//   53 Changes from V1.2.3
//   54 
//   55 	+ uxTaskCheck is now just used as a boolean.  Instead of incrementing
//   56 	  the variable each cycle of the task, the variable is simply set to
//   57 	  true.  sAreIntegerMathsTaskStillRunning() sets it back to false and
//   58 	  expects it to have been set back to true by the time it is called
//   59 	  again.
//   60 	+ A division has been included in the calculation.
//   61 */
//   62 
//   63 #include <stdlib.h>
//   64 
//   65 /* Scheduler include files. */
//   66 #include "FreeRTOS.h"
//   67 #include "task.h"
//   68 
//   69 /* Demo program include files. */
//   70 #include "integer.h"
//   71 
//   72 /* The constants used in the calculation. */
//   73 #define intgCONST1				( ( portLONG ) 123 )
//   74 #define intgCONST2				( ( portLONG ) 234567 )
//   75 #define intgCONST3				( ( portLONG ) -3 )
//   76 #define intgCONST4				( ( portLONG ) 7 )
//   77 #define intgEXPECTED_ANSWER		( ( ( intgCONST1 + intgCONST2 ) * intgCONST3 ) / intgCONST4 )
//   78 
//   79 #define intgSTACK_SIZE			configMINIMAL_STACK_SIZE
//   80 
//   81 /* As this is the minimal version, we will only create one task. */
//   82 #define intgNUMBER_OF_TASKS		( 1 )
//   83 
//   84 /* The task function.  Repeatedly performs a 32 bit calculation, checking the
//   85 result against the expected result.  If the result is incorrect then the
//   86 context switch must have caused some corruption. */
//   87 static portTASK_FUNCTION_PROTO( vCompeteingIntMathTask, pvParameters );
//   88 
//   89 /* Variables that are set to true within the calculation task to indicate
//   90 that the task is still executing.  The check task sets the variable back to
//   91 false, flagging an error if the variable is still false the next time it
//   92 is called. */

        RSEG DATA16_Z:DATA:SORT:NOROOT(1)
        REQUIRE ?cstart_init_zero
//   93 static volatile signed portBASE_TYPE xTaskCheck[ intgNUMBER_OF_TASKS ] = { ( signed portBASE_TYPE ) pdFALSE };
xTaskCheck:
        DS8 2
//   94 
//   95 /*-----------------------------------------------------------*/
//   96 

        RSEG CODE:CODE:REORDER:NOROOT(1)
//   97 void vStartIntegerMathTasks( unsigned portBASE_TYPE uxPriority )
vStartIntegerMathTasks:
        CFI Block cfiBlock0 Using cfiCommon0
        CFI Function vStartIntegerMathTasks
//   98 {
        FUNCALL vStartIntegerMathTasks, xTaskCreate
        LOCFRAME CSTACK, 14, STACK
        PUSH.W  R10
        CFI R10 Frame(CFA, -4)
        CFI CFA SP+4
        PUSH.W  R11
        CFI R11 Frame(CFA, -6)
        CFI CFA SP+6
        MOV.W   R12, R10
//   99 portSHORT sTask;
//  100 
//  101 	for( sTask = 0; sTask < intgNUMBER_OF_TASKS; sTask++ )
        MOV.W   #0x0, R11
??vStartIntegerMathTasks_0:
        CMP.W   #0x1, R11
        JGE     ??vStartIntegerMathTasks_1
//  102 	{
//  103 		xTaskCreate( vCompeteingIntMathTask, ( const signed portCHAR * const ) "IntMath", intgSTACK_SIZE, ( void * ) &( xTaskCheck[ sTask ] ), uxPriority, ( xTaskHandle * ) NULL );
        PUSH.W  #0x0
        CFI CFA SP+8

⌨️ 快捷键说明

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