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

📄 flop.lst

📁 MSP430 IAR project with FreeRTOS port.
💻 LST
📖 第 1 页 / 共 3 页
字号:
##############################################################################
#                                                                            #
# IAR MSP430 C/C++ Compiler V3.41A/W32                 22/Apr/2006  00:25:14 #
# 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\Minim #
#                     al\flop.c                                              #
#    Command line  =  C:\MSP430F169_Eval_Port\FreeRTOSv401\Demo\Common\Minim #
#                     al\flop.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\Debu #
#                     g\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\Inclu #
#                     de\ -I C:\MSP430F169_Eval_Port\FreeRTOSv401\Source\Inc #
#                     lude\ -I C:\MSP430F169_Eval_Port\FreeRTOSv401\Demo\MSP #
#                     430_IAR\ -I C:\MSP430F169_Eval_Port\FreeRTOSv401\Sourc #
#                     e\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\flop.l #
#                     st                                                     #
#    Object file   =  C:\MSP430F169_Eval_Port\FreeRTOSv401\Debug\Obj\flop.r4 #
#                     3                                                      #
#                                                                            #
#                                                                            #
##############################################################################

C:\MSP430F169_Eval_Port\FreeRTOSv401\Demo\Common\Minimal\flop.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           * Creates eight tasks, each of which loops continuously performing an (emulated) 
     35           * floating point calculation.
     36           *
     37           * All the tasks run at the idle priority and never block or yield.  This causes 
     38           * all eight tasks to time slice with the idle task.  Running at the idle priority 
     39           * means that these tasks will get pre-empted any time another task is ready to run
     40           * or a time slice occurs.  More often than not the pre-emption will occur mid 
     41           * calculation, creating a good test of the schedulers context switch mechanism - a 
     42           * calculation producing an unexpected result could be a symptom of a corruption in 
     43           * the context of a task.
     44           */
     45          
     46          #include <stdlib.h>
     47          #include <math.h>
     48          
     49          /* Scheduler include files. */
     50          #include "FreeRTOS.h"
     51          #include "task.h"
     52          
     53          /* Demo program include files. */
     54          #include "flop.h"
     55          
     56          #define mathSTACK_SIZE		configMINIMAL_STACK_SIZE
     57          #define mathNUMBER_OF_TASKS  ( 8 )
     58          
     59          /* Four tasks, each of which performs a different floating point calculation.  
     60          Each of the four is created twice. */
     61          static portTASK_FUNCTION_PROTO( vCompetingMathTask1, pvParameters );
     62          static portTASK_FUNCTION_PROTO( vCompetingMathTask2, pvParameters );
     63          static portTASK_FUNCTION_PROTO( vCompetingMathTask3, pvParameters );
     64          static portTASK_FUNCTION_PROTO( vCompetingMathTask4, pvParameters );
     65          
     66          /* These variables are used to check that all the tasks are still running.  If a 
     67          task gets a calculation wrong it will
     68          stop incrementing its check variable. */

   \                                 In segment DATA16_Z, align 2, align-sorted
   \   000000                REQUIRE ?cstart_init_zero
     69          static volatile unsigned portSHORT usTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned portSHORT ) 0 };
   \                     usTaskCheck:
   \   000000                DS8 16
     70          
     71          /*-----------------------------------------------------------*/
     72          

   \                                 In segment CODE, align 2
     73          void vStartMathTasks( unsigned portBASE_TYPE uxPriority )
   \                     vStartMathTasks:
     74          {
   \   000000   0A12         PUSH.W  R10
   \   000002   0A4C         MOV.W   R12, R10
     75          	xTaskCreate( vCompetingMathTask1, ( signed portCHAR * ) "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, NULL );
   \   000004   0312         PUSH.W  #0x0
   \   000006   0A12         PUSH.W  R10
   \   000008   3012....     PUSH.W  #usTaskCheck
   \   00000C   30124000     PUSH.W  #0x40
   \   000010   3E40....     MOV.W   #`?<Constant "Math1">`, R14
   \   000014   3C40....     MOV.W   #vCompetingMathTask1, R12
   \   000018   B012....     CALL    #xTaskCreate
     76          	xTaskCreate( vCompetingMathTask2, ( signed portCHAR * ) "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, NULL );
   \   00001C   0312         PUSH.W  #0x0
   \   00001E   0A12         PUSH.W  R10
   \   000020   3012....     PUSH.W  #usTaskCheck + 2
   \   000024   30124000     PUSH.W  #0x40
   \   000028   3E40....     MOV.W   #`?<Constant "Math2">`, R14
   \   00002C   3C40....     MOV.W   #vCompetingMathTask2, R12
   \   000030   B012....     CALL    #xTaskCreate
     77          	xTaskCreate( vCompetingMathTask3, ( signed portCHAR * ) "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, NULL );
   \   000034   0312         PUSH.W  #0x0
   \   000036   0A12         PUSH.W  R10
   \   000038   3012....     PUSH.W  #usTaskCheck + 4
   \   00003C   30124000     PUSH.W  #0x40
   \   000040   3E40....     MOV.W   #`?<Constant "Math3">`, R14
   \   000044   3C40....     MOV.W   #vCompetingMathTask3, R12
   \   000048   B012....     CALL    #xTaskCreate
     78          	xTaskCreate( vCompetingMathTask4, ( signed portCHAR * ) "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, NULL );
   \   00004C   0312         PUSH.W  #0x0
   \   00004E   0A12         PUSH.W  R10
   \   000050   3012....     PUSH.W  #usTaskCheck + 6
   \   000054   30124000     PUSH.W  #0x40
   \   000058   3E40....     MOV.W   #`?<Constant "Math4">`, R14
   \   00005C   3C40....     MOV.W   #vCompetingMathTask4, R12
   \   000060   B012....     CALL    #xTaskCreate
     79          	xTaskCreate( vCompetingMathTask1, ( signed portCHAR * ) "Math5", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 4 ] ), uxPriority, NULL );
   \   000064   0312         PUSH.W  #0x0
   \   000066   0A12         PUSH.W  R10
   \   000068   3012....     PUSH.W  #usTaskCheck + 8
   \   00006C   30124000     PUSH.W  #0x40
   \   000070   3E40....     MOV.W   #`?<Constant "Math5">`, R14
   \   000074   3C40....     MOV.W   #vCompetingMathTask1, R12
   \   000078   B012....     CALL    #xTaskCreate
     80          	xTaskCreate( vCompetingMathTask2, ( signed portCHAR * ) "Math6", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 5 ] ), uxPriority, NULL );
   \   00007C   0312         PUSH.W  #0x0
   \   00007E   0A12         PUSH.W  R10
   \   000080   3012....     PUSH.W  #usTaskCheck + 10
   \   000084   30124000     PUSH.W  #0x40
   \   000088   3E40....     MOV.W   #`?<Constant "Math6">`, R14
   \   00008C   3C40....     MOV.W   #vCompetingMathTask2, R12
   \   000090   B012....     CALL    #xTaskCreate
     81          	xTaskCreate( vCompetingMathTask3, ( signed portCHAR * ) "Math7", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 6 ] ), uxPriority, NULL );
   \   000094   0312         PUSH.W  #0x0
   \   000096   0A12         PUSH.W  R10
   \   000098   3012....     PUSH.W  #usTaskCheck + 12
   \   00009C   30124000     PUSH.W  #0x40
   \   0000A0   3E40....     MOV.W   #`?<Constant "Math7">`, R14
   \   0000A4   3C40....     MOV.W   #vCompetingMathTask3, R12
   \   0000A8   B012....     CALL    #xTaskCreate
     82          	xTaskCreate( vCompetingMathTask4, ( signed portCHAR * ) "Math8", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 7 ] ), uxPriority, NULL );
   \   0000AC   0312         PUSH.W  #0x0
   \   0000AE   0A12         PUSH.W  R10
   \   0000B0   3012....     PUSH.W  #usTaskCheck + 14
   \   0000B4   30124000     PUSH.W  #0x40
   \   0000B8   3E40....     MOV.W   #`?<Constant "Math8">`, R14
   \   0000BC   3C40....     MOV.W   #vCompetingMathTask4, R12
   \   0000C0   B012....     CALL    #xTaskCreate
     83          }
   \   0000C4   31504000     ADD.W   #0x40, SP
   \   0000C8   3A41         POP.W   R10
   \   0000CA   3041         RET
     84          /*-----------------------------------------------------------*/
     85          

   \                                 In segment CODE, align 2
     86          static portTASK_FUNCTION( vCompetingMathTask1, pvParameters )
   \                     vCompetingMathTask1:
     87          {
   \   000000   0A12         PUSH.W  R10
   \   000002   0B12         PUSH.W  R11
   \   000004   0812         PUSH.W  R8
   \   000006   31801400     SUB.W   #0x14, SP
   \   00000A   0A4C         MOV.W   R12, R10
     88          volatile portDOUBLE d1, d2, d3, d4;
     89          volatile unsigned portSHORT *pusTaskCheckVariable;
     90          volatile portDOUBLE dAnswer;
     91          portSHORT sError = pdFALSE;
   \   00000C   0843         MOV.W   #0x0, R8
     92          
     93          	d1 = 123.4567;
   \   00000E   B140D5E90000 MOV.W   #0xe9d5, 0x0(SP)
   \   000014   B140F6420200 MOV.W   #0x42f6, 0x2(SP)
     94          	d2 = 2345.6789;
   \   00001A   B140DD9A0400 MOV.W   #0x9add, 0x4(SP)
   \   000020   B14012450600 MOV.W   #0x4512, 0x6(SP)
     95          	d3 = -918.222;
   \   000026   B140358E0800 MOV.W   #0x8e35, 0x8(SP)
   \   00002C   B14065C40A00 MOV.W   #0xc465, 0xa(SP)
     96          
     97          	dAnswer = ( d1 + d2 ) * d3;
                 	                          ^
Warning[Pa082]: undefined behavior: the order of volatile accesses is
          undefined in this statement
   \   000032   1E410400     MOV.W   0x4(SP), R14
   \   000036   1F410600     MOV.W   0x6(SP), R15
   \   00003A   2C41         MOV.W   0x0(SP), R12
   \   00003C   1D410200     MOV.W   0x2(SP), R13
   \   000040   B012....     CALL    #_Add32f
   \   000044   1E410800     MOV.W   0x8(SP), R14
   \   000048   1F410A00     MOV.W   0xa(SP), R15
   \   00004C   B012....     CALL    #_Mul32f
   \   000050   814C1000     MOV.W   R12, 0x10(SP)
   \   000054   814D1200     MOV.W   R13, 0x12(SP)
     98          
     99          	/* The variable this task increments to show it is still running is passed in 
    100          	as the parameter. */
    101          	pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters;
   \   000058   0B4A         MOV.W   R10, R11
    102          
    103          	/* Keep performing a calculation and checking the result against a constant. */
    104          	for(;;)
    105          	{
    106          		d1 = 123.4567;
   \                     ??vCompetingMathTask1_0:
   \   00005A   B140D5E90000 MOV.W   #0xe9d5, 0x0(SP)
   \   000060   B140F6420200 MOV.W   #0x42f6, 0x2(SP)
    107          		d2 = 2345.6789;
   \   000066   B140DD9A0400 MOV.W   #0x9add, 0x4(SP)
   \   00006C   B14012450600 MOV.W   #0x4512, 0x6(SP)
    108          		d3 = -918.222;
   \   000072   B140358E0800 MOV.W   #0x8e35, 0x8(SP)
   \   000078   B14065C40A00 MOV.W   #0xc465, 0xa(SP)
    109          
    110          		d4 = ( d1 + d2 ) * d3;
                 		                     ^
Warning[Pa082]: undefined behavior: the order of volatile accesses is
          undefined in this statement
   \   00007E   1E410400     MOV.W   0x4(SP), R14
   \   000082   1F410600     MOV.W   0x6(SP), R15
   \   000086   2C41         MOV.W   0x0(SP), R12
   \   000088   1D410200     MOV.W   0x2(SP), R13
   \   00008C   B012....     CALL    #_Add32f
   \   000090   1E410800     MOV.W   0x8(SP), R14
   \   000094   1F410A00     MOV.W   0xa(SP), R15
   \   000098   B012....     CALL    #_Mul32f
   \   00009C   814C0C00     MOV.W   R12, 0xc(SP)
   \   0000A0   814D0E00     MOV.W   R13, 0xe(SP)
    111          
    112          		#if configUSE_PREEMPTION == 0
    113          			taskYIELD();
    114          		#endif
    115          
    116          		/* If the calculation does not match the expected constant, stop the 
    117          		increment of the check variable. */
    118          		if( fabs( d4 - dAnswer ) > 0.001 )
                 		                                 ^
Warning[Pa082]: undefined behavior: the order of volatile accesses is
          undefined in this statement
   \   0000A4   1E411000     MOV.W   0x10(SP), R14
   \   0000A8   1F411200     MOV.W   0x12(SP), R15
   \   0000AC   1C410C00     MOV.W   0xc(SP), R12
   \   0000B0   1D410E00     MOV.W   0xe(SP), R13
   \   0000B4   B012....     CALL    #_Sub32f
   \   0000B8   B012....     CALL    #fabs
   \   0000BC   3E407012     MOV.W   #0x1270, R14
   \   0000C0   3F40833A     MOV.W   #0x3a83, R15
   \   0000C4   B012....     CALL    #_CmpGe32f
   \   0000C8   0C93         CMP.W   #0x0, R12
   \   0000CA   0124         JEQ     ??vCompetingMathTask1_1
    119          		{
    120          			sError = pdTRUE;
   \   0000CC   1843         MOV.W   #0x1, R8
    121          		}
    122          
    123          		if( sError == pdFALSE )
   \                     ??vCompetingMathTask1_1:
   \   0000CE   0893         CMP.W   #0x0, R8
   \   0000D0   C423         JNE     ??vCompetingMathTask1_0
    124          		{
    125          			/* If the calculation has always been correct, increment the check 
    126          			variable so we know this task is still running okay. */
    127          			( *pusTaskCheckVariable )++;
   \   0000D2   0F4B         MOV.W   R11, R15
   \   0000D4   9F530000     ADD.W   #0x1, 0(R15)
   \   0000D8   C03F         JMP     ??vCompetingMathTask1_0
    128          		}
    129          
    130          		#if configUSE_PREEMPTION == 0
    131          			taskYIELD();
    132          		#endif
    133          
    134          	}
    135          }
    136          /*-----------------------------------------------------------*/

⌨️ 快捷键说明

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