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

📄 comtest.lst

📁 本代码已经经过修改
💻 LST
📖 第 1 页 / 共 3 页
字号:
##############################################################################
#                                                                            #
# IAR ARM ANSI C/C++ Compiler V4.30A/W32 KICKSTART     14/Dec/2005  14:41:43 #
# Copyright 1999-2005 IAR Systems. All rights reserved.                      #
#                                                                            #
#    Cpu mode        =  interwork                                            #
#    Endian          =  little                                               #
#    Stack alignment =  4                                                    #
#    Source file     =  D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\Common\Minimal #
#                       \comtest.c                                           #
#    Command line    =  D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\Common\Minimal #
#                       \comtest.c -D _NDEBUG -D STR71X_IAR -lC              #
#                       D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IA #
#                       R\binary\List\ --diag_suppress pe191,pa082 -o        #
#                       D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IA #
#                       R\binary\Obj\ -s9 --no_clustering --cpu_mode thumb   #
#                       --endian little --cpu ARM7TDMI --stack_align 4       #
#                       --interwork -e --require_prototypes --fpu None       #
#                       --dlib_config "C:\Program Files\IAR                  #
#                       Systems\Embedded Workbench 4.0                       #
#                       Kickstart\arm\LIB\dl4tptinl8n.h" -I                  #
#                       D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IA #
#                       R\ -I D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR #
#                       71x_IAR\library\include\ -I                          #
#                       D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IA #
#                       R\..\common\include\ -I D:\board\FreeRTOSV3.2.3\Free #
#                       RTOS\Demo\ARM7_STR71x_IAR\..\..\source\include\ -I   #
#                       "C:\Program Files\IAR Systems\Embedded Workbench     #
#                       4.0 Kickstart\arm\INC\"                              #
#    List file       =  D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IA #
#                       R\binary\List\comtest.lst                            #
#    Object file     =  D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IA #
#                       R\binary\Obj\comtest.r79                             #
#                                                                            #
#                                                                            #
##############################################################################

D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\Common\Minimal\comtest.c
      1          /*
      2          	FreeRTOS V3.2.3 - Copyright (C) 2003-2005 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				( 'X' )
    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 DATA_Z, align 4, align-sorted
    118          static xComPortHandle xPort = NULL;
   \                     ??xPort:
   \   00000000                      DS8 4
    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 DATA_Z, align 4, align-sorted
    129          static unsigned portBASE_TYPE uxBaseLED = 0;
   \                     ??uxBaseLED:
   \   00000000                      DS8 4
    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 DATA_Z, align 4, align-sorted
    134          static volatile unsigned portBASE_TYPE uxRxLoops = comINITIAL_RX_COUNT_VALUE;
   \                     ??uxRxLoops:
   \   00000000                      DS8 4
    135          

⌨️ 快捷键说明

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