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

📄 flash.lst

📁 MSP430 IAR project with FreeRTOS port.
💻 LST
字号:
##############################################################################
#                                                                            #
# 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\flash.c                                             #
#    Command line  =  C:\MSP430F169_Eval_Port\FreeRTOSv401\Demo\Common\Minim #
#                     al\flash.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\flash. #
#                     lst                                                    #
#    Object file   =  C:\MSP430F169_Eval_Port\FreeRTOSv401\Debug\Obj\flash.r #
#                     43                                                     #
#                                                                            #
#                                                                            #
##############################################################################

C:\MSP430F169_Eval_Port\FreeRTOSv401\Demo\Common\Minimal\flash.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 flash .c is for use on systems that have limited stack space
     35           * and no display facilities.  The complete version can be found in the 
     36           * Demo/Common/Full directory.
     37           * 
     38           * Three tasks are created, each of which flash an LED at a different rate.  The first 
     39           * LED flashes every 200ms, the second every 400ms, the third every 600ms.
     40           *
     41           * The LED flash tasks provide instant visual feedback.  They show that the scheduler 
     42           * is still operational.
     43           *
     44           * The PC port uses the standard parallel port for outputs, the Flashlite 186 port 
     45           * uses IO port F and the AVR port port B.
     46           *
     47           */
     48          
     49          /*
     50          Changes from V2.0.0
     51          
     52          	+ Delay periods are now specified using variables and constants of
     53          	  portTickType rather than unsigned portLONG.
     54          
     55          Changes from V2.5.5
     56          
     57          	+ Calls to vTaskDelay() have been replaced with vTaskDelayUntil().
     58          
     59          */
     60          
     61          #include <stdlib.h>
     62          
     63          /* Scheduler include files. */
     64          #include "FreeRTOS.h"
     65          #include "task.h"
     66          
     67          /* Demo program include files. */
     68          #include "partest.h"
     69          #include "flash.h"
     70          
     71          #define ledSTACK_SIZE		configMINIMAL_STACK_SIZE
     72          #define ledNUMBER_OF_LEDS	( 4 )
     73          #define ledFLASH_RATE_BASE	( ( portTickType ) 333 )
     74          
     75          /* Variable used by the created tasks to calculate the LED number to use, and
     76          the rate at which they should flash the LED. */

   \                                 In segment DATA16_Z, align 2, align-sorted
   \   000000                REQUIRE ?cstart_init_zero
     77          static volatile unsigned portBASE_TYPE uxFlashTaskNumber = 0;
   \                     uxFlashTaskNumber:
   \   000000                DS8 2
     78          
     79          /* The task that is created three times. */
     80          static portTASK_FUNCTION_PROTO( vLEDFlashTask, pvParameters );
     81          
     82          /*-----------------------------------------------------------*/
     83          

   \                                 In segment CODE, align 2
     84          void vStartLEDFlashTasks( unsigned portBASE_TYPE uxPriority )
   \                     vStartLEDFlashTasks:
     85          {
   \   000000   0A12         PUSH.W  R10
   \   000002   0B12         PUSH.W  R11
   \   000004   0A4C         MOV.W   R12, R10
     86          signed portBASE_TYPE xLEDTask;
     87          
     88          	/* Create the three tasks. */
     89          	for( xLEDTask = 0; xLEDTask < ledNUMBER_OF_LEDS; ++xLEDTask )
   \   000006   0B43         MOV.W   #0x0, R11
   \                     ??vStartLEDFlashTasks_0:
   \   000008   2B92         CMP.W   #0x4, R11
   \   00000A   0E34         JGE     ??vStartLEDFlashTasks_1
     90          	{
     91          		/* Spawn the task. */
     92          		xTaskCreate( vLEDFlashTask, ( const signed portCHAR * const ) "LEDx", ledSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL );
                 		                              ^
Warning[Pe191]: type qualifier is meaningless on cast type
   \   00000C   0312         PUSH.W  #0x0
   \   00000E   0A12         PUSH.W  R10
   \   000010   0312         PUSH.W  #0x0
   \   000012   30124000     PUSH.W  #0x40
   \   000016   3E40....     MOV.W   #`?<Constant "LEDx">`, R14
   \   00001A   3C40....     MOV.W   #vLEDFlashTask, R12
   \   00001E   B012....     CALL    #xTaskCreate
     93          	}
   \   000022   1B53         ADD.W   #0x1, R11
   \   000024   3152         ADD.W   #0x8, SP
   \   000026   F03F         JMP     ??vStartLEDFlashTasks_0
     94          }
   \                     ??vStartLEDFlashTasks_1:
   \   000028   3B41         POP.W   R11
   \   00002A   3A41         POP.W   R10
   \   00002C   3041         RET
     95          /*-----------------------------------------------------------*/
     96          

   \                                 In segment CODE, align 2
     97          static portTASK_FUNCTION( vLEDFlashTask, pvParameters )
   \                     vLEDFlashTask:
     98          {
   \   000000   0A12         PUSH.W  R10
   \   000002   0B12         PUSH.W  R11
   \   000004   0812         PUSH.W  R8
   \   000006   2183         SUB.W   #0x2, SP
   \   000008   0A4C         MOV.W   R12, R10
     99          portTickType xFlashRate, xLastFlashTime;
    100          unsigned portBASE_TYPE uxLED;
    101          
    102          	/* The parameters are not used. */
    103          	( void ) pvParameters;
    104          
    105          	/* Calculate the LED and flash rate. */
    106          	portENTER_CRITICAL();
   \   00000A   32C2         DINT
   \   00000C   0343         NOP
   \   00000E   9253....     ADD.W   #0x1, &usCriticalNesting
    107          	{
    108          		/* See which of the eight LED's we should use. */
    109          		uxLED = uxFlashTaskNumber;
   \   000012   1842....     MOV.W   &uxFlashTaskNumber, R8
    110          
    111          		/* Update so the next task uses the next LED. */
    112          		uxFlashTaskNumber++;
   \   000016   9253....     ADD.W   #0x1, &uxFlashTaskNumber
    113          	}
    114          	portEXIT_CRITICAL();
   \   00001A   8293....     CMP.W   #0x0, &usCriticalNesting
   \   00001E   0624         JEQ     ??vLEDFlashTask_1
   \   000020   B253....     ADD.W   #0xffff, &usCriticalNesting
   \   000024   8293....     CMP.W   #0x0, &usCriticalNesting
   \   000028   0120         JNE     ??vLEDFlashTask_1
   \   00002A   32D2         EINT
    115          
    116          	xFlashRate = ledFLASH_RATE_BASE + ( ledFLASH_RATE_BASE * ( portTickType ) uxLED );
   \                     ??vLEDFlashTask_1:
   \   00002C   0C48         MOV.W   R8, R12
   \   00002E   3E404D01     MOV.W   #0x14d, R14
   \   000032   B012....     CALL    #?Mul16
   \   000036   3C504D01     ADD.W   #0x14d, R12
   \   00003A   0B4C         MOV.W   R12, R11
    117          	xFlashRate /= portTICK_RATE_MS;
   \   00003C   0C4B         MOV.W   R11, R12
   \   00003E   1E43         MOV.W   #0x1, R14
   \   000040   B012....     CALL    #?DivMod16u
   \   000044   0B4C         MOV.W   R12, R11
    118          
    119          	/* We will turn the LED on and off again in the delay period, so each
    120          	delay is only half the total period. */
    121          	xFlashRate /= ( portTickType ) 2;
   \   000046   12C3         CLRC
   \   000048   0B10         RRC.W   R11
    122          
    123          	/* We need to initialise xLastFlashTime prior to the first call to 
    124          	vTaskDelayUntil(). */
    125          	xLastFlashTime = xTaskGetTickCount();
   \   00004A   B012....     CALL    #xTaskGetTickCount
   \   00004E   814C0000     MOV.W   R12, 0x0(SP)
    126          
    127          	for(;;)
    128          	{
    129          		/* Delay for half the flash period then turn the LED on. */
    130          		vTaskDelayUntil( &xLastFlashTime, xFlashRate );
   \                     ??vLEDFlashTask_0:
   \   000052   0E4B         MOV.W   R11, R14
   \   000054   0C41         MOV.W   SP, R12
   \   000056   B012....     CALL    #vTaskDelayUntil
    131          		vParTestToggleLED( uxLED );
   \   00005A   0C48         MOV.W   R8, R12
   \   00005C   B012....     CALL    #vParTestToggleLED
    132          
    133          		/* Delay for half the flash period then turn the LED off. */
    134          		vTaskDelayUntil( &xLastFlashTime, xFlashRate );
   \   000060   0E4B         MOV.W   R11, R14
   \   000062   0C41         MOV.W   SP, R12
   \   000064   B012....     CALL    #vTaskDelayUntil
    135          		vParTestToggleLED( uxLED );
   \   000068   0C48         MOV.W   R8, R12
   \   00006A   B012....     CALL    #vParTestToggleLED
   \   00006E   F13F         JMP     ??vLEDFlashTask_0
    136          	}
    137          } /*lint !e715 !e818 !e830 Function definition must be standard for task creation. */

   \                                 In segment DATA16_C, align 1, align-sorted
   \                     `?<Constant "LEDx">`:
   \   000000   4C45447800   DC8 "LEDx"
    138          

   Maximum stack usage in bytes:

     Function               CSTACK
     --------               ------
     vLEDFlashTask             10
       -> xTaskGetTickCount    10
       -> vTaskDelayUntil      10
       -> vParTestToggleLED    10
       -> vTaskDelayUntil      10
       -> vParTestToggleLED    10
     vStartLEDFlashTasks       14
       -> xTaskCreate          14


   Segment part sizes:

     Function/Label      Bytes
     --------------      -----
     uxFlashTaskNumber      2
     vStartLEDFlashTasks   46
     vLEDFlashTask        112
     ?<Constant "LEDx">     5

 
 158 bytes in segment CODE
   5 bytes in segment DATA16_C
   2 bytes in segment DATA16_Z
 
 158 bytes of CODE  memory
   5 bytes of CONST memory
   2 bytes of DATA  memory

Errors: none
Warnings: 1

⌨️ 快捷键说明

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