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

📄 comtest.lst

📁 MSP430 IAR project with FreeRTOS port.
💻 LST
📖 第 1 页 / 共 2 页
字号:
##############################################################################
#                                                                            #
# IAR MSP430 C/C++ Compiler V3.41A/W32                 22/Apr/2006  00:25:13 #
# 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\comtest.c                                           #
#    Command line  =  C:\MSP430F169_Eval_Port\FreeRTOSv401\Demo\Common\Minim #
#                     al\comtest.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\comtes #
#                     t.lst                                                  #
#    Object file   =  C:\MSP430F169_Eval_Port\FreeRTOSv401\Debug\Obj\comtest #
#                     .r43                                                   #
#                                                                            #
#                                                                            #
##############################################################################

C:\MSP430F169_Eval_Port\FreeRTOSv401\Demo\Common\Minimal\comtest.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          /*
     35           * This version of comtest. c is for use on systems that have limited stack
     36           * space and no display facilities.  The complete version can be found in
     37           * the Demo/Common/Full directory.
     38           *
     39           * Creates two tasks that operate on an interrupt driven serial port.  A
     40           * loopback connector should be used so that everything that is transmitted is
     41           * also received.  The serial port does not use any flow control.  On a
     42           * standard 9way 'D' connector pins two and three should be connected together.
     43           *
     44           * The first task posts a sequence of characters to the Tx queue, toggling an
     45           * LED on each successful post.  At the end of the sequence it sleeps for a
     46           * pseudo-random period before resending the same sequence.
     47           *
     48           * The UART Tx end interrupt is enabled whenever data is available in the Tx
     49           * queue.  The Tx end ISR removes a single character from the Tx queue and
     50           * passes it to the UART for transmission.
     51           *
     52           * The second task blocks on the Rx queue waiting for a character to become
     53           * available.  When the UART Rx end interrupt receives a character it places
     54           * it in the Rx queue, waking the second task.  The second task checks that the
     55           * characters removed from the Rx queue form the same sequence as those posted
     56           * to the Tx queue, and toggles an LED for each correct character.
     57           *
     58           * The receiving task is spawned with a higher priority than the transmitting
     59           * task.  The receiver will therefore wake every time a character is
     60           * transmitted so neither the Tx or Rx queue should ever hold more than a few
     61           * characters.
     62           *
     63           */
     64          
     65          /*
     66          Changes from V1.2.0:
     67          
     68          	+ Reduced the maximum time between successive transmissions.  This provides
     69          	  for a more rigorous test.
     70          
     71          Changes from V2.0.0
     72          
     73          	+ Delay periods are now specified using variables and constants of
     74          	  portTickType rather than unsigned portLONG.
     75          
     76          Changes from V2.5.1
     77          
     78          	+ The constant comOFFSET_TIME added to the delay period to ensure a more
     79          	  random delay period is used.
     80          */
     81          
     82          /* Scheduler include files. */
     83          #include <stdlib.h>
     84          #include "FreeRTOS.h"
     85          #include "task.h"
     86          
     87          /* Demo program include files. */
     88          #include "serial.h"
     89          #include "comtest.h"
     90          #include "partest.h"
     91          
     92          #define comSTACK_SIZE				configMINIMAL_STACK_SIZE
     93          #define comTX_LED_OFFSET			( 0 )
     94          #define comRX_LED_OFFSET			( 1 )
     95          #define comTOTAL_PERMISSIBLE_ERRORS ( 2 )
     96          
     97          /* The Tx task will transmit the sequence of characters at a pseudo random
     98          interval.  This is the maximum and minimum block time between sends. */
     99          #define comTX_MAX_BLOCK_TIME		( ( portTickType ) 0x96 )
    100          #define comTX_MIN_BLOCK_TIME		( ( portTickType ) 0x32 )
    101          #define comOFFSET_TIME				( ( portTickType ) 3 )
    102          
    103          /* We should find that each character can be queued for Tx immediately and we
    104          don't have to block to send. */
    105          #define comNO_BLOCK					( ( portTickType ) 0 )
    106          
    107          /* The Rx task will block on the Rx queue for a long period. */
    108          #define comRX_BLOCK_TIME			( ( portTickType ) 0xffff )
    109          
    110          /* The sequence transmitted is from comFIRST_BYTE to and including comLAST_BYTE. */
    111          #define comFIRST_BYTE				( 'A' )
    112          #define comLAST_BYTE				( 'z' )
    113          
    114          #define comBUFFER_LEN				( ( unsigned portBASE_TYPE ) ( comLAST_BYTE - comFIRST_BYTE ) + ( unsigned portBASE_TYPE ) 1 )
    115          #define comINITIAL_RX_COUNT_VALUE	( 0 )
    116          
    117          /* Handle to the com port used by both tasks. */

   \                                 In segment DATA16_Z, align 2, align-sorted
   \   000000                REQUIRE ?cstart_init_zero
    118          static xComPortHandle xPort = NULL;
   \                     xPort:
   \   000000                DS8 2
    119          
    120          /* The transmit task as described at the top of the file. */
    121          static portTASK_FUNCTION_PROTO( vComTxTask, pvParameters );
    122          
    123          /* The receive task as described at the top of the file. */
    124          static portTASK_FUNCTION_PROTO( vComRxTask, pvParameters );
    125          
    126          /* The LED that should be toggled by the Rx and Tx tasks.  The Rx task will
    127          toggle LED ( uxBaseLED + comRX_LED_OFFSET).  The Tx task will toggle LED
    128          ( uxBaseLED + comTX_LED_OFFSET ). */

   \                                 In segment DATA16_Z, align 2, align-sorted
   \   000000                REQUIRE ?cstart_init_zero
    129          static unsigned portBASE_TYPE uxBaseLED = 0;
   \                     uxBaseLED:
   \   000000                DS8 2
    130          
    131          /* Check variable used to ensure no error have occurred.  The Rx task will
    132          increment this variable after every successfully received sequence.  If at any
    133          time the sequence is incorrect the the variable will stop being incremented. */

   \                                 In segment DATA16_Z, align 2, align-sorted
   \   000000                REQUIRE ?cstart_init_zero
    134          static volatile unsigned portBASE_TYPE uxRxLoops = comINITIAL_RX_COUNT_VALUE;
   \                     uxRxLoops:
   \   000000                DS8 2
    135          
    136          /*-----------------------------------------------------------*/
    137          

   \                                 In segment CODE, align 2
    138          void vAltStartComTestTasks( unsigned portBASE_TYPE uxPriority, unsigned portLONG ulBaudRate, unsigned portBASE_TYPE uxLED )
   \                     vAltStartComTestTasks:
    139          {
   \   000000   0A12         PUSH.W  R10
   \   000002   0B12         PUSH.W  R11
   \   000004   0812         PUSH.W  R8
   \   000006   0912         PUSH.W  R9
   \   000008   084C         MOV.W   R12, R8
   \   00000A   0A4E         MOV.W   R14, R10
   \   00000C   0B4F         MOV.W   R15, R11
   \   00000E   19410A00     MOV.W   0xa(SP), R9
    140          	/* Initialise the com port then spawn the Rx and Tx tasks. */
    141          	uxBaseLED = uxLED;
   \   000012   8249....     MOV.W   R9, &uxBaseLED
    142          	xSerialPortInitMinimal( ulBaudRate, comBUFFER_LEN );
   \   000016   3E403A00     MOV.W   #0x3a, R14
   \   00001A   0C4A         MOV.W   R10, R12
   \   00001C   0D4B         MOV.W   R11, R13
   \   00001E   B012....     CALL    #xSerialPortInitMinimal
    143          
    144          	/* The Tx task is spawned with a lower priority than the Rx task. */
    145          	xTaskCreate( vComTxTask, ( const signed portCHAR * const ) "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( xTaskHandle * ) NULL );
                 	                           ^
Warning[Pe191]: type qualifier is meaningless on cast type
   \   000022   0312         PUSH.W  #0x0
   \   000024   0F48         MOV.W   R8, R15
   \   000026   3F53         ADD.W   #0xffff, R15
   \   000028   0F12         PUSH.W  R15
   \   00002A   0312         PUSH.W  #0x0
   \   00002C   30124000     PUSH.W  #0x40
   \   000030   3E40....     MOV.W   #`?<Constant "COMTx">`, R14
   \   000034   3C40....     MOV.W   #vComTxTask, R12
   \   000038   B012....     CALL    #xTaskCreate
    146          	xTaskCreate( vComRxTask, ( const signed portCHAR * const ) "COMRx", comSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL );
                 	                           ^
Warning[Pe191]: type qualifier is meaningless on cast type

  static unsigned portBASE_TYPE uxBaseLED = 0;
                                ^
"C:\MSP430F169_Eval_Port\FreeRTOSv401\Demo\Common\Minimal\comtest.c",129  Warning[Pe550]: 
          variable "uxBaseLED" was set but never used
   \   00003C   0312         PUSH.W  #0x0
   \   00003E   0812         PUSH.W  R8
   \   000040   0312         PUSH.W  #0x0
   \   000042   30124000     PUSH.W  #0x40
   \   000046   3E40....     MOV.W   #`?<Constant "COMRx">`, R14
   \   00004A   3C40....     MOV.W   #vComRxTask, R12
   \   00004E   B012....     CALL    #xTaskCreate
    147          }
   \   000052   31501000     ADD.W   #0x10, SP
   \   000056   3040....     BR      #?Epilogue4
    148          /*-----------------------------------------------------------*/
    149          

   \                                 In segment CODE, align 2
    150          static portTASK_FUNCTION( vComTxTask, pvParameters )
   \                     vComTxTask:
    151          {
   \   000000   0A12         PUSH.W  R10
   \   000002   0B12         PUSH.W  R11
   \   000004   0812         PUSH.W  R8
   \   000006   0A4C         MOV.W   R12, R10
    152          signed portCHAR cByteToSend;
    153          portTickType xTimeToWait;
    154          
    155          	/* Just to stop compiler warnings. */
    156          	( void ) pvParameters;
    157          
    158          	for( ;; )
    159          	{
    160          		/* Simply transmit a sequence of characters from comFIRST_BYTE to
    161          		comLAST_BYTE. */
    162          		for( cByteToSend = comFIRST_BYTE; cByteToSend <= comLAST_BYTE; cByteToSend++ )
   \                     ??vComTxTask_1:
   \   000008   7B404100     MOV.B   #0x41, R11
   \                     ??vComTxTask_0:

⌨️ 快捷键说明

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