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

📄 stm32f10x_startup.lst

📁 基于STM32的RTOS例程
💻 LST
📖 第 1 页 / 共 3 页
字号:



ARM Macro Assembler    Page 1 


    1 00000000         ;/****************************Copyright (c)*************
                       ********************************                        
                                    
    2 00000000         ;*                                          
    3 00000000         ;*                      杭州央海软件科技有限公司
    4 00000000         ;*
    5 00000000         ;*                        http://www.armgcc.com
    6 00000000         ;*
    7 00000000         ;*---------- File Info ---------------------------------
                       ------------------------------
    8 00000000         ;* File name:   stm32f10x_startup.s
    9 00000000         ;* Created By:   罗辉联(lhlzjut@hotmail.com)  
   10 00000000         ;* Created date:  2007.11.28
   11 00000000         ;* Descriptions:  This module performs:
   12 00000000         ;*                  - Set the initial SP
   13 00000000         ;*                  - Set the initial PC == Reset_Handle
                       r,
   14 00000000         ;*                  - Set the vector table entries with 
                       the exceptions ISR address,
   15 00000000         ;*                  - Branches to __main in the C librar
                       y (which eventually
   16 00000000         ;*                  calls main()).
   17 00000000         ;*                  After Reset the CortexM3 processor i
                       s in Thread mode,
   18 00000000         ;*                  priority is Privileged, and the Stac
                       k is set to Main.
   19 00000000         ;* Adviser:   楼东武(professor)  浙江大学信电系
   20 00000000         ;*
   21 00000000         ;*---------- History Info ------------------------------
                       -------------------------------
   22 00000000         ;* Version:   Ver1.0
   23 00000000         ;* Descriptions:  Create Initilze file
   24 00000000         ;*
   25 00000000         ;*------------------------------------------------------
                       -------------------------------
   26 00000000         ;*******************************************************
                       *******************************/
   27 00000000         
   28 00000000         
   29 00000000         ;*******************************************************
                       ********************************
   30 00000000         ; Amount of memory (in bytes) allocated for Stack and He
                       ap
   31 00000000         ; Tailor those values to your application needs         
                        
   32 00000000         ;*******************************************************
                       ********************************
   33 00000000 00000200 
                       Stack_Size
                               EQU              0x200
   34 00000000 00000200 
                       Heap_Size
                               EQU              0x200
   35 00000000         
   36 00000000         ;*******************************************************
                       ************************
   37 00000000         ; Allocate space for the Stack
   38 00000000         ;*******************************************************
                       ************************



ARM Macro Assembler    Page 2 


   39 00000000                 AREA             STACK, NOINIT, READWRITE, ALIGN
=3
   40 00000000         
   41 00000000         Stack
   42 00000000                 SPACE            Stack_Size
   43 00000200         
   44 00000200         ;*******************************************************
                       ************************
   45 00000200         ; Allocate space for the Heap
   46 00000200         ;*******************************************************
                       ************************
   47 00000200                 AREA             HEAP, NOINIT, READWRITE, ALIGN=
