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

📄 serial.lst

📁 本代码已经经过修改
💻 LST
📖 第 1 页 / 共 3 页
字号:
##############################################################################
#                                                                            #
# IAR ARM ANSI C/C++ Compiler V4.30A/W32 KICKSTART     14/Dec/2005  14:41:48 #
# 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\ARM7_STR71x_IA #
#                       R\serial\serial.c                                    #
#    Command line    =  D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IA #
#                       R\serial\serial.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\serial.lst                             #
#    Object file     =  D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IA #
#                       R\binary\Obj\serial.r79                              #
#                                                                            #
#                                                                            #
##############################################################################

D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IAR\serial\serial.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          	BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR UART0.
     35          */
     36          
     37          /* Library includes. */
     38          #include "uart.h"

   \                                 In segment CODE, align 4, keep-with-next
   \   __??Code16?? __code __interwork __atpcs u16 UART_FlagStatus(struct <unnamed> volatile *)
   \                     UART_FlagStatus:
   \   00000000   808A               LDRH        R0,[R0, #+0x14]
   \   00000002   7047               BX          LR                 ;; return
     39          #include "gpio.h"
     40          #include "eic.h"
     41          
     42          /* Scheduler includes. */
     43          #include "FreeRTOS.h"
     44          #include "queue.h"
     45          
     46          /* Demo application includes. */
     47          #include "serial.h"
     48          
     49          #define UART0_Rx_Pin 					( 0x0001<< 8 )
     50          #define UART0_Tx_Pin 					( 0x0001<< 9 )
     51          
     52          #define serINVALID_QUEUE				( ( xQueueHandle ) 0 )
     53          #define serNO_BLOCK						( ( portTickType ) 0 )
     54          
     55          /* Macros to turn on and off the Tx empty interrupt. */
     56          #define serINTERRUPT_ON()				UART0->IER |= UART_TxHalfEmpty
     57          #define serINTERRUPT_OFF()				UART0->IER &= ~UART_TxHalfEmpty
     58          
     59          /*-----------------------------------------------------------*/
     60          
     61          /* Queues used to hold received characters, and characters waiting to be
     62          transmitted. */

   \                                 In segment DATA_Z, align 4, align-sorted
     63          static xQueueHandle xRxedChars;
   \                     ??xRxedChars:
   \   00000000                      DS8 4

   \                                 In segment DATA_Z, align 4, align-sorted
     64          static xQueueHandle xCharsForTx;
   \                     ??xCharsForTx:
   \   00000000                      DS8 4
     65          
     66          /*-----------------------------------------------------------*/
     67          
     68          /* Interrupt entry point written in the assembler file serialISR.s79. */
     69          extern void vSerialISREntry( void );
     70          
     71          /* The interrupt service routine - called from the assembly entry point. */
     72          __arm void vSerialISR( void );
     73          
     74          /*-----------------------------------------------------------*/
     75          
     76          /*
     77           * See the serial2.h header file.
     78           */

   \                                 In segment CODE, align 4, keep-with-next
     79          xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
     80          {
   \                     xSerialPortInitMinimal:
   \   00000000   F1B5               PUSH        {R0,R4-R7,LR}
   \   00000002   0E1C               MOV         R6,R1
     81          xComPortHandle xReturn;
     82          	
     83          	/* Create the queues used to hold Rx and Tx characters. */
     84          	xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
   \   00000004   ....               LDR         R7,??DataTable8    ;; ??xRxedChars
   \   00000006   0121               MOV         R1,#+0x1
   \   00000008   301C               MOV         R0,R6
   \   0000000A   ........           _BLF        xQueueCreate,xQueueCreate??rT
   \   0000000E   3860               STR         R0,[R7, #+0]
     85          	xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
   \   00000010   ....               LDR         R5,??DataTable7    ;; ??xCharsForTx
   \   00000012   0121               MOV         R1,#+0x1
   \   00000014   761C               ADD         R6,R6,#+0x1
   \   00000016   301C               MOV         R0,R6
   \   00000018   ........           _BLF        xQueueCreate,xQueueCreate??rT
   \   0000001C   2860               STR         R0,[R5, #+0]
     86          
     87          	/* If the queues were created correctly then setup the serial port
     88          	hardware. */
     89          	if( ( xRxedChars != serINVALID_QUEUE ) && ( xCharsForTx != serINVALID_QUEUE ) )
   \   0000001E   3868               LDR         R0,[R7, #+0]
   \   00000020   0028               CMP         R0,#+0
   \   00000022   4AD0               BEQ         ??xSerialPortInitMinimal_0
   \   00000024   2868               LDR         R0,[R5, #+0]
   \   00000026   0028               CMP         R0,#+0
   \   00000028   47D0               BEQ         ??xSerialPortInitMinimal_0
     90          	{
     91          		portENTER_CRITICAL();
   \   0000002A   ........           _BLF        vPortEnterCritical,vPortEnterCritical??rT
     92          		{
     93          			/* Setup the UART port pins. */
     94          			GPIO_Config( GPIO0, UART0_Tx_Pin, GPIO_AF_PP );
   \   0000002E   8025               MOV         R5,#+0x80
   \   00000030   AD00               LSL         R5,R5,#+0x2        ;; #+0x200
   \   00000032   254E               LDR         R6,??xSerialPortInitMinimal_1  ;; 0xe0003000
   \   00000034   0722               MOV         R2,#+0x7
   \   00000036   291C               MOV         R1,R5
   \   00000038   301C               MOV         R0,R6
   \   0000003A   ........           _BLF        GPIO_Config,GPIO_Config??rT
     95          			GPIO_Config( GPIO0, UART0_Rx_Pin, GPIO_IN_TRI_CMOS );
   \   0000003E   0222               MOV         R2,#+0x2
   \   00000040   D101               LSL         R1,R2,#+0x7
   \   00000042   301C               MOV         R0,R6
   \   00000044   ........           _BLF        GPIO_Config,GPIO_Config??rT
     96          
     97          			/* Configure the UART. */
     98          			UART_OnOffConfig( UART0, ENABLE );
   \   00000048   204E               LDR         R6,??xSerialPortInitMinimal_1+0x4  ;; 0xc0004000
   \   0000004A   0121               MOV         R1,#+0x1
   \   0000004C   301C               MOV         R0,R6
   \   0000004E   ........           _BLF        UART_OnOffConfig,UART_OnOffConfig??rT
     99          			UART_FifoConfig( UART0, DISABLE );
   \   00000052   0021               MOV         R1,#+0
   \   00000054   301C               MOV         R0,R6
   \   00000056   ........           _BLF        UART_FifoConfig,UART_FifoConfig??rT
    100          			UART_FifoReset( UART0, UART_RxFIFO );
   \   0000005A   0021               MOV         R1,#+0

⌨️ 快捷键说明

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