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

📄 port.lst

📁 great linker script for your uC LPC 2148 with usb support
💻 LST
📖 第 1 页 / 共 2 页
字号:
   1              		.code	16
   2              		.file	"port.c"
  10              	.Ltext0:
  11              		.align	2
  12              		.global	pxPortInitialiseStack
  13              		.code 16
  14              		.thumb_func
  16              	pxPortInitialiseStack:
  17              	.LFB2:
  18              		.file 1 "rtos/Source/portable/GCC/ARM7_LPC2000/port.c"
   1:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** /*
   2:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	FreeRTOS.org V4.1.1 - Copyright (C) 2003-2006 Richard Barry.
   3:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
   4:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	This file is part of the FreeRTOS.org distribution.
   5:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
   6:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	FreeRTOS.org is free software; you can redistribute it and/or modify
   7:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	it under the terms of the GNU General Public License as published by
   8:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	the Free Software Foundation; either version 2 of the License, or
   9:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	(at your option) any later version.
  10:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
  11:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	FreeRTOS.org is distributed in the hope that it will be useful,
  12:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	but WITHOUT ANY WARRANTY; without even the implied warranty of
  13:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	GNU General Public License for more details.
  15:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
  16:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	You should have received a copy of the GNU General Public License
  17:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	along with FreeRTOS.org; if not, write to the Free Software
  18:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  19:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
  20:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	A special exception to the GPL can be applied should you wish to distribute
  21:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	a combined work that includes FreeRTOS.org, without being obliged to provide
  22:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	the source code for any proprietary components.  See the licensing section 
  23:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	of http://www.FreeRTOS.org for full details of how and when the exception
  24:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	can be applied.
  25:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
  26:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	***************************************************************************
  27:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	See http://www.FreeRTOS.org for documentation, latest information, license 
  28:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	and contact details.  Please ensure to read the configuration and relevant 
  29:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	port sections of the online documentation.
  30:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	***************************************************************************
  31:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** */
  32:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
  33:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
  34:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** /*-----------------------------------------------------------
  35:rtos/Source/portable/GCC/ARM7_LPC2000/port.c ****  * Implementation of functions defined in portable.h for the ARM7 port.
  36:rtos/Source/portable/GCC/ARM7_LPC2000/port.c ****  *
  37:rtos/Source/portable/GCC/ARM7_LPC2000/port.c ****  * Components that can be compiled to either ARM or THUMB mode are
  38:rtos/Source/portable/GCC/ARM7_LPC2000/port.c ****  * contained in this file.  The ISR routines, which can only be compiled
  39:rtos/Source/portable/GCC/ARM7_LPC2000/port.c ****  * to ARM mode are contained in portISR.c.
  40:rtos/Source/portable/GCC/ARM7_LPC2000/port.c ****  *----------------------------------------------------------*/
  41:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
  42:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** /*
  43:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	Changes from V2.5.2
  44:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 		
  45:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	+ ulCriticalNesting is now saved as part of the task context, as is 
  46:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	  therefore added to the initial task stack during pxPortInitialiseStack.
  47:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
  48:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	Changes from V3.2.2
  49:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
  50:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	+ Bug fix - The prescale value for the timer setup is now written to T0PR 
  51:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	  instead of T0PC.  This bug would have had no effect unless a prescale 
  52:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	  value was actually used.
  53:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** */
  54:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
  55:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
  56:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** /* Standard includes. */
  57:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** #include <stdlib.h>
  58:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
  59:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** /* Scheduler includes. */
  60:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** #include "FreeRTOS.h"
  61:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** #include "task.h"
  62:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
  63:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** /* Constants required to setup the task context. */
  64:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** #define portINITIAL_SPSR				( ( portSTACK_TYPE ) 0x1f ) /* System mode, ARM mode, interrupts enable
  65:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** #define portTHUMB_MODE_BIT				( ( portSTACK_TYPE ) 0x20 )
  66:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** #define portINSTRUCTION_SIZE			( ( portSTACK_TYPE ) 4 )
  67:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** #define portNO_CRITICAL_SECTION_NESTING	( ( portSTACK_TYPE ) 0 )
  68:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
  69:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** /* Constants required to setup the tick ISR. */
  70:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** #define portENABLE_TIMER			( ( unsigned portCHAR ) 0x01 )
  71:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** #define portPRESCALE_VALUE			0x00
  72:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** #define portINTERRUPT_ON_MATCH		( ( unsigned portLONG ) 0x01 )
  73:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** #define portRESET_COUNT_ON_MATCH	( ( unsigned portLONG ) 0x02 )
  74:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
  75:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** /* Constants required to setup the VIC for the tick ISR. */
  76:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** #define portTIMER_VIC_CHANNEL		( ( unsigned portLONG ) 0x0004 )
  77:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** #define portTIMER_VIC_CHANNEL_BIT	( ( unsigned portLONG ) 0x0010 )
  78:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** #define portTIMER_VIC_ENABLE		( ( unsigned portLONG ) 0x0020 )
  79:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
  80:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** /*-----------------------------------------------------------*/
  81:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
  82:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** /* Setup the timer to generate the tick interrupts. */
  83:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** static void prvSetupTimerInterrupt( void );
  84:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
  85:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** /* 
  86:rtos/Source/portable/GCC/ARM7_LPC2000/port.c ****  * The scheduler can only be started from ARM mode, so 
  87:rtos/Source/portable/GCC/ARM7_LPC2000/port.c ****  * vPortISRStartFirstSTask() is defined in portISR.c. 
  88:rtos/Source/portable/GCC/ARM7_LPC2000/port.c ****  */
  89:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** extern void vPortISRStartFirstTask( void );
  90:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
  91:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** /*-----------------------------------------------------------*/
  92:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
  93:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** /* 
  94:rtos/Source/portable/GCC/ARM7_LPC2000/port.c ****  * Initialise the stack of a task to look exactly as if a call to 
  95:rtos/Source/portable/GCC/ARM7_LPC2000/port.c ****  * portSAVE_CONTEXT had been called.
  96:rtos/Source/portable/GCC/ARM7_LPC2000/port.c ****  *
  97:rtos/Source/portable/GCC/ARM7_LPC2000/port.c ****  * See header file for description. 
  98:rtos/Source/portable/GCC/ARM7_LPC2000/port.c ****  */
  99:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvPa
 100:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** {
  19              	0:
  20              		.loc 1 111 0
 101:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** portSTACK_TYPE *pxOriginalTOS;
 102:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
 103:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	pxOriginalTOS = pxTopOfStack;
 104:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
 105:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	/* Setup the initial stack of the task.  The stack is set exactly as 
 106:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	expected by the portRESTORE_CONTEXT() macro. */
 107:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
 108:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	/* First on the stack is the return address - which in this case is the
 109:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	start of the task.  The offset is added to make the return address appear
 110:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	as it would within an IRQ ISR. */
 111:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	*pxTopOfStack = ( portSTACK_TYPE ) pxCode + portINSTRUCTION_SIZE;		
  21              	dd	r1, r1, #4
  22 0000 0431     	.LVL1:
  23              		.loc 1 114 0
 112:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	pxTopOfStack--;
 113:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 
 114:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	*pxTopOfStack = ( portSTACK_TYPE ) 0xaaaaaaaa;	/* R14 */
  24              	r	r3, .L3
  25 0002 1B4B     		.loc 1 111 0
  26              		str	r1, [r0]
  27 0004 0160     		.loc 1 112 0
  28              		sub	r1, r0, #4
  29 0006 011F     	.LVL2:
  30              		.loc 1 114 0
  31              		str	r3, [r1]
  32 0008 0B60     		.loc 1 115 0
 115:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	pxTopOfStack--;	
  33              	r0
  34 000a 031C     	.LVL3:
  35              		sub	r3, r3, #8
  36 000c 083B     		.loc 1 116 0
 116:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	*pxTopOfStack = ( portSTACK_TYPE ) pxOriginalTOS; /* Stack used when task starts goes in R13. */
  37              		r0, [r3]
  38 000e 1860     		.loc 1 118 0
 117:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	pxTopOfStack--;
 118:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	*pxTopOfStack = ( portSTACK_TYPE ) 0x12121212;	/* R12 */
  39              	dr	r3, .L3+4
  40 0010 184B     	.LVL4:
  41              	.LVL5:
  42              		.loc 1 117 0
  43              		sub	r1, r1, #8
  44 0012 0839     		.loc 1 118 0
  45              		str	r3, [r1]
  46 0014 0B60     		.loc 1 120 0
 119:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	pxTopOfStack--;	
 120:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	*pxTopOfStack = ( portSTACK_TYPE ) 0x11111111;	/* R11 */
  47              	 .L3+8
  48 0016 184B     	.LVL6:
  49              		.loc 1 119 0
  50              		sub	r1, r1, #4
  51 0018 0439     		.loc 1 120 0
  52              		str	r3, [r1]
  53 001a 0B60     		.loc 1 122 0
 121:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	pxTopOfStack--;	
 122:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	*pxTopOfStack = ( portSTACK_TYPE ) 0x10101010;	/* R10 */
  54              	, .L3+12
  55 001c 174B     	.LVL7:
  56              		.loc 1 121 0
  57              		sub	r1, r1, #4
  58 001e 0439     		.loc 1 122 0
  59              		str	r3, [r1]
  60 0020 0B60     		.loc 1 124 0
 123:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	pxTopOfStack--;	
 124:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	*pxTopOfStack = ( portSTACK_TYPE ) 0x09090909;	/* R9 */
  61              	, .L3+16
  62 0022 174B     	.LVL8:
  63              		.loc 1 123 0
  64              		sub	r1, r1, #4
  65 0024 0439     		.loc 1 124 0
  66              		str	r3, [r1]
  67 0026 0B60     		.loc 1 126 0
 125:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	pxTopOfStack--;	
 126:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	*pxTopOfStack = ( portSTACK_TYPE ) 0x08080808;	/* R8 */
  68              	, .L3+20
  69 0028 164B     	.LVL9:
  70              		.loc 1 125 0
  71              		sub	r1, r1, #4
  72 002a 0439     		.loc 1 126 0
  73              		str	r3, [r1]
  74 002c 0B60     		.loc 1 128 0
 127:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	pxTopOfStack--;	
 128:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	*pxTopOfStack = ( portSTACK_TYPE ) 0x07070707;	/* R7 */
  75              	, .L3+24
  76 002e 164B     	.LVL10:
  77              		.loc 1 127 0
  78              		sub	r1, r1, #4
  79 0030 0439     		.loc 1 128 0
  80              		str	r3, [r1]
  81 0032 0B60     		.loc 1 130 0
 129:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	pxTopOfStack--;	
 130:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	*pxTopOfStack = ( portSTACK_TYPE ) 0x06060606;	/* R6 */
  82              	, .L3+28
  83 0034 154B     	.LVL11:
  84              		.loc 1 129 0
  85              		sub	r1, r1, #4
  86 0036 0439     		.loc 1 130 0
  87              		str	r3, [r1]
  88 0038 0B60     		.loc 1 132 0
 131:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	pxTopOfStack--;	
 132:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	*pxTopOfStack = ( portSTACK_TYPE ) 0x05050505;	/* R5 */
  89              	, .L3+32
  90 003a 154B     	.LVL12:
  91              		.loc 1 131 0
  92              		sub	r1, r1, #4
  93 003c 0439     		.loc 1 132 0
  94              		str	r3, [r1]
  95 003e 0B60     		.loc 1 134 0
 133:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	pxTopOfStack--;	
 134:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	*pxTopOfStack = ( portSTACK_TYPE ) 0x04040404;	/* R4 */
  96              	, .L3+36
  97 0040 144B     	.LVL13:
  98              		.loc 1 133 0
  99              		sub	r1, r1, #4
 100 0042 0439     		.loc 1 134 0
 101              		str	r3, [r1]
 102 0044 0B60     		.loc 1 136 0
 135:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	pxTopOfStack--;	
 136:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	*pxTopOfStack = ( portSTACK_TYPE ) 0x03030303;	/* R3 */
 103              	, .L3+40
 104 0046 144B     	.LVL14:
 105              		.loc 1 135 0
 106              		sub	r1, r1, #4
 107 0048 0439     		.loc 1 136 0
 108              		str	r3, [r1]
 109 004a 0B60     		.loc 1 138 0
 137:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	pxTopOfStack--;	
 138:rtos/Source/portable/GCC/ARM7_LPC2000/port.c **** 	*pxTopOfStack = ( portSTACK_TYPE ) 0x02020202;	/* R2 */
 110              	, .L3+44
 111 004c 134B     	.LVL15:
 112              		.loc 1 137 0
 113              		sub	r1, r1, #4
 114 004e 0439     		.loc 1 138 0
 115              		str	r3, [r1]
 116 0050 0B60     		.loc 1 140 0

⌨️ 快捷键说明

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