3
   48 00000000         
   49 00000000         Heap
   50 00000000                 SPACE            Heap_Size
   51 00000200         
   52 00000200         ;*******************************************************
                       *************************
   53 00000200         ;*  Declarations for the interrupt handlers that are use
                       d by the application.                                   
                                                         
   54 00000200         ;*******************************************************
                       *************************
   55 00000200                 IMPORT           __main
   56 00000200         
   57 00000200                 IMPORT           OSPendSV
   58 00000200                 IMPORT           SysTickHandler
   59 00000200                 IMPORT           WWDG_IRQHandler
   60 00000200                 IMPORT           PVD_IRQHandler
   61 00000200                 IMPORT           TAMPER_IRQHandler
   62 00000200                 IMPORT           RTC_IRQHandler
   63 00000200                 IMPORT           FLASH_IRQHandler
   64 00000200                 IMPORT           RCC_IRQHandler
   65 00000200                 IMPORT           EXTI0_IRQHandler
   66 00000200                 IMPORT           EXTI1_IRQHandler
   67 00000200                 IMPORT           EXTI2_IRQHandler
   68 00000200                 IMPORT           EXTI3_IRQHandler
   69 00000200                 IMPORT           EXTI4_IRQHandler
   70 00000200                 IMPORT           DMAChannel1_IRQHandler
   71 00000200                 IMPORT           DMAChannel2_IRQHandler
   72 00000200                 IMPORT           DMAChannel3_IRQHandler
   73 00000200                 IMPORT           DMAChannel4_IRQHandler
   74 00000200                 IMPORT           DMAChannel5_IRQHandler
   75 00000200                 IMPORT           DMAChannel6_IRQHandler
   76 00000200                 IMPORT           DMAChannel7_IRQHandler
   77 00000200                 IMPORT           ADC_IRQHandler
   78 00000200                 IMPORT           USB_HP_CAN_TX_IRQHandler
   79 00000200                 IMPORT           USB_LP_CAN_RX0_IRQHandler
   80 00000200                 IMPORT           CAN_RX1_IRQHandler
   81 00000200                 IMPORT           CAN_SCE_IRQHandler
   82 00000200                 IMPORT           EXTI9_5_IRQHandler
   83 00000200                 IMPORT           TIM1_BRK_IRQHandler
   84 00000200                 IMPORT           TIM1_UP_IRQHandler
   85 00000200                 IMPORT           TIM1_TRG_COM_IRQHandler
   86 00000200                 IMPORT           TIM1_CC_IRQHandler
   87 00000200                 IMPORT           TIM2_IRQHandler
   88 00000200                 IMPORT           TIM3_IRQHandler
   89 00000200                 IMPORT           TIM4_IRQHandler



ARM Macro Assembler    Page 3 


   90 00000200                 IMPORT           I2C1_EV_IRQHandler
   91 00000200                 IMPORT           I2C1_ER_IRQHandler
   92 00000200                 IMPORT           I2C2_EV_IRQHandler
   93 00000200                 IMPORT           I2C2_ER_IRQHandler
   94 00000200                 IMPORT           SPI1_IRQHandler
   95 00000200                 IMPORT           SPI2_IRQHandler
   96 00000200                 IMPORT           USART1_IRQHandler
   97 00000200                 IMPORT           USART2_IRQHandler
   98 00000200                 IMPORT           USART3_IRQHandler
   99 00000200                 IMPORT           EXTI15_10_IRQHandler
  100 00000200                 IMPORT           RTCAlarm_IRQHandler
  101 00000200                 IMPORT           USBWakeUp_IRQHandler
  102 00000200         
  103 00000200         
  104 00000200         
  105 00000200                 PRESERVE8
  106 00000200         
  107 00000200         ;*******************************************************
                       ***************************
  108 00000200         ;*  Reset code section.                                 
                                                                               
                                         
  109 00000200         ;*******************************************************
                       ***************************
  110 00000200                 AREA             RESET, CODE, READONLY
  111 00000000                 THUMB
  112 00000000         
  113 00000000         ;*******************************************************
                       ************************
  114 00000000         ; Fill-up the Vector Table entries with the exceptions I
                       SR address
  115 00000000         ;*******************************************************
                       ************************
  116 00000000                 EXPORT           __Vectors
  117 00000000         __Vectors
  118 00000000 00000200        DCD              Stack + Stack_Size 
                                                            ; Top of Stack
  119 00000004 00000000        DCD              Reset_Handler
  120 00000008 00000000        DCD              NMIException
  121 0000000C 00000000        DCD              HardFaultException
  122 00000010 00000000        DCD              MemManageException
  123 00000014 00000000        DCD              BusFaultException
  124 00000018 00000000        DCD              UsageFaultException
  125 0000001C 00000000        DCD              0           ; Reserved
  126 00000020 00000000        DCD              0           ; Reserved
  127 00000024 00000000        DCD              0           ; Reserved
  128 00000028 00000000        DCD              0           ; Reserved
  129 0000002C 00000000        DCD              SVCHandler
  130 00000030 00000000        DCD              DebugMonitor
  131 00000034 00000000        DCD              0           ; Reserved
  132 00000038 00000000        DCD              OSPendSV
  133 0000003C 00000000        DCD              SysTickHandler
  134 00000040 00000000        DCD              WWDG_IRQHandler
  135 00000044 00000000        DCD              PVD_IRQHandler
  136 00000048 00000000        DCD              TAMPER_IRQHandler
  137 0000004C 00000000        DCD              RTC_IRQHandler
  138 00000050 00000000        DCD              FLASH_IRQHandler
  139 00000054 00000000        DCD              RCC_IRQHandler
  140 00000058 00000000        DCD              EXTI0_IRQHandler



