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

📄 port.lst

📁 本代码已经经过修改
💻 LST
📖 第 1 页 / 共 2 页
字号:
##############################################################################
#                                                                            #
# IAR ARM ANSI C/C++ Compiler V4.30A/W32 KICKSTART     14/Dec/2005  14:41:46 #
# Copyright 1999-2005 IAR Systems. All rights reserved.                      #
#                                                                            #
#    Cpu mode        =  interwork                                            #
#    Endian          =  little                                               #
#    Stack alignment =  4                                                    #
#    Source file     =  D:\board\FreeRTOSV3.2.3\FreeRTOS\Source\portable\IAR #
#                       \STR71x\port.c                                       #
#    Command line    =  D:\board\FreeRTOSV3.2.3\FreeRTOS\Source\portable\IAR #
#                       \STR71x\port.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\port.lst                               #
#    Object file     =  D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IA #
#                       R\binary\Obj\port.r79                                #
#                                                                            #
#                                                                            #
##############################################################################

D:\board\FreeRTOSV3.2.3\FreeRTOS\Source\portable\IAR\STR71x\port.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           * Implementation of functions defined in portable.h for the ST STR71x ARM7 
     35           * port.
     36           *----------------------------------------------------------*/
     37          
     38          /* Library includes. */
     39          #include "wdg.h"
     40          #include "eic.h"
     41          
     42          /* Standard includes. */
     43          #include <stdlib.h>
     44          
     45          /* Scheduler includes. */
     46          #include "FreeRTOS.h"
     47          #include "task.h"
     48          
     49          /* Constants required to setup the initial stack. */
     50          #define portINITIAL_SPSR				( ( portSTACK_TYPE ) 0x3f ) /* System mode, THUMB mode, interrupts enabled. */
     51          #define portINSTRUCTION_SIZE			( ( portSTACK_TYPE ) 4 )
     52          
     53          /* Constants required to handle critical sections. */
     54          #define portNO_CRITICAL_NESTING 		( ( unsigned portLONG ) 0 )
     55          
     56          /*-----------------------------------------------------------*/
     57          
     58          /* Setup the watchdog to generate the tick interrupts. */
     59          static void prvSetupTimerInterrupt( void );
     60          
     61          /* ulCriticalNesting will get set to zero when the first task starts.  It
     62          cannot be initialised to 0 as this will cause interrupts to be enabled
     63          during the kernel initialisation process. */

   \                                 In segment DATA_I, align 4, align-sorted
     64          unsigned portLONG ulCriticalNesting = ( unsigned portLONG ) 9999;
   \                     ulCriticalNesting:
   \   00000000                      DS8 4
   \   00000004                      REQUIRE `?<Initializer for ulCriticalNesting>`
     65          
     66          /* Tick interrupt routines for cooperative and preemptive operation 
     67          respectively.  The preemptive version is not defined as __irq as it is called
     68          from an asm wrapper function. */
     69          __arm __irq void vPortNonPreemptiveTick( void );
     70          void vPortPreemptiveTick( void );
     71          
     72          /*-----------------------------------------------------------*/
     73          
     74          /*
     75           * Initialise the stack of a task to look exactly as if a call to
     76           * portSAVE_CONTEXT had been called.
     77           *
     78           * See header file for description.
     79           */

   \                                 In segment CODE, align 4, keep-with-next
     80          portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters )
     81          {
     82          portSTACK_TYPE *pxOriginalTOS;
     83          
     84          	pxOriginalTOS = pxTopOfStack;
   \                     pxPortInitialiseStack:
   \   00000000   031C               MOV         R3,R0
     85          
     86          	/* Setup the initial stack of the task.  The stack is set exactly as
     87          	expected by the portRESTORE_CONTEXT() macro. */
     88          
     89          	/* First on the stack is the return address - which in this case is the
     90          	start of the task.  The offset is added to make the return address appear
     91          	as it would within an IRQ ISR. */
     92          	*pxTopOfStack = ( portSTACK_TYPE ) pxCode + portINSTRUCTION_SIZE;		
   \   00000002   091D               ADD         R1,R1,#+0x4
   \   00000004   0160               STR         R1,[R0, #+0]
     93          	pxTopOfStack--;
   \   00000006   001F               SUB         R0,R0,#+0x4
     94          
     95          	*pxTopOfStack = ( portSTACK_TYPE ) 0xaaaaaaaa;	/* R14 */
   \   00000008   1849               LDR         R1,??pxPortInitialiseStack_0  ;; 0xaaaaaaaa
   \   0000000A   0160               STR         R1,[R0, #+0]
     96          	pxTopOfStack--;	
   \   0000000C   001F               SUB         R0,R0,#+0x4
     97          	*pxTopOfStack = ( portSTACK_TYPE ) pxOriginalTOS; /* Stack used when task starts goes in R13. */
   \   0000000E   0360               STR         R3,[R0, #+0]
     98          	pxTopOfStack--;
   \   00000010   001F               SUB         R0,R0,#+0x4
     99          	*pxTopOfStack = ( portSTACK_TYPE ) 0x12121212;	/* R12 */
   \   00000012   1749               LDR         R1,??pxPortInitialiseStack_0+0x4  ;; 0x12121212
   \   00000014   0160               STR         R1,[R0, #+0]
    100          	pxTopOfStack--;	
   \   00000016   001F               SUB         R0,R0,#+0x4
    101          	*pxTopOfStack = ( portSTACK_TYPE ) 0x11111111;	/* R11 */
   \   00000018   1649               LDR         R1,??pxPortInitialiseStack_0+0x8  ;; 0x11111111
   \   0000001A   0160               STR         R1,[R0, #+0]
    102          	pxTopOfStack--;	
   \   0000001C   001F               SUB         R0,R0,#+0x4
    103          	*pxTopOfStack = ( portSTACK_TYPE ) 0x10101010;	/* R10 */
   \   0000001E   1649               LDR         R1,??pxPortInitialiseStack_0+0xC  ;; 0x10101010
   \   00000020   0160               STR         R1,[R0, #+0]
    104          	pxTopOfStack--;	
   \   00000022   001F               SUB         R0,R0,#+0x4
    105          	*pxTopOfStack = ( portSTACK_TYPE ) 0x09090909;	/* R9 */
   \   00000024   1549               LDR         R1,??pxPortInitialiseStack_0+0x10  ;; 0x9090909
   \   00000026   0160               STR         R1,[R0, #+0]
    106          	pxTopOfStack--;	
   \   00000028   001F               SUB         R0,R0,#+0x4
    107          	*pxTopOfStack = ( portSTACK_TYPE ) 0x08080808;	/* R8 */
   \   0000002A   1549               LDR         R1,??pxPortInitialiseStack_0+0x14  ;; 0x8080808
   \   0000002C   0160               STR         R1,[R0, #+0]
    108          	pxTopOfStack--;	
   \   0000002E   001F               SUB         R0,R0,#+0x4
    109          	*pxTopOfStack = ( portSTACK_TYPE ) 0x07070707;	/* R7 */
   \   00000030   1449               LDR         R1,??pxPortInitialiseStack_0+0x18  ;; 0x7070707
   \   00000032   0160               STR         R1,[R0, #+0]
    110          	pxTopOfStack--;	
   \   00000034   001F               SUB         R0,R0,#+0x4
    111          	*pxTopOfStack = ( portSTACK_TYPE ) 0x06060606;	/* R6 */
   \   00000036   1449               LDR         R1,??pxPortInitialiseStack_0+0x1C  ;; 0x6060606
   \   00000038   0160               STR         R1,[R0, #+0]
    112          	pxTopOfStack--;	
   \   0000003A   001F               SUB         R0,R0,#+0x4
    113          	*pxTopOfStack = ( portSTACK_TYPE ) 0x05050505;	/* R5 */
   \   0000003C   1349               LDR         R1,??pxPortInitialiseStack_0+0x20  ;; 0x5050505
   \   0000003E   0160               STR         R1,[R0, #+0]
    114          	pxTopOfStack--;	
   \   00000040   001F               SUB         R0,R0,#+0x4
    115          	*pxTopOfStack = ( portSTACK_TYPE ) 0x04040404;	/* R4 */
   \   00000042   1349               LDR         R1,??pxPortInitialiseStack_0+0x24  ;; 0x4040404
   \   00000044   0160               STR         R1,[R0, #+0]
    116          	pxTopOfStack--;	
   \   00000046   001F               SUB         R0,R0,#+0x4
    117          	*pxTopOfStack = ( portSTACK_TYPE ) 0x03030303;	/* R3 */
   \   00000048   1249               LDR         R1,??pxPortInitialiseStack_0+0x28  ;; 0x3030303
   \   0000004A   0160               STR         R1,[R0, #+0]
    118          	pxTopOfStack--;	
   \   0000004C   001F               SUB         R0,R0,#+0x4
    119          	*pxTopOfStack = ( portSTACK_TYPE ) 0x02020202;	/* R2 */
   \   0000004E   1249               LDR         R1,??pxPortInitialiseStack_0+0x2C  ;; 0x2020202
   \   00000050   0160               STR         R1,[R0, #+0]
    120          	pxTopOfStack--;	
   \   00000052   001F               SUB         R0,R0,#+0x4
    121          	*pxTopOfStack = ( portSTACK_TYPE ) 0x01010101;	/* R1 */
   \   00000054   4908               LSR         R1,R1,#+0x1
   \   00000056   0160               STR         R1,[R0, #+0]
    122          	pxTopOfStack--;	
   \   00000058   001F               SUB         R0,R0,#+0x4
    123          
    124          	/* When the task starts is will expect to find the function parameter in
    125          	R0. */
    126          	*pxTopOfStack = ( portSTACK_TYPE ) pvParameters; /* R0 */
   \   0000005A   0260               STR         R2,[R0, #+0]
    127          	pxTopOfStack--;
   \   0000005C   001F               SUB         R0,R0,#+0x4
    128          
    129          	/* The status register is set for system mode, with interrupts enabled. */
    130          	*pxTopOfStack = ( portSTACK_TYPE ) portINITIAL_SPSR;
   \   0000005E   3F21               MOV         R1,#+0x3F
   \   00000060   0160               STR         R1,[R0, #+0]
    131          	pxTopOfStack--;
   \   00000062   001F               SUB         R0,R0,#+0x4
    132          
    133          	/* Interrupt flags cannot always be stored on the stack and will
    134          	instead be stored in a variable, which is then saved as part of the
    135          	tasks context. */
    136          	*pxTopOfStack = portNO_CRITICAL_NESTING;
   \   00000064   0021               MOV         R1,#+0
   \   00000066   0160               STR         R1,[R0, #+0]
    137          
    138          	return pxTopOfStack;	
   \   00000068   7047               BX          LR                 ;; return
   \   0000006A   C046               NOP         
   \                     ??pxPortInitialiseStack_0:
   \   0000006C   AAAAAAAA           DC32        0xaaaaaaaa
   \   00000070   12121212           DC32        0x12121212
   \   00000074   11111111           DC32        0x11111111
   \   00000078   10101010           DC32        0x10101010
   \   0000007C   09090909           DC32        0x9090909
   \   00000080   08080808           DC32        0x8080808
   \   00000084   07070707           DC32        0x7070707
   \   00000088   06060606           DC32        0x6060606
   \   0000008C   05050505           DC32        0x5050505
   \   00000090   04040404           DC32        0x4040404
   \   00000094   03030303           DC32        0x3030303
   \   00000098   02020202           DC32        0x2020202
    139          }
    140          /*-----------------------------------------------------------*/
    141          

   \                                 In segment CODE, align 4, keep-with-next
    142          portBASE_TYPE xPortStartScheduler( void )
    143          {
   \                     xPortStartScheduler:
   \   00000000   30B5               PUSH        {R4,R5,LR}
    144          extern void vPortStartFirstTask( void );
    145          
    146          	/* Start the timer that generates the tick ISR.  Interrupts are disabled
    147          	here already. */
    148          	prvSetupTimerInterrupt();
   \   00000002   164C               LDR         R4,??xPortStartScheduler_0  ;; 0xe000e014
   \   00000004   2088               LDRH        R0,[R4, #+0]
   \   00000006   1649               LDR         R1,??xPortStartScheduler_0+0x4  ;; 0xfffe
   \   00000008   0140               AND         R1,R0
   \   0000000A   2180               STRH        R1,[R4, #+0]
   \   0000000C   154D               LDR         R5,??xPortStartScheduler_0+0x8  ;; 0xe000e000
   \   0000000E   2888               LDRH        R0,[R5, #+0]
   \   00000010   1549               LDR         R1,??xPortStartScheduler_0+0xC  ;; 0xfffd

⌨️ 快捷键说明

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