ARM Macro Assembler    Page 4 


  141 0000005C 00000000        DCD              EXTI1_IRQHandler
  142 00000060 00000000        DCD              EXTI2_IRQHandler
  143 00000064 00000000        DCD              EXTI3_IRQHandler
  144 00000068 00000000        DCD              EXTI4_IRQHandler
  145 0000006C 00000000        DCD              DMAChannel1_IRQHandler
  146 00000070 00000000        DCD              DMAChannel2_IRQHandler
  147 00000074 00000000        DCD              DMAChannel3_IRQHandler
  148 00000078 00000000        DCD              DMAChannel4_IRQHandler
  149 0000007C 00000000        DCD              DMAChannel5_IRQHandler
  150 00000080 00000000        DCD              DMAChannel6_IRQHandler
  151 00000084 00000000        DCD              DMAChannel7_IRQHandler
  152 00000088 00000000        DCD              ADC_IRQHandler
  153 0000008C 00000000        DCD              USB_HP_CAN_TX_IRQHandler
  154 00000090 00000000        DCD              USB_LP_CAN_RX0_IRQHandler
  155 00000094 00000000        DCD              CAN_RX1_IRQHandler
  156 00000098 00000000        DCD              CAN_SCE_IRQHandler
  157 0000009C 00000000        DCD              EXTI9_5_IRQHandler
  158 000000A0 00000000        DCD              TIM1_BRK_IRQHandler
  159 000000A4 00000000        DCD              TIM1_UP_IRQHandler
  160 000000A8 00000000        DCD              TIM1_TRG_COM_IRQHandler
  161 000000AC 00000000        DCD              TIM1_CC_IRQHandler
  162 000000B0 00000000        DCD              TIM2_IRQHandler
  163 000000B4 00000000        DCD              TIM3_IRQHandler
  164 000000B8 00000000        DCD              TIM4_IRQHandler
  165 000000BC 00000000        DCD              I2C1_EV_IRQHandler
  166 000000C0 00000000        DCD              I2C1_ER_IRQHandler
  167 000000C4 00000000        DCD              I2C2_EV_IRQHandler
  168 000000C8 00000000        DCD              I2C2_ER_IRQHandler
  169 000000CC 00000000        DCD              SPI1_IRQHandler
  170 000000D0 00000000        DCD              SPI2_IRQHandler
  171 000000D4 00000000        DCD              USART1_IRQHandler
  172 000000D8 00000000        DCD              USART2_IRQHandler
  173 000000DC 00000000        DCD              USART3_IRQHandler
  174 000000E0 00000000        DCD              EXTI15_10_IRQHandler
  175 000000E4 00000000        DCD              RTCAlarm_IRQHandler
  176 000000E8 00000000        DCD              USBWakeUp_IRQHandler
  177 000000EC 00000000        DCD              0           ; Reserved
  178 000000F0 00000000        DCD              0           ; Reserved
  179 000000F4 00000000        DCD              0           ; Reserved
  180 000000F8 00000000        DCD              0           ; Reserved
  181 000000FC 00000000        DCD              0           ; Reserved
  182 00000100         
  183 00000100         ;*******************************************************
                       ***********************************
  184 00000100         ;*  Reset entry
  185 00000100         ;*******************************************************
                       ***********************************
  186 00000100                 EXPORT           Reset_Handler
  187 00000100         Reset_Handler
  188 00000100                 IMPORT           __main
  189 00000100 4804            LDR              R0, =__main
  190 00000102 4700            BX               R0
  191 00000104         
  192 00000104         
  193 00000104         ;*******************************************************
                       ***********************************
  194 00000104         ;*  NMI exception handler. 
  195 00000104         ;*  It simply enters an infinite loop.
  196 00000104         ;*******************************************************



ARM Macro Assembler    Page 5 


                       ***********************************
  197 00000104         NMIException
  198 00000104 E7FE            B                NMIException
  199 00000106         
  200 00000106         
  201 00000106         ;*******************************************************
                       ***********************************
  202 00000106         ;*  Fault interrupt handler. 
  203 00000106         ;*  It simply enters an infinite loop.
  204 00000106         ;*******************************************************
                       ***********************************
  205 00000106         HardFaultException
  206 00000106 E7FE            B                HardFaultException
  207 00000108         
  208 00000108         ;*******************************************************
                       ***********************************
  209 00000108         ;*  MemManage interrupt handler. 
  210 00000108         ;*  It simply enters an infinite loop.
  211 00000108         ;*******************************************************
                       ***********************************
  212 00000108         MemManageException
  213 00000108 E7FE            B                MemManageException
  214 0000010A         
  215 0000010A         ;*******************************************************
                       ***********************************
  216 0000010A         ;*  Bus Fault interrupt handler. 
  217 0000010A         ;*  It simply enters an infinite loop.
  218 0000010A         ;*******************************************************
                       ***********************************
  219 0000010A         BusFaultException
  220 0000010A E7FE            B                BusFaultException
  221 0000010C         
  222 0000010C         ;*******************************************************
                       ***********************************
  223 0000010C         ;*  UsageFault interrupt handler. 
  224 0000010C         ;*  It simply enters an infinite loop.
  225 0000010C         ;*******************************************************
                       ***********************************
  226 0000010C         UsageFaultException
  227 0000010C E7FE            B                UsageFaultException
  228 0000010E         
  229 0000010E         ;*******************************************************
                       ***********************************
  230 0000010E         ;*  DebugMonitor interrupt handler. 
  231 0000010E         ;*  It simply enters an infinite loop.
  232 0000010E         ;*******************************************************
                       ***********************************
  233 0000010E         DebugMonitor
  234 0000010E E7FE            B                DebugMonitor
  235 00000110         
  236 00000110         ;*******************************************************
                       ***********************************
  237 00000110         ;*  SVCall interrupt handler. 
  238 00000110         ;*  It simply enters an infinite loop.
  239 00000110         ;*******************************************************
                       ***********************************
  240 00000110         SVCHandler
  241 00000110 E7FE            B                SVCHandler
  242 00000112         



ARM Macro Assembler    Page 6 


  243 00000112         
  244 00000112         
  245 00000112         ;*******************************************************
                       ************************************
  246 00000112         ;*  Make sure the end of this section is aligned.
  247 00000112         ;*******************************************************
                       ************************************
  248 00000112 00 00           ALIGN
  249 00000114         
  250 00000114         
  251 00000114         ;*******************************************************
                       *************************************
  252 00000114         ;*  Code section for initializing the heap and stack    
                                                                               
                                                                     
  253 00000114         ;*******************************************************
                       *************************************
  254 00000114 00000000        AREA             |.text|, CODE, READONLY
  255 00000000         
  256 00000000         
  257 00000000         ;*******************************************************
                       *************************************
  258 00000000         ;*  The function expected of the C library startup 
  259 00000000         ;*  code for defining the stack and heap memory location
                       s. 
  260 00000000         ;*******************************************************
                       *************************************
  261 00000000                 IMPORT           __use_two_region_memory
  262 00000000                 EXPORT           __user_initial_stackheap
  263 00000000         __user_initial_stackheap
  264 00000000 4802            LDR              R0, =Heap
  265 00000002 4903            LDR              R1, =(Stack + Stack_Size)
  266 00000004 4A03            LDR              R2, =(Heap + Heap_Size)
  267 00000006 4B04            LDR              R3, =Stack

⌨️ 快捷键说明

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